Rename 'existing_doc' and 'document' to entity
Patch by: Sverre Rabbelier
Reviewed by: to-be-reviewed
--- a/app/soc/templates/soc/docs/edit.html Mon Oct 20 23:23:53 2008 +0000
+++ b/app/soc/templates/soc/docs/edit.html Mon Oct 20 23:24:07 2008 +0000
@@ -18,8 +18,8 @@
{% endblock %}
{% block header_title %}
{{ page.short_name }}
- {% if existing_doc %}
- <a href="/docs/show/{{ existing_doc.partial_path }}/{{ existing_doc.link_name }}">"{{ existing_doc.title }}"</a>
+ {% if entity %}
+ <a href="/docs/show/{{ entity.partial_path }}/{{ entity.link_name }}">"{{ entity.title }}"</a>
{% endif %}
{% endblock %}
@@ -46,9 +46,9 @@
<td>
<input type="button" onclick="location.href='/'" value="Cancel"/>
</td>
- {% if existing_doc %}
+ {% if entity %}
<td>
- <input type="button" onclick="location.href='/docs/delete/{{ existing_doc.partial_path }}/{{ existing_doc.link_name }}'" value="Delete"/>
+ <input type="button" onclick="location.href='/docs/delete/{{ entity.partial_path }}/{{ entity.link_name }}'" value="Delete"/>
</td>
{% endif %}
{% endblock %}
--- a/app/soc/templates/soc/docs/public.html Mon Oct 20 23:23:53 2008 +0000
+++ b/app/soc/templates/soc/docs/public.html Mon Oct 20 23:24:07 2008 +0000
@@ -14,16 +14,16 @@
{% endcomment %}
{% block page_title %}
-{{ document.title }}
+{{ entity.title }}
{% endblock %}
{% block header_title %}
-{{ document.title }}
+{{ entity.title }}
{% endblock %}
{% block body %}
-<div id="createdon">Created on: {{ document.created }}</div>
-<div id="createdby">Created by: {{ document.author.nick_name }}</div>
-<div id="content">{{ document.content|safe }}</div>
-<div id="lastmodified">Last updated on: {{ document.modified }}</div>
+<div id="createdon">Created on: {{ entity.created }}</div>
+<div id="createdby">Created by: {{ entity.author.nick_name }}</div>
+<div id="content">{{ entity.content|safe }}</div>
+<div id="lastmodified">Last updated on: {{ entity.modified }}</div>
{% endblock %}
--- a/app/soc/views/docs/edit.py Mon Oct 20 23:23:53 2008 +0000
+++ b/app/soc/views/docs/edit.py Mon Oct 20 23:24:07 2008 +0000
@@ -275,7 +275,7 @@
form = EditForm()
context.update({'form': form,
- 'existing_doc': doc})
+ 'entity': doc})
return helper.responses.respond(request, template, context)
--- a/app/soc/views/docs/show.py Mon Oct 20 23:23:53 2008 +0000
+++ b/app/soc/views/docs/show.py Mon Oct 20 23:24:07 2008 +0000
@@ -82,6 +82,6 @@
return simple.errorResponse(request, page, error, template, context)
doc.content = helper.templates.unescape(doc.content)
- context['document'] = doc
+ context['entity'] = doc
return helper.responses.respond(request, template, context)
\ No newline at end of file