diff --git a/ckan/templates/group/snippets/group_item.html b/ckan/templates/group/snippets/group_item.html index 9e32ce86e6a..0c035e44596 100644 --- a/ckan/templates/group/snippets/group_item.html +++ b/ckan/templates/group/snippets/group_item.html @@ -11,7 +11,8 @@ {% endfor %} #} -{% set url = h.url_for(group.type ~ '_read', action='read', id=group.name) %} +{% set type = group.type or 'group' %} +{% set url = h.url_for(type ~ '_read', action='read', id=group.name) %}
  • {% block image %} {{ group.name }} @@ -36,6 +37,9 @@

    {{ group.display_name }}

    {{ _('View {name}').format(name=group.display_name) }} + {% if group.user_member %} + + {% endif %}
  • {% if position is divisibleby 3 %}
  • diff --git a/ckan/templates/package/group_list.html b/ckan/templates/package/group_list.html index 63440bfacb7..190c95a51cf 100644 --- a/ckan/templates/package/group_list.html +++ b/ckan/templates/package/group_list.html @@ -1,32 +1,27 @@ -{% import 'macros/form.html' as form %} {% extends "package/read_base.html" %} +{% import 'macros/form.html' as form %} {% block primary_content_inner %} -

    {% block page_heading %}{{ _('Groups {dataset} belongs to.').format(dataset=h.dataset_display_name(c.pkg)) }}{% endblock %}

    +

    {{ _('Groups') }}

    {% if c.group_dropdown %} -
    - - -
    +
    + {#'data-module': ''#} + + +
    {% endif %} - - + {% if c.pkg_dict.groups %} +
    + {% snippet 'group/snippets/group_list.html', groups=c.pkg_dict.groups %} +
    + {% else %} +

    {{ _('There are no groups associated with this dataset') }}

    + {% endif %} {% endblock %}