Permalink
Browse files

message rename and align premissions and moderation_states logic

  • Loading branch information...
1 parent 9b52637 commit 9236d475a793fc0ba1d8efce0ba52c0ae175b08c @FinalAngel FinalAngel committed Jan 18, 2013
View
@@ -858,7 +858,7 @@ def get_moderation_states(self, request, page_id):
context = {
'page': page,
}
- return render_to_response('admin/cms/page/moderation_messages.html', context)
+ return render_to_response('admin/cms/page/moderation_states.html', context)
@transaction.commit_on_success
def approve_page(self, request, page_id):
@@ -1,18 +0,0 @@
-{% load i18n cms_admin %}
-<table>
- <thead><tr>
- <th>{% trans 'Action' %}</th>
- <th>{% trans 'Created' %}</th>
- <th>{% trans 'User' %}</th>
- <th>{% trans 'Message' %}</th>
- </tr></thead>
- <tbody>
- {% for state in page.pagemoderatorstate_set.all %}<tr class="{% cycle 'row1' 'row2' %}">
- <td class="action">{{ state.get_action_display }}</td>
- <td class="created">{{ state.created }}</td>
- <td class="user">{{ state.user }}</td>
- <td class="message">{{ state.message }}</td>
- </tr>
- {% endfor %}
- </tbody>
-</table>
@@ -0,0 +1,29 @@
+{% load i18n cms_admin %}
+{% comment %}
+- This template is used within page edit as the category "Page states".
+{% endcomment %}
+
+{% if state %}
+<table>
+ <thead>
+ <tr>
+ <th>{% trans "Action" %}</th>
+ <th>{% trans "Created" %}</th>
+ <th>{% trans "User" %}</th>
+ <th>{% trans "Message" %}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for state in page.pagemoderatorstate_set.all %}
+ <tr class="{% cycle 'row1' 'row2' %}">
+ <td class="action">{{ state.get_action_display }}</td>
+ <td class="created">{{ state.created }}</td>
+ <td class="user">{{ state.user }}</td>
+ <td class="message">{{ state.message }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% else %}
+<p>{% trans "Page doesn't have any states." %}</p>
+{% endif %}
@@ -64,4 +64,4 @@
</table>
{% else %}
<p>{% trans "Page doesn't inherit any permissions." %}</p>
-{% endif %}
+{% endif %}

0 comments on commit 9236d47

Please sign in to comment.