diff --git a/ckan/templates/group/base_form_page.html b/ckan/templates/group/base_form_page.html index e0d71da962e..25f817826c7 100644 --- a/ckan/templates/group/base_form_page.html +++ b/ckan/templates/group/base_form_page.html @@ -8,7 +8,7 @@ {% endblock %} {% block primary_content_inner %} -

{% block page_heading %}{{ _('Group Form') }}{% endblock %}

+

{% block page_heading %}{{ _('Group Form') }}{% endblock %}

{% block form %} {{ c.form | safe }} {% endblock %} diff --git a/ckan/templates/group/edit.html b/ckan/templates/group/edit.html index 89fce7c4637..57808056d54 100644 --- a/ckan/templates/group/edit.html +++ b/ckan/templates/group/edit.html @@ -10,4 +10,5 @@ {% block subtitle %}{{ _('Edit Group') }}{% endblock %} +{% block page_heading_class %}hide-heading{% endblock %} {% block page_heading %}{{ _('Edit Group') }}{% endblock %} diff --git a/ckan/templates/group/edit_base.html b/ckan/templates/group/edit_base.html index 7da8fedb348..a5f1203d529 100644 --- a/ckan/templates/group/edit_base.html +++ b/ckan/templates/group/edit_base.html @@ -1,4 +1,4 @@ -{% extends "group/read_base.html" %} +{% extends "page.html" %} {% set group = c.group_dict %} @@ -18,3 +18,7 @@ {{ h.build_nav_icon('group_edit', _('Edit'), id=c.group_dict.name) }} {{ h.build_nav_icon('group_members', _('Members'), id=c.group_dict.name) }} {% endblock %} + +{% block secondary_content %} + {% snippet "group/snippets/info.html", group=c.group_dict, show_nums=false %} +{% endblock %} diff --git a/ckan/templates/group/index.html b/ckan/templates/group/index.html index 28e682a8bd0..8db2afb9c31 100644 --- a/ckan/templates/group/index.html +++ b/ckan/templates/group/index.html @@ -37,19 +37,5 @@

{{ _('Groups') }}

{% endblock %} {% block secondary_content %} -
-

- - {{ _('What are Groups?') }} -

-
- {% trans %} -

Groups allow you to group together datasets under a community (for - example, Civil Liberty data) or topic (e.g. Transport, Health, - Environment) to make it easier for users to browse datasets by theme. - Datasets can be part of a group, but do not belong to the group for - editing or authorisation purposes.

- {% endtrans %} -
-
+ {% snippet "group/snippets/helper.html" %} {% endblock %} diff --git a/ckan/templates/group/new.html b/ckan/templates/group/new.html index 276ba723c30..91179be106c 100644 --- a/ckan/templates/group/new.html +++ b/ckan/templates/group/new.html @@ -6,4 +6,9 @@ {% block page_heading %}{{ _('Create a Group') }}{% endblock %} -{% block actions_content %}{% endblock %} +{% block page_header %}{% endblock %} + +{% block secondary_content %} + {% snippet "group/snippets/helper.html" %} +{% endblock %} + diff --git a/ckan/templates/group/read_base.html b/ckan/templates/group/read_base.html index 2db8d6f7318..afa92f2038f 100644 --- a/ckan/templates/group/read_base.html +++ b/ckan/templates/group/read_base.html @@ -20,37 +20,7 @@ {% endblock %} {% block secondary_content %} -
-
-
- - {{ c.group_dict.name }} - -
-

{{ c.group_dict.display_name }}

- {% if c.group_dict.description %} -

- {{ 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 %} -
-
-
{{ _('Followers') }}
-
{{ h.SI_number_span(c.group_dict.num_followers) }}
-
-
-
{{ _('Datasets') }}
-
{{ h.SI_number_span(c.group_dict.packages|length) }}
-
-
- -
-
+ {% snippet "group/snippets/info.html", group=c.group_dict, show_nums=true %} {% endblock %} {% block links %} diff --git a/ckan/templates/group/snippets/helper.html b/ckan/templates/group/snippets/helper.html new file mode 100644 index 00000000000..a73c9d6dde7 --- /dev/null +++ b/ckan/templates/group/snippets/helper.html @@ -0,0 +1,15 @@ +
+

+ + {{ _('What are Groups?') }} +

+
+ {% trans %} +

Groups allow you to group together datasets under a community (for + example, Civil Liberty data) or topic (e.g. Transport, Health, + Environment) to make it easier for users to browse datasets by theme. + Datasets can be part of a group, but do not belong to the group for + editing or authorisation purposes.

+ {% endtrans %} +
+
\ No newline at end of file diff --git a/ckan/templates/group/snippets/info.html b/ckan/templates/group/snippets/info.html new file mode 100644 index 00000000000..b7c749ab147 --- /dev/null +++ b/ckan/templates/group/snippets/info.html @@ -0,0 +1,33 @@ +
+
+
+ + {{ group.name }} + +
+

{{ group.display_name }}

+ {% if group.description %} +

+ {{ h.markdown_extract(group.description, 180) }} + {% link_for _('read more'), controller='group', action='about', id=group.name %} +

+ {% else %} +

{{ _('There is no description for this group') }}

+ {% endif %} + {% if show_nums %} +
+
+
{{ _('Followers') }}
+
{{ h.SI_number_span(group.num_followers) }}
+
+
+
{{ _('Datasets') }}
+
{{ h.SI_number_span(group.packages|length) }}
+
+
+ + {% endif %} +
+
\ No newline at end of file diff --git a/ckan/templates/organization/index.html b/ckan/templates/organization/index.html index 589b4c65eb7..032a8c7d0da 100644 --- a/ckan/templates/organization/index.html +++ b/ckan/templates/organization/index.html @@ -37,21 +37,5 @@

{% block page_heading %}{{ _('Organizations') }}{% endb {% endblock %} {% block secondary_content %} -
-

- - {{ _('What are Organizations?') }} -

-
- {% trans %} -

Organizations act like publishing departments for datasets (for - example, the Department of Health). This means that datasets can be - published by and belong to a department instead of an individual - user.

-

Within organizations, admins can assign roles and authorisation its - members, giving individual users the right to publish datasets from - that particular organisation (e.g. Office of National Statistics).

- {% endtrans %} -
-
+ {% snippet "organization/snippets/helper.html" %} {% endblock %} diff --git a/ckan/templates/organization/new.html b/ckan/templates/organization/new.html index b490fd36a01..7af6a1d08db 100644 --- a/ckan/templates/organization/new.html +++ b/ckan/templates/organization/new.html @@ -10,4 +10,8 @@ {% block breadcrumb_content_inner %}
  • {{ _('Create an Organization') }}
  • -{% endblock %} \ No newline at end of file +{% endblock %} + +{% block secondary_content %} + {% snippet "organization/snippets/helper.html" %} +{% endblock %} diff --git a/ckan/templates/organization/snippets/helper.html b/ckan/templates/organization/snippets/helper.html new file mode 100644 index 00000000000..f0acbd46d73 --- /dev/null +++ b/ckan/templates/organization/snippets/helper.html @@ -0,0 +1,17 @@ +
    +

    + + {{ _('What are Organizations?') }} +

    +
    + {% trans %} +

    Organizations act like publishing departments for datasets (for + example, the Department of Health). This means that datasets can be + published by and belong to a department instead of an individual + user.

    +

    Within organizations, admins can assign roles and authorisation its + members, giving individual users the right to publish datasets from + that particular organisation (e.g. Office of National Statistics).

    + {% endtrans %} +
    +
    \ No newline at end of file