diff --git a/ckan/templates/group/edit_base.html b/ckan/templates/group/edit_base.html index 2bd2bd29de2..2ebd55d4144 100644 --- a/ckan/templates/group/edit_base.html +++ b/ckan/templates/group/edit_base.html @@ -7,20 +7,20 @@ {% set group = c.group_dict %} {% block breadcrumb_content %} -
  • {% link_for _('Groups'), controller='group', action='index' %}
  • +
  • {% link_for _('Groups'), controller='group', action='index', named_route=group_type + '_index' %}
  • {% block breadcrumb_content_inner %} -
  • {% link_for h.get_translated(group, 'title') or group.display_name |truncate(35), controller='group', action='read', id=group.name %}
  • -
  • {% link_for _('Manage'), controller='group', action='edit', id=group.name %}
  • +
  • {% link_for h.get_translated(group, 'title') or group.display_name |truncate(35), controller='group', action='read', id=group.name, named_route=group_type + '_read' %}
  • +
  • {% link_for _('Manage'), controller='group', action='edit', id=group.name, named_route=group_type + '_edit' %}
  • {% endblock %} {% endblock %} {% block content_action %} - {% link_for _('View'), controller='group', action='read', id=c.group_dict.name, class_='btn', icon='eye' %} + {% link_for _('View'), controller='group', action='read', id=c.group_dict.name, class_='btn', icon='eye', named_route=group_type + '_read' %} {% endblock %} {% block content_primary_nav %} - {{ h.build_nav_icon('group_edit', _('Edit'), id=c.group_dict.name) }} - {{ h.build_nav_icon('group_members', _('Members'), id=c.group_dict.name) }} + {{ h.build_nav_icon(group_type + '_edit', _('Edit'), id=c.group_dict.name) }} + {{ h.build_nav_icon(group_type + '_members', _('Members'), id=c.group_dict.name) }} {% endblock %} {% block secondary_content %} diff --git a/ckan/templates/group/index.html b/ckan/templates/group/index.html index bcd5a54daa5..e03fef5b71d 100644 --- a/ckan/templates/group/index.html +++ b/ckan/templates/group/index.html @@ -3,14 +3,14 @@ {% block subtitle %}{{ _('Groups') }}{% endblock %} {% block breadcrumb_content %} -
  • {% link_for _('Groups'), controller='group', action='index' %}
  • +
  • {% link_for _('Groups'), controller='group', action='index', named_route=group_type + '_index' %}
  • {% endblock %} {% block page_header %}{% endblock %} {% block page_primary_action %} {% if h.check_access('group_create') %} - {% link_for _('Add Group'), controller='group', action='new', class_='btn btn-primary', icon='plus-square' %} + {% link_for _('Add Group'), controller='group', action='new', class_='btn btn-primary', icon='plus-square', named_route=group_type + '_new' %} {% endif %} {% endblock %} diff --git a/ckan/templates/group/member_new.html b/ckan/templates/group/member_new.html index 71968e33dbd..c2a55183694 100644 --- a/ckan/templates/group/member_new.html +++ b/ckan/templates/group/member_new.html @@ -5,7 +5,7 @@ {% set user = c.user_dict %} {% block primary_content_inner %} - {% link_for _('Back to all members'), controller='group', action='members', id=group.name, class_='btn pull-right', icon='arrow-left' %} + {% link_for _('Back to all members'), controller='group', action='members', id=group.name, class_='btn pull-right', icon='arrow-left', named_route=group_type + '_members' %}

    {% block page_heading %}{{ _('Edit Member') if user else _('Add Member') }}{% endblock %}

    @@ -55,7 +55,7 @@

    {{ form.select('role', label=_('Role'), options=c.roles, selected=c.user_role, error='', attrs=format_attrs) }}
    {% if user %} - {{ _('Delete') }} + {{ _('Delete') }} diff --git a/ckan/templates/group/members.html b/ckan/templates/group/members.html index 4cec329a585..3a7967ce94f 100644 --- a/ckan/templates/group/members.html +++ b/ckan/templates/group/members.html @@ -3,7 +3,7 @@ {% block subtitle %}{{ _('Members') }} - {{ c.group_dict.display_name }} - {{ _('Groups') }}{% endblock %} {% block page_primary_action %} - {% link_for _('Add Member'), controller='group', action='member_new', id=c.group_dict.id, class_='btn btn-primary', icon='plus-square' %} + {% link_for _('Add Member'), controller='group', action='member_new', id=c.group_dict.id, class_='btn btn-primary', icon='plus-square', named_route=group_type + '_member_new' %} {% endblock %} {% block primary_content_inner %} @@ -25,10 +25,10 @@

    {{ _('{0} members'.format(c.members|length)) }}

    {{ role }} diff --git a/ckan/templates/group/read_base.html b/ckan/templates/group/read_base.html index 56b9559b1a1..6d967c3a772 100644 --- a/ckan/templates/group/read_base.html +++ b/ckan/templates/group/read_base.html @@ -3,20 +3,20 @@ {% block subtitle %}{{ h.get_translated(c.group_dict, 'title') or c.group_dict.display_name }} - {{ _('Groups') }}{% endblock %} {% block breadcrumb_content %} -
  • {% link_for _('Groups'), controller='group', action='index' %}
  • -
  • {% link_for h.get_translated(c.group_dict, 'title') or c.group_dict.display_name |truncate(35), controller='group', action='read', id=c.group_dict.name %}
  • +
  • {% link_for _('Groups'), controller='group', action='index', named_route=group_type + '_index' %}
  • +
  • {% link_for h.get_translated(c.group_dict, 'title') or c.group_dict.display_name |truncate(35), controller='group', action='read', id=c.group_dict.name, named_route=group_type + '_read' %}
  • {% endblock %} {% block content_action %} {% if h.check_access('group_update', {'id': c.group_dict.id}) %} - {% link_for _('Manage'), controller='group', action='edit', id=c.group_dict.name, class_='btn', icon='wrench' %} + {% link_for _('Manage'), controller='group', action='edit', id=c.group_dict.name, class_='btn', icon='wrench', named_route=group_type + '_edit' %} {% endif %} {% endblock %} {% block content_primary_nav %} - {{ h.build_nav_icon('group_read', _('Datasets'), id=c.group_dict.name) }} - {{ h.build_nav_icon('group_activity', _('Activity Stream'), id=c.group_dict.name, offset=0) }} - {{ h.build_nav_icon('group_about', _('About'), id=c.group_dict.name) }} + {{ h.build_nav_icon(group_type + '_read', _('Datasets'), id=c.group_dict.name) }} + {{ h.build_nav_icon(group_type + '_activity', _('Activity Stream'), id=c.group_dict.name, offset=0) }} + {{ h.build_nav_icon(group_type + '_about', _('About'), id=c.group_dict.name) }} {% endblock %} {% block secondary_content %} diff --git a/ckan/templates/organization/edit_base.html b/ckan/templates/organization/edit_base.html index de0094042a9..5460e8bcbd8 100644 --- a/ckan/templates/organization/edit_base.html +++ b/ckan/templates/organization/edit_base.html @@ -5,23 +5,23 @@ {% block subtitle %}{{ c.group_dict.display_name }} - {{ _('Organizations') }}{% endblock %} {% block breadcrumb_content %} -
  • {% link_for _('Organizations'), controller='organization', action='index' %}
  • +
  • {% link_for _('Organizations'), controller='organization', action='index', named_route=group_type + '_index' %}
  • {% block breadcrumb_content_inner %} -
  • {% link_for organization.display_name|truncate(35), controller='organization', action='read', id=organization.name %}
  • -
  • {% link_for _('Manage'), controller='organization', action='edit', id=organization.name %}
  • +
  • {% link_for organization.display_name|truncate(35), controller='organization', action='read', id=organization.name, named_route=group_type + '_read' %}
  • +
  • {% link_for _('Manage'), controller='organization', action='edit', id=organization.name, named_route=group_type + '_edit' %}
  • {% endblock %} {% endblock %} {% block content_action %} {% if organization and h.check_access('organization_update', {'id': organization.id}) %} - {% link_for _('View'), controller='organization', action='read', id=organization.name, class_='btn', icon='eye' %} + {% link_for _('View'), controller='organization', action='read', id=organization.name, class_='btn', icon='eye', named_route=group_type + '_read' %} {% endif %} {% endblock %} {% block content_primary_nav %} - {{ h.build_nav_icon('organization_edit', _('Edit'), id=c.group_dict.name) }} - {{ h.build_nav_icon('organization_bulk_process', _('Datasets'), id=c.group_dict.name) }} - {{ h.build_nav_icon('organization_members', _('Members'), id=c.group_dict.name) }} + {{ h.build_nav_icon(group_type + '_edit', _('Edit'), id=c.group_dict.name) }} + {{ h.build_nav_icon(group_type + '_bulk_process', _('Datasets'), id=c.group_dict.name) }} + {{ h.build_nav_icon(group_type + '_members', _('Members'), id=c.group_dict.name) }} {% endblock %} {% block secondary_content %} diff --git a/ckan/templates/organization/index.html b/ckan/templates/organization/index.html index 4214ce6b165..c252f1cd5ad 100644 --- a/ckan/templates/organization/index.html +++ b/ckan/templates/organization/index.html @@ -3,14 +3,14 @@ {% block subtitle %}{{ _('Organizations') }}{% endblock %} {% block breadcrumb_content %} -
  • {% link_for _('Organizations'), controller='organization', action='index' %}
  • +
  • {% link_for _('Organizations'), controller='organization', action='index', named_route=group_type + '_index' %}
  • {% endblock %} {% block page_header %}{% endblock %} {% block page_primary_action %} {% if h.check_access('organization_create') %} - {% link_for _('Add Organization'), controller='organization', action='new', class_='btn btn-primary', icon='plus-square' %} + {% link_for _('Add Organization'), controller='organization', action='new', class_='btn btn-primary', icon='plus-square', named_route=group_type + '_new' %} {% endif %} {% endblock %} diff --git a/ckan/templates/organization/member_new.html b/ckan/templates/organization/member_new.html index 9da94a46ab1..f0638c3ed70 100644 --- a/ckan/templates/organization/member_new.html +++ b/ckan/templates/organization/member_new.html @@ -7,7 +7,7 @@ {% block subtitle %}{{ _('Edit Member') if user else _('Add Member') }} - {{ super() }}{% endblock %} {% block primary_content_inner %} - {% link_for _('Back to all members'), controller='organization', action='members', id=organization.name, class_='btn pull-right', icon='arrow-left' %} + {% link_for _('Back to all members'), controller='organization', action='members', id=organization.name, class_='btn pull-right', icon='arrow-left', named_route=group_type + '_members' %}

    {% block page_heading %}{{ _('Edit Member') if user else _('Add Member') }}{% endblock %}

    @@ -56,7 +56,7 @@

    {{ form.select('role', label=_('Role'), options=c.roles, selected=c.user_role, error='', attrs=format_attrs) }}
    {% if user %} - {{ _('Delete') }} + {{ _('Delete') }} diff --git a/ckan/templates/organization/members.html b/ckan/templates/organization/members.html index 2f2e8130f42..2805357cde0 100644 --- a/ckan/templates/organization/members.html +++ b/ckan/templates/organization/members.html @@ -5,7 +5,7 @@ {% block page_primary_action %} {% if h.check_access('organization_update', {'id': organization.id}) %} - {% link_for _('Add Member'), controller='organization', action='member_new', id=c.group_dict.id, class_='btn btn-primary', icon='plus-square' %} + {% link_for _('Add Member'), controller='organization', action='member_new', id=c.group_dict.id, class_='btn btn-primary', icon='plus-square', named_route=group_type + '_member_new' %} {% endif %} {% endblock %} @@ -30,10 +30,10 @@

    {{ members_count }}

    {{ role }} diff --git a/ckan/templates/organization/read_base.html b/ckan/templates/organization/read_base.html index 866debf7b81..5a0338752aa 100644 --- a/ckan/templates/organization/read_base.html +++ b/ckan/templates/organization/read_base.html @@ -3,24 +3,24 @@ {% block subtitle %}{{ c.group_dict.display_name }} - {{ _('Organizations') }}{% endblock %} {% block breadcrumb_content %} -
  • {% link_for _('Organizations'), controller='organization', action='index' %}
  • -
  • {% link_for c.group_dict.display_name|truncate(35), controller='organization', action='read', id=c.group_dict.name %}
  • +
  • {% link_for _('Organizations'), controller='organization', action='index', named_route=group_type + '_index' %}
  • +
  • {% link_for c.group_dict.display_name|truncate(35), controller='organization', action='read', id=c.group_dict.name, named_route=group_type + '_read' %}
  • {% endblock %} {% block content_action %} {% if h.check_access('organization_update', {'id': c.group_dict.id}) %} - {% link_for _('Manage'), controller='organization', action='edit', id=c.group_dict.name, class_='btn', icon='wrench' %} + {% link_for _('Manage'), controller='organization', action='edit', id=c.group_dict.name, class_='btn', icon='wrench', named_route=group_type + '_edit' %} {% endif %} {% endblock %} {% block content_primary_nav %} - {{ h.build_nav_icon('organization_read', _('Datasets'), id=c.group_dict.name) }} - {{ h.build_nav_icon('organization_activity', _('Activity Stream'), id=c.group_dict.name, offset=0) }} - {{ h.build_nav_icon('organization_about', _('About'), id=c.group_dict.name) }} + {{ h.build_nav_icon(group_type + '_read', _('Datasets'), id=c.group_dict.name) }} + {{ h.build_nav_icon(group_type + '_activity', _('Activity Stream'), id=c.group_dict.name, offset=0) }} + {{ h.build_nav_icon(group_type + '_about', _('About'), id=c.group_dict.name) }} {% endblock %} {% block secondary_content %} - {% snippet 'snippets/organization.html', organization=c.group_dict, show_nums=true %} + {% snippet 'snippets/organization.html', organization=c.group_dict, show_nums=true, group_type=group_type %} {% block organization_facets %}{% endblock %} {% endblock %} diff --git a/ckan/templates/snippets/organization.html b/ckan/templates/snippets/organization.html index 2d99bce31c6..518a905c2e7 100644 --- a/ckan/templates/snippets/organization.html +++ b/ckan/templates/snippets/organization.html @@ -15,7 +15,7 @@ #} {% set truncate = truncate or 0 %} -{% set url = h.url_for(controller='organization', action='read', id=organization.name) %} +{% set url = h.url_for(organization.type + '_read', id=organization.name, ) %} {% block info %}