diff --git a/ckan/config/routing.py b/ckan/config/routing.py
index fc5a81584e5..44df60358c0 100644
--- a/ckan/config/routing.py
+++ b/ckan/config/routing.py
@@ -242,6 +242,7 @@ def make_map():
'follow',
'unfollow',
'admins',
+ 'about',
'activity',
]))
)
diff --git a/ckan/controllers/group.py b/ckan/controllers/group.py
index 2e76081764e..b08cb22daeb 100644
--- a/ckan/controllers/group.py
+++ b/ckan/controllers/group.py
@@ -551,21 +551,21 @@ def unfollow(self, id):
h.redirect_to(controller='group', action='read', id=id)
def followers(self, id=None):
- context = {'model': model, 'session': model.Session,
- 'user': c.user or c.author, 'for_view': True}
- data_dict = {'id': id}
- try:
- c.group_dict = get_action('group_show')(context, data_dict)
- c.followers = get_action('group_follower_list')(context,
- {'id': c.group_dict['id']})
- except NotFound:
- abort(404, _('Group not found'))
- except NotAuthorized:
- abort(401, _('Unauthorized to read group %s') % id)
-
+ context = self._get_group_dict(id)
+ c.followers = get_action('group_follower_list')(context,
+ {'id': c.group_dict['id']})
return render('group/followers.html')
def admins(self, id=None):
+ context = self._get_group_dict(id)
+ c.admins = self.authorizer.get_admins(context['group'])
+ return render('group/admins.html')
+
+ def about(self, id=None):
+ self._get_group_dict(id)
+ return render('group/about.html')
+
+ def _get_group_dict(self, id):
context = {'model': model, 'session': model.Session,
'user': c.user or c.author,
'for_view': True}
@@ -577,8 +577,7 @@ def admins(self, id=None):
abort(404, _('Group not found'))
except NotAuthorized:
abort(401, _('Unauthorized to read group %s') % id)
-
- return render('group/admins.html')
+ return context
def _render_edit_form(self, fs):
# errors arrive in c.error and fs.errors
diff --git a/ckan/lib/activity_streams.py b/ckan/lib/activity_streams.py
index 9ac8eb9a887..457767e5934 100644
--- a/ckan/lib/activity_streams.py
+++ b/ckan/lib/activity_streams.py
@@ -161,16 +161,16 @@ def activity_stream_string_new_related_item():
# A dictionary mapping activity types to the icons associated to them
activity_stream_string_icons = {
'added tag': 'tag',
- 'changed group': 'users',
+ 'changed group': 'group',
'changed package': 'sitemap',
'changed package_extra': 'edit',
'changed resource': 'file',
'changed user': 'user',
- 'deleted group': 'users',
+ 'deleted group': 'group',
'deleted package': 'sitemap',
'deleted package_extra': 'edit',
'deleted resource': 'file',
- 'new group': 'users',
+ 'new group': 'group',
'new package': 'sitemap',
'new package_extra': 'edit',
'new resource': 'file',
diff --git a/ckan/templates/group/about.html b/ckan/templates/group/about.html
new file mode 100644
index 00000000000..985abe5fd1d
--- /dev/null
+++ b/ckan/templates/group/about.html
@@ -0,0 +1,37 @@
+{% extends "group/read.html" %}
+
+{% block subtitle %}{{ _('About') }} - {{ c.group_dict.title or c.group_dict.name }}{% endblock %}
+
+{% block primary_content_inner %}
+ {{ c.group_dict.description }} {{ _('There is no description for this group') }}{{ _('About') }}
+
+
+
+
+ Name:
+ {{ c.group_dict.title or c.group_dict.name }}
+
+
+ Description:
+
+ {% if c.group_dict.description %}
+
+
+
+
+ URL:
+
+
+ {{ h.url_for(controller='group', action='read', id=c.group_dict.name, qualified=true) }}
+
+
+
{{ c.group_dict.description }}
- {% else %} -{{ h.markdown_extract(c.group_dict.description, truncate) }}
- {% endif %} ++ {{ h.markdown_extract(c.group_dict.description, 180) }} + {% link_for _('read more'), controller='group', action='about', id=c.group_dict.name %} +
{% else %}{{ _('There is no description for this group') }}
{% endif %}