Browse Source

Merge pull request #19 from l0ud/master

Small fixes
Rafał Pitoń 12 years ago
parent
commit
9f54f9c919
3 changed files with 22 additions and 19 deletions
  1. 16 16
      misago/forumroles/fixtures.py
  2. 2 2
      misago/roles/forms.py
  3. 4 1
      templates/admin/users/list.html

+ 16 - 16
misago/forumroles/fixtures.py

@@ -8,16 +8,16 @@ def load_fixtures():
     role.set_permissions({
     role.set_permissions({
                           'can_see_forum': True,
                           'can_see_forum': True,
                           'can_see_forum_contents': True,
                           'can_see_forum_contents': True,
-                          'can_read_threads': 2,
-                          'can_start_threads': 2,
+                          'can_read_threads': '2',
+                          'can_start_threads': '2',
                           'can_edit_own_threads': True,
                           'can_edit_own_threads': True,
                           'can_soft_delete_own_threads': True,
                           'can_soft_delete_own_threads': True,
-                          'can_write_posts': 2,
+                          'can_write_posts': '2',
                           'can_edit_own_posts': True,
                           'can_edit_own_posts': True,
                           'can_soft_delete_own_posts': True,
                           'can_soft_delete_own_posts': True,
                           'can_upvote_posts': True,
                           'can_upvote_posts': True,
                           'can_downvote_posts': True,
                           'can_downvote_posts': True,
-                          'can_see_posts_scores': True,
+                          'can_see_posts_scores': '2',
                           'can_see_votes': True,
                           'can_see_votes': True,
                           'can_make_polls': True,
                           'can_make_polls': True,
                           'can_vote_in_polls': True,
                           'can_vote_in_polls': True,
@@ -30,14 +30,14 @@ def load_fixtures():
                           'can_approve': True,
                           'can_approve': True,
                           'can_edit_labels': True,
                           'can_edit_labels': True,
                           'can_see_changelog': True,
                           'can_see_changelog': True,
-                          'can_pin_threads': 2,
+                          'can_pin_threads': '2',
                           'can_edit_threads_posts': True,
                           'can_edit_threads_posts': True,
                           'can_move_threads_posts': True,
                           'can_move_threads_posts': True,
                           'can_close_threads': True,
                           'can_close_threads': True,
                           'can_protect_posts': True,
                           'can_protect_posts': True,
-                          'can_delete_threads': 2,
-                          'can_delete_posts': 2,
-                          'can_delete_polls': 2,
+                          'can_delete_threads': '2',
+                          'can_delete_posts': '2',
+                          'can_delete_polls': '2',
                           'can_delete_attachments': True,
                           'can_delete_attachments': True,
                           })
                           })
     role.save(force_insert=True)
     role.save(force_insert=True)
@@ -47,10 +47,10 @@ def load_fixtures():
     role.set_permissions({
     role.set_permissions({
                           'can_see_forum': True,
                           'can_see_forum': True,
                           'can_see_forum_contents': True,
                           'can_see_forum_contents': True,
-                          'can_read_threads': 2,
-                          'can_start_threads': 2,
+                          'can_read_threads': '2',
+                          'can_start_threads': '2',
                           'can_edit_own_threads': True,
                           'can_edit_own_threads': True,
-                          'can_write_posts': 2,
+                          'can_write_posts': '2',
                           'can_edit_own_posts': True,
                           'can_edit_own_posts': True,
                           'can_soft_delete_own_posts': True,
                           'can_soft_delete_own_posts': True,
                           'can_upvote_posts': True,
                           'can_upvote_posts': True,
@@ -69,10 +69,10 @@ def load_fixtures():
     role.set_permissions({
     role.set_permissions({
                           'can_see_forum': True,
                           'can_see_forum': True,
                           'can_see_forum_contents': True,
                           'can_see_forum_contents': True,
-                          'can_read_threads': 2,
-                          'can_start_threads': 2,
+                          'can_read_threads': '2',
+                          'can_start_threads': '2',
                           'can_edit_own_threads': True,
                           'can_edit_own_threads': True,
-                          'can_write_posts': 2,
+                          'can_write_posts': '2',
                           'can_edit_own_posts': True,
                           'can_edit_own_posts': True,
                           'can_soft_delete_own_posts': True,
                           'can_soft_delete_own_posts': True,
                           'can_upvote_posts': True,
                           'can_upvote_posts': True,
@@ -88,7 +88,7 @@ def load_fixtures():
     role.set_permissions({
     role.set_permissions({
                           'can_see_forum': True,
                           'can_see_forum': True,
                           'can_see_forum_contents': True,
                           'can_see_forum_contents': True,
-                          'can_read_threads': 2,
+                          'can_read_threads': '2',
                           'can_download_attachments': True,
                           'can_download_attachments': True,
                           })
                           })
     role.save(force_insert=True)
     role.save(force_insert=True)
@@ -106,6 +106,6 @@ def load_fixtures():
     role.set_permissions({
     role.set_permissions({
                           'can_see_forum': True,
                           'can_see_forum': True,
                           'can_see_forum_contents': True,
                           'can_see_forum_contents': True,
-                          'can_read_threads': 2,
+                          'can_read_threads': '2',
                           })
                           })
     role.save(force_insert=True)
     role.save(force_insert=True)

+ 2 - 2
misago/roles/forms.py

@@ -21,6 +21,6 @@ class RoleForm(Form):
                         ],
                         ],
                        ]
                        ]
         
         
-        if self.request.user.is_god():
+        if not self.request.user.is_god():
             del self.fields['protected']
             del self.fields['protected']
-            del self.layout[0][1][1]    
+            del self.layout[0][1][1]

+ 4 - 1
templates/admin/users/list.html

@@ -25,11 +25,14 @@
 
 
 {% block table_row scoped %}
 {% block table_row scoped %}
   <td class="avatar-small"><img src="{{ item.get_avatar(28) }}" class="avatar-small" alt=""></td>
   <td class="avatar-small"><img src="{{ item.get_avatar(28) }}" class="avatar-small" alt=""></td>
-  <td colspan="2" class="lead-cell">
+  <td class="lead-cell">
   	<strong>{{ item.username }}</strong> <span class="muted">{{ item.email }}</span>{% if item.activation > 0 %} <span class="label tooltip-top" title="{% if item.activation == 1 -%}
   	<strong>{{ item.username }}</strong> <span class="muted">{{ item.email }}</span>{% if item.activation > 0 %} <span class="label tooltip-top" title="{% if item.activation == 1 -%}
   	{% trans %}This user has not yet validated his e-mail address.{% endtrans %}
   	{% trans %}This user has not yet validated his e-mail address.{% endtrans %}
   	{%- else -%}
   	{%- else -%}
   	{% trans %}This user is awaiting admin approval.{% endtrans %}
   	{% trans %}This user is awaiting admin approval.{% endtrans %}
   	{%- endif %}">{% trans %}Inactive{% endtrans %}</span>{% endif %}
   	{%- endif %}">{% trans %}Inactive{% endtrans %}</span>{% endif %}
   </td>
   </td>
+  <td>
+	{{ item.join_date|date("DATETIME_FORMAT") }}
+  </td>
 {% endblock%}
 {% endblock%}