Commits

Robert Myers committed dbec091

fixing group and project view templates

  • Participants
  • Parent commits 38d39fc
  • Branches worker

Comments (0)

Files changed (4)

File cannula/api/base/groups.py

            'form': addform,
            'errors': errors,
            }
-        return self.respond(request, self.mod_member_template, context)
+        return self.respond(request, self.mod_member_template, context)

File cannula/api/base/projects.py

         """
         user = api.users.get(user)
         group = api.groups.get(group)
-        if not api.permissions.has_group_perm(user, group, perm):
+        if not api.permissions.has_perm(user, group, perm):
             raise PermissionError("User: %s does not have perm: %s" % (user, perm))
 
         # Check group members and remove inactive ones so we don't get errors

File cannula/templates/cannula/groups.html

-{%  extends "admin/base_site.html" %}
+{%  extends "cannula/base.html" %}
 
 {% block content %}
-
-{% if multiple %}
-{% for group in results %}
+<p><a href="{% url cannula-create-group %}">Create Group</a></p>
+{% for group in groups %}
 <p>{{group}}</p>
 {% endfor %}
 
-{% else %}
-{{ results }}
-{% endif %}
-
-{% endblock %}
+{% endblock %}

File cannula/urls.py

 
 urlpatterns = patterns('cannula.views',
     url(r'^$', 'index', name='cannula-index'),
-    url(r'^create/group/$', api.groups.create_view, name='create-group'),
+    url(r'^create/group/$', api.groups.create_view, name='cannula-create-group'),
     url(r'^create/project/$', api.projects.create_view, name='create-project'),
     url(r'^groups/$', api.groups.list_view, name='cannula-groups'),
     url(r'^groups/(?P<group>[^/]*)/$', api.groups.details_view, name='group-details'),