diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/group/read_base.html b/ckanext-theme_hft/ckanext/theme_hft/templates/group/read_base.html new file mode 100644 index 0000000000000000000000000000000000000000..96d998309b245c66b700a1e98a8bdb47ace9db42 --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/group/read_base.html @@ -0,0 +1,7 @@ +{% ckan_extends %} + +{# Remove Activity Stream #} +{% block content_primary_nav %} + {{ h.build_nav_icon(group_type + '.read', _('Datasets'), id=group_dict.name, icon='sitemap') }} + {{ h.build_nav_icon(group_type + '.about', _('About'), id=group_dict.name, icon='info-circle') }} +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/header.html b/ckanext-theme_hft/ckanext/theme_hft/templates/header.html index df7c8d8f2cb346316de03b25f86b5fcc793cec27..deb2436b073c52af28b7ae04f64c63d31ab2f4d1 100644 --- a/ckanext-theme_hft/ckanext/theme_hft/templates/header.html +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/header.html @@ -1,9 +1,12 @@ {% ckan_extends %} -{# exclude About #} +{# Remove access to Profile Setting #} +{% block header_account_settings_link %} +{% endblock %} + +{# Exclude About and Organizations #} {% block header_site_navigation_tabs %} {{ h.build_nav_main( ('dataset.search', _('Datasets')), - ('organization.index', _('Organizations')), ('group.index', _('Groups')) ) }} {% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/home/layout2.html b/ckanext-theme_hft/ckanext/theme_hft/templates/home/layout2.html new file mode 100644 index 0000000000000000000000000000000000000000..e4352551bdb2d33bf6f47024ea1011e07a4ecf9a --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/home/layout2.html @@ -0,0 +1,6 @@ +{% ckan_extends %} + +{% block featured_group %} + {% snippet 'snippets/most_popular_groups.html', + groups=h.hft_theme_most_popular_groups() %} +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/search.html b/ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/search.html new file mode 100644 index 0000000000000000000000000000000000000000..1274b9d31c6f5b3bc7d1c88e22cb7e76decf3d59 --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/search.html @@ -0,0 +1,14 @@ +{% set placeholder = _('E.g. environment') %} + + diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/stats.html b/ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/stats.html new file mode 100644 index 0000000000000000000000000000000000000000..4b2b877c89c9df216053432ca728385075c1ff7b --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/stats.html @@ -0,0 +1,16 @@ +{% ckan_extends %} + + {% block stats_group %} +
  • + + {{ h.SI_number_span(stats.dataset_count) }} + {{ _('dataset') if stats.dataset_count == 1 else _('datasets') }} + +
  • +
  • + + {{ h.SI_number_span(stats.group_count) }} + {{ _('group') if stats.group_count == 1 else _('groups') }} + +
  • + {% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/package/group_list.html b/ckanext-theme_hft/ckanext/theme_hft/templates/package/group_list.html new file mode 100644 index 0000000000000000000000000000000000000000..594e2a1c6434b680201f1249369355ad276bc3ad --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/package/group_list.html @@ -0,0 +1,8 @@ +{% ckan_extends %} + +{% block primary_content_inner %} + {{ super() }} + + {% if (group_dropdown) and (c.userobj) %} + {% endif %} +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/package/read_base.html b/ckanext-theme_hft/ckanext/theme_hft/templates/package/read_base.html new file mode 100644 index 0000000000000000000000000000000000000000..92e9214b7bf9c2ae4694f006bfd60932fb80c7d0 --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/package/read_base.html @@ -0,0 +1,7 @@ +{% ckan_extends %} + +{# Remove Activity Stream #} +{% block content_primary_nav %} + {{ h.build_nav_icon(dataset_type ~ '.read', _('Dataset'), id=pkg.id if is_activity_archive else pkg.name, icon='sitemap') }} + {{ h.build_nav_icon(dataset_type ~ '.groups', _('Groups'), id=pkg.id if is_activity_archive else pkg.name, icon='users') }} +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_basic_fields.html b/ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_basic_fields.html new file mode 100644 index 0000000000000000000000000000000000000000..ea0c632b1bae792aeef3958bac38c42c45dce44e --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_basic_fields.html @@ -0,0 +1,8 @@ +{% ckan_extends %} + +{% block package_basic_fields_title %} +{{ form.input('title', id='field-title', label=_('Title'), placeholder=_('eg. A descriptive title'), value=data.title, error=errors.title, classes=['control-full', 'control-large'], attrs={'data-module': 'slug-preview-target', 'class': 'form-control'}, is_required=true) }} +{% endblock %} + +{% block package_basic_fields_tags %} +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_metadata_fields.html b/ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_metadata_fields.html new file mode 100644 index 0000000000000000000000000000000000000000..4ef9f4ce761add51b81d21f74bf2c917a8b38226 --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_metadata_fields.html @@ -0,0 +1,14 @@ +{% ckan_extends %} + +{% block package_metadata_author %} + {{ form.input('author', label=_('Author'), id='field-author', placeholder=_('Joe Bloggs'), value=data.author, error=errors.author, classes=['control-medium'], is_required=true) }} + {{ form.input('author_email', label=_('Author Email'), id='field-author-email', placeholder=_('joe@example.com'), value=data.author_email, error=errors.author_email, classes=['control-medium'], is_required=true) }} +{% endblock %} + +{% block package_metadata_fields_maintainer %} + {{ form.input('maintainer', label=_('Maintainer'), id='field-maintainer', placeholder=_('Joe Bloggs'), value=data.maintainer, error=errors.maintainer, classes=['control-medium'], is_required=true) }} + {{ form.input('maintainer_email', label=_('Maintainer Email'), id='field-maintainer-email', placeholder=_('joe@example.com'), value=data.maintainer_email, error=errors.maintainer_email, classes=['control-medium'], is_required=true) }} +{% endblock %} + +{% block package_metadata_fields_custom %} +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/resource_form.html b/ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/resource_form.html new file mode 100644 index 0000000000000000000000000000000000000000..5cb72df0f329f69d4cfdfb270a1e75297710e7db --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/resource_form.html @@ -0,0 +1,8 @@ +{% ckan_extends %} + +{% block basic_fields_url %} + {% set is_upload = (data.url_type == 'upload') %} + {{ form.image_upload(data, errors, field_url='url', field_upload='upload', field_clear='clear_upload', + is_upload_enabled=h.uploads_enabled(), is_url=data.url and not is_upload, is_upload=is_upload, + upload_label=_('Data (max. 150MB)'), url_label=_('URL'), placeholder=_('http://example.com/external-data.csv'), field_name='name') }} +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/snippets/activity_stream.html b/ckanext-theme_hft/ckanext/theme_hft/templates/snippets/activity_stream.html new file mode 100644 index 0000000000000000000000000000000000000000..ece09c2682237e4935c143b0deb705b2c57123b9 --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/snippets/activity_stream.html @@ -0,0 +1,19 @@ +{% ckan_extends %} + +{% macro actor(activity) %} +{% endmacro %} + +{% macro dataset(activity) %} +{% endmacro %} + +{% macro organization(activity) %} +{% endmacro %} + +{% macro user(activity) %} +{% endmacro %} + +{% macro group(activity) %} +{% endmacro %} + +{% block activity_stream %} +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/snippets/facet_list.html b/ckanext-theme_hft/ckanext/theme_hft/templates/snippets/facet_list.html new file mode 100644 index 0000000000000000000000000000000000000000..2aa64969ecff1e93dff0c92aadd1bff6e3fea125 --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/snippets/facet_list.html @@ -0,0 +1,17 @@ +{% ckan_extends %} +{% block facet_list %} + {# hide empty facet (Organizations and Tags) #} + {% set hide_empty = hide_empty or true %} + {% with items = items or h.get_facet_items_dict(name, search_facets or c.search_facets) %} + {% if items or not hide_empty %} + {% if within_tertiary %} + {% set nav_class = 'nav nav-pills nav-stacked' %} + {% set nav_item_class = ' ' %} + {% set wrapper_class = 'nav-facet nav-facet-tertiary' %} + {% endif %} + {% block facet_list_item %} + {{ super() }} + {% endblock %} + {% endif %} + {% endwith %} +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/snippets/most_popular_groups.html b/ckanext-theme_hft/ckanext/theme_hft/templates/snippets/most_popular_groups.html new file mode 100644 index 0000000000000000000000000000000000000000..b425f59691cb4ad5177900b978a5a2b2db56f558 --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/snippets/most_popular_groups.html @@ -0,0 +1,29 @@ +{# Renders a list of the site's most popular groups. #} +
    +
    +

    Most popular topics

    +
    +
    + +
    +
    diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/user/dashboard.html b/ckanext-theme_hft/ckanext/theme_hft/templates/user/dashboard.html new file mode 100644 index 0000000000000000000000000000000000000000..61b02e7c2acd1ccb6c84b006d2c60ed65c78ba0b --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/user/dashboard.html @@ -0,0 +1,12 @@ +{% ckan_extends %} + +{% block page_header %} + +{% endblock %} diff --git a/ckanext-theme_hft/ckanext/theme_hft/templates/user/read_base.html b/ckanext-theme_hft/ckanext/theme_hft/templates/user/read_base.html new file mode 100644 index 0000000000000000000000000000000000000000..1bbf72b24e4c4bc37fff5ec94d10a8b0cb05ac3b --- /dev/null +++ b/ckanext-theme_hft/ckanext/theme_hft/templates/user/read_base.html @@ -0,0 +1,30 @@ +{% ckan_extends %} + +{# Remove access to see all users #} +{% block breadcrumb_content %} + {{ h.build_nav('user.read', user.display_name|truncate(35), id=user.name) }} +{% endblock %} + +{# Remove access to edit user profile #} +{% block content_action %} +{% endblock %} + +{# Remove user API tokens and Activity Stream #} +{% block content_primary_nav %} + {{ h.build_nav_icon('user.read', _('Datasets'), id=user.name, icon='sitemap') }} +{% endblock %} + +{# Remove biography #} +{% block user_about %} +{% endblock %} + +{% block user_info %} +
    + {% if is_myself %} +
    +
    {{ _('Email') }} {{ _('Private') }}
    +
    {{ user.email }}
    +
    + {% endif %} +
    +{% endblock %}