diff --git a/ckanext/nhm/lib/record.py b/ckanext/nhm/lib/record.py index 9a9ce215..1f483816 100644 --- a/ckanext/nhm/lib/record.py +++ b/ckanext/nhm/lib/record.py @@ -397,12 +397,12 @@ def geojson(self) -> Optional[dict]: if not lat_field or not lon_field: return None - latitude = self.data.get(lat_field) - longitude = self.data.get(lon_field) - - if latitude is None or longitude is None: + try: + latitude = float(self.data.get(lat_field)) + longitude = float(self.data.get(lon_field)) + except (ValueError, TypeError): return None - # create a piece of GeoJSON to point at the specific record location on a map (note the - # longitude then latitude ordering required by GeoJSON) - return dict(type='Point', coordinates=[float(longitude), float(latitude)]) + # create a piece of GeoJSON to point at the specific record location on a map + # (note the longitude then latitude ordering required by GeoJSON) + return dict(type="Point", coordinates=[longitude, latitude]) diff --git a/ckanext/nhm/routes/__init__.py b/ckanext/nhm/routes/__init__.py index e9b54640..949aa4f7 100644 --- a/ckanext/nhm/routes/__init__.py +++ b/ckanext/nhm/routes/__init__.py @@ -15,6 +15,7 @@ beetle_iiif, misc, liv, + user, ) blueprints = [ @@ -29,4 +30,5 @@ beetle_iiif.blueprint, misc.blueprint, liv.blueprint, + user.blueprint, ] diff --git a/ckanext/nhm/routes/help.py b/ckanext/nhm/routes/help.py index e586e6ff..09b70821 100644 --- a/ckanext/nhm/routes/help.py +++ b/ckanext/nhm/routes/help.py @@ -26,3 +26,13 @@ def search(): Render the help page for integrated search. """ return toolkit.render('help/search.html', {'title': 'Integrated Search Help'}) + + +@blueprint.route('/dataset-permissions') +def permissions(): + """ + Render the help page for dataset permissions. + """ + return toolkit.render( + 'help/permissions.html', {'title': 'Dataset Permissions Help'} + ) diff --git a/ckanext/nhm/routes/misc.py b/ckanext/nhm/routes/misc.py index 1ec816dd..47f25fef 100644 --- a/ckanext/nhm/routes/misc.py +++ b/ckanext/nhm/routes/misc.py @@ -5,7 +5,7 @@ # Created by the Natural History Museum in London, UK from ckan.plugins import toolkit -from flask import Blueprint, jsonify +from flask import Blueprint, jsonify, redirect # create a flask blueprint with a prefix blueprint = Blueprint(name='misc', import_name=__name__) @@ -19,3 +19,14 @@ def redundancy(random_string=None): 404 and fill up the logs. """ return jsonify({}) + + +@blueprint.route('/organisation') +@blueprint.route('/organisation/') +def organisation_redirect(org_path=''): + """ + Redirect requests with the non-american spelling of organisation to the CKAN path. + + :param org_path: additional parts of the path + """ + return redirect(f'/organization/{org_path}') diff --git a/ckanext/nhm/routes/user.py b/ckanext/nhm/routes/user.py new file mode 100644 index 00000000..439a9704 --- /dev/null +++ b/ckanext/nhm/routes/user.py @@ -0,0 +1,34 @@ +# !/usr/bin/env python +# encoding: utf-8 +# +# This file is part of ckanext-nhm +# Created by the Natural History Museum in London, UK + +from ckan.plugins import toolkit +from flask import Blueprint + +blueprint = Blueprint(name='nhm_user', import_name=__name__, url_prefix='/user') + + +@blueprint.route('/user//organisations', methods=['GET']) +def orgs(username): + """ + Render a list of organisations that this user is a member of. + + :param username: The username + :return: str + """ + try: + toolkit.check_access('user_show', {}, {'id': username}) + except toolkit.NotAuthorized: + toolkit.abort(403, toolkit._('Not authorized to see this page')) + user = toolkit.get_action('user_show')( + {'for_view': True}, {'id': username, 'include_num_followers': True} + ) + orgs_available = toolkit.get_action('organization_list_for_user')( + {}, {'id': username, 'permission': 'read', 'include_dataset_count': True} + ) + return toolkit.render( + 'user/organisations.html', + extra_vars=dict(user_dict=user, organizations=orgs_available), + ) diff --git a/ckanext/nhm/theme/public/images/help/search-download.png b/ckanext/nhm/theme/public/images/help/search-download.png new file mode 100644 index 00000000..993a8850 Binary files /dev/null and b/ckanext/nhm/theme/public/images/help/search-download.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-empty-filter.png b/ckanext/nhm/theme/public/images/help/search-empty-filter.png index da857431..20bcd635 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-empty-filter.png and b/ckanext/nhm/theme/public/images/help/search-empty-filter.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-filter-add-1.png b/ckanext/nhm/theme/public/images/help/search-filter-add-1.png index 4a4f3115..0304a8cb 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-filter-add-1.png and b/ckanext/nhm/theme/public/images/help/search-filter-add-1.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-filter-add-2.png b/ckanext/nhm/theme/public/images/help/search-filter-add-2.png index 0c31464a..a75582d5 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-filter-add-2.png and b/ckanext/nhm/theme/public/images/help/search-filter-add-2.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-filter-add.png b/ckanext/nhm/theme/public/images/help/search-filter-add.png deleted file mode 100644 index 72e16427..00000000 Binary files a/ckanext/nhm/theme/public/images/help/search-filter-add.png and /dev/null differ diff --git a/ckanext/nhm/theme/public/images/help/search-filters.png b/ckanext/nhm/theme/public/images/help/search-filters.png index 02e2eb95..22057fa0 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-filters.png and b/ckanext/nhm/theme/public/images/help/search-filters.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-freetext.png b/ckanext/nhm/theme/public/images/help/search-freetext.png index a5f763e0..cf01a8e9 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-freetext.png and b/ckanext/nhm/theme/public/images/help/search-freetext.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-groups-and.png b/ckanext/nhm/theme/public/images/help/search-groups-and.png index c91e125c..2c079625 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-groups-and.png and b/ckanext/nhm/theme/public/images/help/search-groups-and.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-groups-not.png b/ckanext/nhm/theme/public/images/help/search-groups-not.png index d789db43..cc2846ac 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-groups-not.png and b/ckanext/nhm/theme/public/images/help/search-groups-not.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-groups-or.png b/ckanext/nhm/theme/public/images/help/search-groups-or.png index 9e989203..737da0eb 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-groups-or.png and b/ckanext/nhm/theme/public/images/help/search-groups-or.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-initial.png b/ckanext/nhm/theme/public/images/help/search-initial.png deleted file mode 100644 index 0c3d0c95..00000000 Binary files a/ckanext/nhm/theme/public/images/help/search-initial.png and /dev/null differ diff --git a/ckanext/nhm/theme/public/images/help/search-nested-groups.png b/ckanext/nhm/theme/public/images/help/search-nested-groups.png index 9a6b485d..0ff2b33b 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-nested-groups.png and b/ckanext/nhm/theme/public/images/help/search-nested-groups.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-overview-labelled.png b/ckanext/nhm/theme/public/images/help/search-overview-labelled.png index 791be4d4..29de561d 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-overview-labelled.png and b/ckanext/nhm/theme/public/images/help/search-overview-labelled.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-overview.png b/ckanext/nhm/theme/public/images/help/search-overview.png index 420f7354..991335db 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-overview.png and b/ckanext/nhm/theme/public/images/help/search-overview.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-presets-birdwing.png b/ckanext/nhm/theme/public/images/help/search-presets-birdwing.png index 039bba51..95ec4014 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-presets-birdwing.png and b/ckanext/nhm/theme/public/images/help/search-presets-birdwing.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-presets-hasimage-1.png b/ckanext/nhm/theme/public/images/help/search-presets-hasimage-1.png index ff902bbf..a60e94fd 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-presets-hasimage-1.png and b/ckanext/nhm/theme/public/images/help/search-presets-hasimage-1.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-presets-hasimage-2.png b/ckanext/nhm/theme/public/images/help/search-presets-hasimage-2.png index 442bc3b5..427cd036 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-presets-hasimage-2.png and b/ckanext/nhm/theme/public/images/help/search-presets-hasimage-2.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-resources.png b/ckanext/nhm/theme/public/images/help/search-resources.png index cfdf4057..4ddc2ee7 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-resources.png and b/ckanext/nhm/theme/public/images/help/search-resources.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-results-buttons.png b/ckanext/nhm/theme/public/images/help/search-results-buttons.png index 9e4c2868..dd9f8126 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-results-buttons.png and b/ckanext/nhm/theme/public/images/help/search-results-buttons.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-results-gallery.png b/ckanext/nhm/theme/public/images/help/search-results-gallery.png index 5fb03daa..8f3cf794 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-results-gallery.png and b/ckanext/nhm/theme/public/images/help/search-results-gallery.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-results-imageviewer.png b/ckanext/nhm/theme/public/images/help/search-results-imageviewer.png index a46f4024..3922247a 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-results-imageviewer.png and b/ckanext/nhm/theme/public/images/help/search-results-imageviewer.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-results-list.png b/ckanext/nhm/theme/public/images/help/search-results-list.png index e19ab687..7f101a91 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-results-list.png and b/ckanext/nhm/theme/public/images/help/search-results-list.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-results-share.png b/ckanext/nhm/theme/public/images/help/search-results-share.png index 2b77c260..b07a24ee 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-results-share.png and b/ckanext/nhm/theme/public/images/help/search-results-share.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-results-table.png b/ckanext/nhm/theme/public/images/help/search-results-table.png index a15217ab..3ce2f8fa 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-results-table.png and b/ckanext/nhm/theme/public/images/help/search-results-table.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-term-editor-fields.png b/ckanext/nhm/theme/public/images/help/search-term-editor-fields.png index c92bb8dc..166d3a33 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-term-editor-fields.png and b/ckanext/nhm/theme/public/images/help/search-term-editor-fields.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-term-editor-query-geo.png b/ckanext/nhm/theme/public/images/help/search-term-editor-query-geo.png index b6173d11..efca2780 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-term-editor-query-geo.png and b/ckanext/nhm/theme/public/images/help/search-term-editor-query-geo.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-term-editor-query-geo2.png b/ckanext/nhm/theme/public/images/help/search-term-editor-query-geo2.png index ab09a3c7..b4b7d838 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-term-editor-query-geo2.png and b/ckanext/nhm/theme/public/images/help/search-term-editor-query-geo2.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-term-editor-query-number.png b/ckanext/nhm/theme/public/images/help/search-term-editor-query-number.png index 195c60ea..ca6c5389 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-term-editor-query-number.png and b/ckanext/nhm/theme/public/images/help/search-term-editor-query-number.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-term-editor-query-text.png b/ckanext/nhm/theme/public/images/help/search-term-editor-query-text.png index 25186990..4a0e0a95 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-term-editor-query-text.png and b/ckanext/nhm/theme/public/images/help/search-term-editor-query-text.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-term-editor.png b/ckanext/nhm/theme/public/images/help/search-term-editor.png index fdd48d20..903069da 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-term-editor.png and b/ckanext/nhm/theme/public/images/help/search-term-editor.png differ diff --git a/ckanext/nhm/theme/public/images/help/search-terms.png b/ckanext/nhm/theme/public/images/help/search-terms.png index 7d3c9788..0c89cc81 100644 Binary files a/ckanext/nhm/theme/public/images/help/search-terms.png and b/ckanext/nhm/theme/public/images/help/search-terms.png differ diff --git a/ckanext/nhm/theme/templates/help/permissions.html b/ckanext/nhm/theme/templates/help/permissions.html new file mode 100644 index 00000000..cb08acd2 --- /dev/null +++ b/ckanext/nhm/theme/templates/help/permissions.html @@ -0,0 +1,93 @@ +{% extends 'help/base.html' %} + +{% block breadcrumb_content %} +
  • {% link_for _(title), named_route='help.permissions' %}
  • +{% endblock %} + +{% block help_content %} +
    +

    This page covers dataset editing permissions: who's allowed to edit which datasets, and how to change who can edit a particular dataset.

    +
    + +
    +

    Overview

    +
      +
    • You must be a user to create or own a dataset
    • +
    • Every dataset is owned by one (and only one) user, usually its creator (unless a portal admin has changed it)
    • +
    • Owners have full edit access to their dataset
    • +
    • You can give edit permissions to additional individual users by adding collaborators
    • +
    • You can give edit permissions to additional groups of users by changing the organisation.
    • +
    +
    + +
    +

    Collaborators

    +

    Collaborators are individual users with additional permissions on a dataset. These users will also be emailed if someone clicks the "Contact dataset curator" button on the dataset overview page.

    +

    NB: collaborators are not the same as contributors. Contributors are names of people who contributed to the dataset in some way, and are not necessarily users. As they are used for attribution, contributors are visible in the dataset overview and usually in the citation string, whereas collaborators are only visible to dataset editors.

    + +

    Collaborator permissions

    +

    Collaborators can have one of three different levels of access: member, editor, or admin. Each builds on the previous level (admin being the highest level with the most permissions).

    +
      +
    • Members can see the dataset if it is private, but have no edit access.
    • +
    • Editors can also edit the dataset and its resources.
    • +
    • Admins can also manage collaborators.
    • +
    + +

    Managing collaborators

    +

    Collaborators cannot be set when creating a dataset, so you will have to finish creating it first, save, and then follow these steps to find the edit page.

    +
      +
    1. Log in and locate a dataset that you own or have admin permissions for
    2. +
    3. From the dataset overview page, click the "Manage" button
    4. +
    5. Click the "Collaborators" tab
    6. +
    7. From here, you can add, remove, and manage collaborators of this dataset.
    8. +
    +
    + +
    +

    Organisations

    +

    Organisations are groups of users that "own" datasets. While there will still be one user who is the primary owner of the dataset, every dataset also belongs to one (and only one) organisation.

    +

    Most datasets on the portal belong to the Natural History Museum organisation, which is the default, and all users are members. If you are not a part of any other organisations on the portal, you will not have the option to change the organisation your dataset belongs to.

    +

    An example of an organisation is the Digitisation Team, who regularly produce new datasets that multiple team members need edit access to.

    + +

    A note on terminology

    +

    The data portal runs on a platform called CKAN. While we have extensively modified the software for our needs, there are certain things that are deceptively difficult to change - like the name of a feature embedded throughout the code.

    +

    Since all data on the portal has to be associated in some way with one real-world organisation (the Natural History Museum) calling this feature organisations does seem a bit confusing. Unfortunately, that's what the feature is called in the core platform, and it's referenced in too many places to make it a sensible idea to change.

    + +

    When to use an organisation

    +

    For the majority of datasets, the default organisation is fine.

    +

    If you have several datasets and you would like to give the same people edit access to them then your team could benefit from an organisation.

    +

    Only system administrators can create organisations, so if you'd like to use this feature please contact us.

    + +

    Organisation permissions

    +

    As with collaborators, users in an organisation can have one of three levels of access: member, editor, or admin. Each builds on the previous level (admin being the highest level with the most permissions).

    +
      +
    • Members can see private datasets in the organisation and add new ones, but cannot edit existing ones (unless they have other permissions, e.g. they are the dataset owner).
    • +
    • Editors can also edit organisation datasets.
    • +
    • Admins can also delete datasets and administrate the organisation, e.g. managing members and changing the name.
    • +
    + +

    Adding a dataset to an organisation

    +
      +
    1. Log in and either: click the "Manage" button on a dataset that you have edit permissions for, OR; create a new dataset
    2. +
    3. Change the value of the "Organisation" dropdown to the desired organisation (if you can't find this dropdown, you may not have access to any other organisations)
    4. +
    5. Save your changes.
    6. +
    + +

    Viewing your organisations

    +

    Organisations that you are part of (at any role) are listed in your user profile. We also have a full list of organisations on the portal.

    +

    To view your available organisations:

    +
      +
    1. Log in
    2. +
    3. Click your name at the top of the page
    4. +
    5. Click the "organisations" tab.
    6. +
    + +

    Managing organisation members

    +
      +
    1. Log in and locate an organisation that you have admin permissions for
    2. +
    3. On the organisation overview page, click the "Manage" button
    4. +
    5. Click the "Members" tab
    6. +
    7. From here, you can add, remove, and manage the members of this organisation.
    8. +
    +
    +{% endblock %} diff --git a/ckanext/nhm/theme/templates/help/search.html b/ckanext/nhm/theme/templates/help/search.html index 272d3c0f..b6ae0520 100644 --- a/ckanext/nhm/theme/templates/help/search.html +++ b/ckanext/nhm/theme/templates/help/search.html @@ -1,482 +1,651 @@ {% extends 'help/base.html' %} {% block breadcrumb_content %} -
  • {% link_for _(title), named_route='help.search' %}
  • +
  • {% link_for _(title), named_route='help.search' %}
  • {% endblock %} {% block help_content %} - {% set stats = h.get_site_statistics() %} - {% set specimens_url = h.url_for_collection_view() %} +{% set stats = h.get_site_statistics() %} +{% set specimens_url = h.url_for_collection_view() %} -

    This is the help page for our Integrated Search feature. Access it - here - . -

    +

    + This is the help page for our Integrated Search feature. Access it + here + . +

    -
    -

    What is integrated search?

    -

    - The Data Portal hosts many different datasets. The largest and most commonly used is our - Specimens Collection - - , but there are {{ h.SI_number_span(stats.dataset_count - 1) }} others. Previously, you - could only search in one resource (one file within a dataset) at a time, but integrated - search allows you to search multiple resources at the same time. -

    -

    - We've also made the search a lot more powerful by adding advanced features such as - boolean logic (AND, OR, and NOT) and number-based range queries (greater than, less - than), with more planned in the future.

    +
    +

    What is integrated search?

    +

    + The Data Portal hosts many different datasets. The largest and most commonly + used is our + Specimens Collection + + , but there are {{ h.SI_number_span(stats.dataset_count - 1) }} others. + Previously, you could only search in one resource (one file within a dataset) at + a time, but integrated search allows you to search multiple resources + at the same time. +

    +

    + We've also made the search a lot more powerful by adding advanced features such + as boolean logic (AND, OR, and NOT) and number-based range queries (greater + than, less than), with more planned in the future. +

    -

    The old search

    -

    If you still want to use the old search, we haven't removed anything. Just view the - resource you want to search in and everything should be exactly the same as before.

    -
    +

    The old search

    +

    + If you still want to use the old search, we haven't removed anything. Just view + the resource you want to search in and everything should be exactly the same as + before. +

    +
    -
    -

    1. UI Overview

    - A labelled screenshot of the whole UI interface. +
    +

    1. UI Overview

    + A labelled screenshot of the whole UI interface. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Free-text search - - Search all fields for the specified text. -
    - Search button - - Run the current query. -
    - Helpful buttons (search) - -
    - - - Help: takes you to this help page. - -
    -
    - - - Advanced: hides/shows the filters (shown by default). - -
    -
    - - - Query: shows the JSON query that will be submitted to the API; useful if you - need to troubleshoot or want to use the search programmatically. - -
    -
    - - - Reset: clears all the filters and free-text search. - -
    -
    - - - Resources: view/edit the list of resources being searched by the current query. - -
    -
    - Helpful buttons (results) - -
    - - - Cite: generates a DOI for this search. - -
    -
    - - - Share: generates a memorable link for social sharing. - -
    -
    - - - Download: download the results. - -
    -
    - Filter terms - - Filters on specific fields. -
    - Filter group - - Groups of filter terms (useful for advanced logic, e.g. OR or NOT queries). -
    - Result view switcher - - Change how the results are displayed; defaults to table. -
    - Results - - Records matching the current query, displayed using the current view type (e.g. - table, list, or gallery). -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Free-text searchSearch all fields for the specified text.
    Search buttonRun the current query.
    Helpful buttons (search) +
    + + + Help: takes you to this help page. + +
    +
    + + + Advanced: hides/shows the filters (shown by default). + +
    +
    + + + Query: shows the JSON query that will be submitted to the + API; useful if you need to troubleshoot or want to use the + search programmatically. + +
    +
    + + + Reset: clears all the filters and free-text search. + +
    +
    + + + Resources: view/edit the list of resources being searched + by the current query. + +
    +
    Helpful buttons (results) +
    + + + Cite: generates a DOI for this search. + +
    +
    + + + Share: generates a memorable link for social sharing. + +
    +
    + + + Download: download the results. + +
    +
    Filter termsFilters on specific fields.
    Filter group + Groups of filter terms (useful for advanced logic, e.g. OR or NOT + queries). +
    Result view switcher + Change how the results are displayed; defaults to table. +
    Results + Records matching the current query, displayed using the current view + type (e.g. table, list, or gallery). +
    +
    -
    -

    2. Constructing a search

    -

    2.1. Selecting resources

    -

    The integrated search can search across multiple resources (individual sets of records - within datasets) simultaneously.

    -

    - Clicking on Resources - - will bring up a dialog similar to this one: -

    - The resources popup dialog, with three datasets shown. Each dataset contains one resource. -

    To include a resource in your search, tick the box next to its name. You can - select/deselect all the resources within a dataset by clicking the dataset name in green - above it, and select/deselect all resources in the list using the "select all" checkbox - at the top of the list. To deselect everything except the resources in one - particular dataset, hold the alt key and click the dataset name. -

    -

    - To dismiss the dialog and save your changes, click outside the box.

    +
    +

    2. Constructing a search

    +

    2.1. Selecting resources

    +

    + The integrated search can search across multiple resources (individual sets of + records within datasets) simultaneously. +

    +

    + Clicking on Resources + + will bring up a dialog similar to this one: +

    + The resources popup dialog, with three datasets shown. Each dataset contains one resource. +

    + To include a resource in your search, tick the box next to its name. You can + select/deselect all the resources within a dataset by clicking the dataset name + in green above it, and select/deselect all resources in the list using the + "select all" checkbox at the top of the list. To deselect everything + except the resources in one particular dataset, hold the + alt key and click the dataset name. +

    +

    To dismiss the dialog and save your changes, click outside the box.

    -

    2.2. Free-text search

    -

    - The free-text search box allows you to search all fields in your chosen resource list. - For example, the free-text search "linnaeus" will find records where "Linnaeus" - is in scientificName and those where "Linnaeus" is in - determinationNames. -

    - The integrated search UI with 'linnaeus' written in the free-text search field. Six rows of results are shown. +

    2.2. Free-text search

    +

    + The free-text search box allows you to search all fields in your chosen resource + list. For example, the free-text search "linnaeus" will find records + where "Linnaeus" is in scientificName and those where "Linnaeus" is in + determinationNames. +

    + The integrated search UI with 'linnaeus' written in the free-text search field. Six rows of results are shown. -

    2.3. Filters

    +

    2.3. Filters

    +

    + Below the free-text search is the filter builder. Filter can refer to + any part of this: a whole group of multiple items, or a single item. Each of the + smallest items are referred to as terms, and they are linked together + in groups. For example: +

    +
    + Two terms (kingdom=animalia and collectionCode=zoo) grouped together in a green box. The words 'all of' are in the top right corner.

    - Below the free-text search is the filter builder. Filter can refer to any part - of this: a whole group of multiple items, or a single item. Each of the smallest items - are referred to as terms, and they are linked together in groups. For - example: + There are two terms in this filter: kingdom = animalia and + collectionCode = zoo. They are linked together in an AND (all) + group.

    -
    - Two terms (kingdom=animalia and collectionCode=zoo) grouped together in a green box. The words 'all of' are in the top right corner. -

    There are two terms in this filter: kingdom = animalia and - collectionCode = zoo. They are linked together in an AND (all) group. -

    +
    +

    + To add a filter term or group, click the icon + in the filter builder, then select the option you need. +

    +
    +
    +
    + The 'add filter' icon when no filters are currently applied. It is just below the free-text search and if prefixed by the text 'ADD FILTERS'. +
    No filters are currently applied.
    +
    -

    - To add a filter term or group, click the icon in the - filter builder, then select the option you need. -

    -
    -
    - The 'add filter' icon when no filters are currently applied. It is just below the free-text search and if prefixed by the text 'ADD FILTERS'. -
    -
    or
    -
    - The 'add filter' icons inside and outside of a filter group. These are just a plus symbol and have no preceding text. -
    -
    then
    -
    - The dropdown list of options for a new filter. -
    +
    or
    +
    +
    + A green box representing an 'ALL OF' filter group, containing a single filter term. Arrows indicate two plus icons: one inside the green box, which adds a new filter inside the group, and the other is outside the green box, which adds a filter outside of the group. +
    A group filter has already been applied.
    +
    +
    then
    +
    + The dropdown list of options for a new filter: new group, new term, and presets. +
    +
    -

    2.3.1. Filter Terms

    -

    A term filters on field names (i.e. it will be applied to every field with that - name in every resource in the query - case-insensitively). Terms are the basic units of - filtering. -

    -

    To add a new term, click the - - icon and click "new term". This will bring up the term editor. -

    - The term editor, as it appears when first shown. -

    On the left side, select the fields to search in. Typing in the textbox will filter the - list; you can then select a field by clicking on it. To remove a field name, click the - icon. -

    - The left side of the term editor, showing a list of fields filtered by the search term 'collection'. 'collectionCode' has already been selected. - -

    On the right side, specify the details of your query: field type, comparison type, and - values.

    -
    -
    - A labelled screenshot of the right side of the term editor. -
    -
    -

    Field type is the data type that the field will be read as. Most queries - will use the default "Text" type, but more complex queries may use the "Number" - or "Geo" types. A fourth type, "Any", only has one comparison type ("exists") - and just checks if the field has any content at all. -

    -

    Comparison type describes how the field value will be compared to the - query/comparison value. Each field type has different comparison types - available. -

    -

    Comparison value is the value to which the field values will be compared. -

    -

    Display name is entirely optional, but may be useful for especially - complex queries with many terms: it allows you to set a "friendly" display name - for the term, so it will be shown in a more memorable way. -

    -
    +

    2.3.1. Filter Terms

    +

    + A term filters on field names (i.e. it will be applied to every field + with that name in every resource in the query - case-insensitively). Terms are + the basic units of filtering. +

    +

    + To add a new term, click the + + icon and click "new term". This will bring up the term editor. +

    + The term editor, as it appears when first shown. +

    + On the left side, select the fields to search in. Typing in the textbox will + filter the list; you can then select a field by clicking on it. To remove a + field name, click the icon. +

    + The left side of the term editor, showing a list of fields filtered by the search term 'collection'. 'collectionCode' has already been selected. +

    + On the right side, specify the details of your query: field type, comparison + type, and values. +

    +
    +
    + A labelled screenshot of the right side of the term editor.
    -
    -
    - The right side of the term editor, showing a number range query. -

    A number range query: matching fields will contain a number between one and five. - (Click the angle brackets to toggle equality comparisons).

    -
    -
    - The term editor, showing a geo point query. -

    A geo point query: matching records will have coordinates within five miles of - the specified coordinates.

    -

    NB: geo queries do not use field names. They are based on longitude and - latitude points that are set elsewhere by the resource maintainer. -

    -
    -
    - The term editor, showing a geo polygon query. -

    A geo polygon query: matching records will have coordinates inside the specified - area.

    -
    +
    +

    + Field type is the data type that the field will be read as. Most + queries will use the default "Text" type, but more complex queries may + use the "Number" or "Geo" types. A fourth type, "Any", only has one + comparison type ("exists") and just checks if the field has any content + at all. +

    +

    + Comparison type describes how the field value will be compared to + the query/comparison value. Each field type has different comparison + types available. +

    +

    + Comparison value is the value to which the field values will be + compared. +

    +

    + Display name is entirely optional, but may be useful for + especially complex queries with many terms: it allows you to set a + "friendly" display name for the term, so it will be shown in a more + memorable way. +

    - -

    You can continue adding as many terms as necessary to your query:

    - Three example terms: a text comparison on the field 'collectionCode', a number range comparison on the field 'year', and a term using the display name 'My Complicated Filter'. - -

    2.3.2. Filter Groups

    -

    Groups allow you to link terms and use some boolean logic in your queries. You - can have three types of group: AND (aka 'all of'), OR (aka 'any of'), and NOT (aka 'none - of'). To change the group type, click the name in the top left corner. In the groups - below, the terms are the same but the group type has changed. This drastically changes - the records found. -

    -
    -
    - An 'AND' filter group, containing two filter terms. The background is green and the text at the top says 'all of'. -
    -
    - An 'OR' filter group, containing two filter terms. The background is blue and the text at the top says 'any of'. -
    -
    - A 'NOT' filter group, containing two filter terms. The background is red and the text at the top says 'none of'. -
    +
    +
    +
    + The right side of the term editor, showing a number range query. +

    + A number range query: matching fields will contain a number between one + and five. (Click the angle brackets to toggle equality comparisons). +

    -
      -
    1. - In the first group, each record must match all of the terms; so each record - must have collectionCode=BOT and year=2000. -
    2. -
    3. In the second group, each record can match any of the terms; so each record - must have collectionCode=BOT or year=2000 (or both!). -
    4. -
    5. In the third group, each record must not match any of the terms; so the - records match neither collectionCode=BOT nor year=2000. -
    6. -
    -

    Groups can also be nested under the top level:

    - Two 'all of' groups nested within a 'any of' group. 'All of' group one is searching for 'collectionCode = BOT' and 'year = 2000', while 'all of' group 2 is searching for 'collectionCode = PAL' and 'year = 2008'. -

    This query would search for either botany records from 2000 or - palaeontology records from 2008. -

    -

    NB: when you're using the user interface, the whole query is wrapped in a hidden - "and" group. -

    +
    + The term editor, showing a geo point query. +

    + A geo point query: matching records will have coordinates within five + miles of the specified coordinates. +

    +

    + NB: geo queries do not use field names. They are based on + longitude and latitude points that are set elsewhere by the resource + maintainer. +

    +
    +
    + The term editor, showing a geo polygon query. +

    + A geo polygon query: matching records will have coordinates inside the + specified area. +

    +
    +
    -

    2.3.3. Presets

    -

    Presets are predefined filter terms that are commonly used and/or need to be - dynamically set. There are currently very few of these, but more can be added later. - Please {% link_for _('contact us'), named_route='contact.form' %} if you need one of - these presets added. -

    -

    There are two types of presets: static and dynamic. These are both found in the same - place, so the difference is explained here for interest/clarity's sake more than - anything else.

    -

    A static preset contains the same information every time, e.g. the Birdwing - Butterfly Digitisation will always add a term where project = Birdwing - Butterfly Digitisation . -

    - The term editor for the Birdwing Butterfly Digitisation preset. The project field is selected, the field type is 'text', the comparison type is 'equals', and the comparison value is 'Birdwing Butterfly Digitisation'. -

    Dynamic presets change their value dependent on other factors in the query at - the time they are added. Once added, they act like every other filter term, so try - to add these last if possible. An example is the Has Image preset, which - extracts image fields from the current list of resources and adds an - "exists" term that checks if these fields have content in them. -

    -
    -
    - The term editor for the Has Image preset. Two fields are selected: media and associatedMedia. The field type is 'any' and the comparison type is 'exists'. -

    - In this example, multiple resources with an image field are being searched, so - multiple image fields are added to the term. Not every resource will have an - image field set, and those that do may share field names with other resources, - so the list is likely to be much shorter than the actual list of resources. -

    -
    +

    You can continue adding as many terms as necessary to your query:

    + Three example terms: a text comparison on the field 'collectionCode', a number range comparison on the field 'year', and a term using the display name 'My Complicated Filter'. -
    - The term editor for the Has Image preset. Only one field is selected: associatedMedia. The field type is 'any' and the comparison type is 'exists'. -

    In contrast to the previous image, in this example only one resource with an - image field is being searched (or, all the resources being searched have the - same image field name), so only one field is selected.

    -
    +

    2.3.2. Filter Groups

    +

    + Groups allow you to link terms and use some boolean logic in your + queries. You can have three types of group: AND (aka 'all of'), OR (aka 'any + of'), and NOT (aka 'none of'). To change the group type, click the name in the + top left corner. In the groups below, the terms are the same but the group type + has changed. This drastically changes the records found. +

    +
    +
    + An 'AND' filter group, containing two filter terms. The background is green and the text at the top says 'all of'. +
    +
    + An 'OR' filter group, containing two filter terms. The background is blue and the text at the top says 'any of'. +
    +
    + A 'NOT' filter group, containing two filter terms. The background is red and the text at the top says 'none of'. +
    +
    +
      +
    1. + In the first group, each record must match all of the terms; so + each record must have collectionCode=BOT and year=2000. +
    2. +
    3. + In the second group, each record can match any of the terms; so + each record must have collectionCode=BOT or year=2000 (or both!). +
    4. +
    5. + In the third group, each record must not match any of the terms; so + the records match neither collectionCode=BOT nor year=2000. +
    6. +
    +

    Groups can also be nested under the top level:

    + Two 'all of' groups nested within a 'any of' group. 'All of' group one is searching for 'collectionCode = BOT' and 'year = 2000', while 'all of' group 2 is searching for 'collectionCode = PAL' and 'year = 2008'. +

    + This query would search for either botany records from 2000 or + palaeontology records from 2008. +

    +

    + NB: when you're using the user interface, the whole query is wrapped in a + hidden "and" group. +

    +

    2.3.3. Presets

    +

    + Presets are predefined filter terms that are commonly used and/or need + to be dynamically set. There are currently very few of these, but more can be + added later. Please {% link_for _('contact us'), named_route='contact.form' %} + if you need one of these presets added. +

    +

    + There are two types of presets: static and dynamic. These are both found in the + same place. +

    +

    + A static preset contains the same information every time, e.g. the + Birdwing Butterfly Digitisation will always add a term where + project = Birdwing Butterfly Digitisation . +

    + The term editor for the Birdwing Butterfly Digitisation preset. The project field is selected, the field type is 'text', the comparison type is 'equals', and the comparison value is 'Birdwing Butterfly Digitisation'. +

    + Dynamic presets change their value dependent on other factors in the + query at the time they are added. Once added, they act like every other + filter term, so try to add these last if possible. An example is the + Has Image preset, which extracts image fields from the current list of + resources and adds an "exists" term that checks if these fields + have content in them. +

    +
    +
    + The term editor for the Has Image preset. Two fields are selected: media and associatedMedia. The field type is 'any' and the comparison type is 'exists'. +

    + In this example, multiple resources with an image field are being + searched, so multiple image fields are added to the term. Not every + resource will have an image field set, and those that do may share field + names with other resources, so the list is likely to be much shorter + than the actual list of resources. +

    +
    + The term editor for the Has Image preset. Only one field is selected: associatedMedia. The field type is 'any' and the comparison type is 'exists'. +

    + In contrast to the previous image, in this example only one resource + with an image field is being searched (or, all the resources being + searched have the same image field name), so only one field is selected. +

    +
    +
    -
    -

    3. Results

    -

    3.1. Views

    -

    - The results of a search can be displayed in different ways, termed "views". To change - the view, click the name of the view above the results (see Result View - Switcher in 1. UI Overview). -

    -

    The fields shown in some views (i.e. Table and List) are dynamically selected via an API - method that attempts to guess the "most relevant" fields.

    -

    3.1.1. Table View

    -

    The table view is the default view. It displays the results in tabular form.

    - Labelled screenshot of the table results view. -

    3.1.2. List View

    -

    The list view displays a short summary of each record individually, along with thumbnails - of any associated images (if there are any).

    -

    Clicking on an image brings up the viewer overlay, which displays a larger version and - offers an option to download the image.

    - Labelled screenshot of the list results view. -

    3.1.2. Gallery View

    -

    The gallery view displays all the images associated with records in the search. It does - not show records separately, but simply lists out all available images for each page of - results.

    -

    Clicking on an image brings up the viewer overlay, which displays a larger version and - offers an option to download the image.

    - Labelled screenshot of the gallery results view. - Labelled screenshot of the image viewer overlay. +
    +

    3. Results

    +

    3.1. Views

    +

    + The results of a search can be displayed in different ways, termed "views". To + change the view, click the name of the view above the results (see + Result View Switcher in 1. UI Overview). +

    +

    + The fields shown are based on your query (e.g. if you search for year < 2000, it + will show you year first), some standard columns based on user feedback (e.g. + scientificName, family, typeStatus) and some that are dynamically selected as + having high relevance. The fields shown can be changed in the table view and + will also apply to list view; however, they are reset for each new search. +

    +

    3.1.1. Table View

    +

    The table view is the default view. It displays the results in tabular form.

    + A screenshot of the table results view. There are three buttons at the top left: table, list and gallery. Table is selected. At the top right is a small plus icon. Underneath these is a table with six columns: dataset, resource, record, scientific name, family, and type status. Under the last three column headers there are small buttons (x, arrow left, arrow right). At the left and right sides of the table there are buttons with double left and right arrows. +

    + The first three columns contain links to the dataset, resource, and full details + of the record. The following columns contain a selection of fields summarising + the record. +

    +

    + Existing columns can be removed by clicking the "x" icon underneath the header + and moved left or right by clicking the arrow icons. New columns can be added by + clicking the green plus icon above the table. Note that new columns are added at + the end of the list and may not be visble without scrolling. +

    +

    + The table can be scrolled to the left or right by clicking the tall double arrow + icons at the sides of the table. +

    +

    3.1.2. List View

    +

    + The list view displays a short summary of each record individually, along with + thumbnails of any associated images (if there are any). +

    + A screenshot of one record from the list results view. The name of the specimen is in large text at the top, with two smaller links next to it for the dataset and resource. Underneath, the record details are on the left side and four images are in a small 2 by 2 grid on the right. +

    The item header links to the full record, dataset, and resource.

    +

    + Clicking on an image brings up the viewer overlay, which displays a larger + version and offers an option to download the image. +

    +

    + The fields displayed can be changed by going to table view, changing the + columns, and switching back to list view. +

    +

    3.1.2. Gallery View

    +

    + The gallery view displays all the images associated with records in the search. + It does not show records separately, but simply lists out all available images + for each page of results. +

    + A screenshot of the gallery results view. At the top left is the total number of results with images, with the number of results on this page and the total number of results underneath. Under this there are three tabs: table, list, and gallery. Gallery is selected. At the top right there are three buttons: cite, share, and download. The rest of the image shows a grid of image thumbnails in three columns. Each thumbnail has a caption (the scientific name of the specimen) at the bottom and a small number indicator at the top right. +

    + Not all records will necessarily have images, so the images displayed may not + match the records on previous pages. The header details how many records in your + total result set have available images and are therefore shown in this view. +

    +

    + Many records will also have multiple images, so there will often be more than + 100 images on the page although only 100 records are being represented. The + small number indicator in the top right of each thumbnail shows how many images + are in the record and which number that item is. +

    +

    + Clicking on the caption of the image (usually the scientific name of the + specimen) opens the record. +

    +

    + Clicking on an image brings up the viewer overlay, which displays a larger + version and offers an option to download the image. +

    + A screenshot of the image viewer overlay. The image is in the center of the screen. At the left and right are double arrow icons. At the top left is the image title. At the top right there are three icons: a plus magnifying icon, a cloud download icon, and an x icon. At the bottom there is a licence link. +

    + The image viewer doesn't currently have any features like zooming or other image + manipulation. The magnifying glass icon in the top right opens the image in our + large image viewer, which has all of + these features. +

    +

    The image title at the top links to the main record.

    +

    The cloud download icon lets you download the full size original image.

    +

    The left and right arrows cycle through other images on the page.

    +

    The licence information is at the bottom of the viewer.

    -

    3.2. Buttons

    - The three buttons at the top right of the results view: cite, share, and download. -

    3.2.1. Cite

    -

    The cite button generates a digital object identifier (DOI) for the search, - allowing you to easily cite the results in publications.

    -

    3.2.2. Share

    -

    Similarly to the cite button, the share button also generates a link to the - search; but it is intended for more informal use, such as when sharing a search with a - colleague. It uses three random words to create a memorable short link (with the option - to include the page and view) that can then be shared.

    - The 'share' button popup, showing a link to https://data.nhm.ac.uk/search/future-expensive-pelican. -

    3.2.3. Download

    -

    The download button allows you to request a full download of the set of results in CSV - format. The record data will be automatically packaged up and sent to your email address - when ready.

    -
    -
    -

    4. Troubleshooting

    -

    4.1. Resetting

    -

    This is a good place to start for fixing any UI issues, e.g. menus not loading or popup - boxes dismissing as soon as you click them.

    -
      -
    1. - If you're able to, get a sharing link (see 3.2.2. Share); -
    2. -
    3. - Either go to the sharing link (if you have one) or hard-refresh the page with - CTRL+F5. -
    4. -
    5. - If that still doesn't work, Reset your query, - refresh, and start again. -
    6. -
    -
    -
    -

    As always, if you have any further issues, questions, or suggestions, - please {% link_for _('contact us'), named_route='contact.form' %}. We are also available on - Gitter. +

    3.2. Buttons

    +

    These buttons appear at the top of the results view.

    + The three buttons at the top right of the results view: cite, share, and download. +

    3.2.1. Cite

    +

    + The cite button generates a digital object identifier (DOI) for the + search, allowing you to easily cite the results in publications. +

    +

    3.2.2. Share

    +

    + The share button also generates a link to the search, but it is + intended for more informal use, such as when sharing a search with a colleague. + It uses three random words to create a memorable short link (with the option to + include the view, and page if there are more than 100 results) that can then be + shared. +

    + The 'share' button popup, showing a link to data.nhm.ac.uk/search/coyly-sick-earwig. +

    3.2.3. Download

    +

    The download button allows you to request a full download of the results.

    + The 'download' popup. There is a form with options for the output file type and an expandable section for advanced options. Under this there is another form with options for the notification. At the bottom there is a button labelled 'Request Download'. +

    + Multiple formats are available, and each can be configured. The default option + will create a zip of comma-delimited CSV files, one per resource, skipping any + columns where none of the results have a value. +

    +

    + Because result sets can be very large, these files may need time to be created. + By default, the form will ask you for an email address so that you can be + notified by email when your download is ready, but if you would prefer not to + provide this then you don't have to. You can also send the notification to a + webhook endpoint or select no notification. If you choose this option then + you'll have to make sure you save the URL of the download status page when it + appears, as this will be the only way for you to access your download. +

    +
    +
    +

    4. Troubleshooting

    +

    4.1. Resetting

    +

    + This is a good place to start for fixing any UI issues, e.g. menus not loading + or popup boxes dismissing as soon as you click them.

    +
      +
    1. If you're able to, get a sharing link (see 3.2.2. Share);
    2. +
    3. + Either go to the sharing link (if you have one) or hard-refresh the + page with CTRL+F5. +
    4. +
    5. + If that still doesn't work, Reset your + query, refresh, and start again. +
    6. +
    +
    +
    +

    + As always, if you have any further issues, questions, or suggestions, please {% + link_for _('contact us'), named_route='contact.form' %}. We are also available on + Gitter. +

    {% endblock %} diff --git a/ckanext/nhm/theme/templates/help/snippets/menu.html b/ckanext/nhm/theme/templates/help/snippets/menu.html index f9fd86e1..e5ce0dc3 100644 --- a/ckanext/nhm/theme/templates/help/snippets/menu.html +++ b/ckanext/nhm/theme/templates/help/snippets/menu.html @@ -8,7 +8,8 @@ diff --git a/ckanext/nhm/theme/templates/organization/member_new.html b/ckanext/nhm/theme/templates/organization/member_new.html new file mode 100644 index 00000000..02d281d3 --- /dev/null +++ b/ckanext/nhm/theme/templates/organization/member_new.html @@ -0,0 +1,50 @@ +{% ckan_extends %} + +{% block form %} +
    +
    +
    +
    + {% if not user %} + + {% endif %} +
    + {% if user %} + + + {% else %} + + {% endif %} +
    +
    +
    +
    + +{% if user and user.name == c.user and user_role == 'admin' %} + {% set format_attrs = {'data-module': 'autocomplete', 'disabled': 'disabled'} %} + {{ form.select('role', label=_('Role'), options=roles, selected=user_role, error='', attrs=format_attrs) }} + {{ form.hidden('role', value=user_role) }} +{% else %} + {% set format_attrs = {'data-module': 'autocomplete'} %} + {{ form.select('role', label=_('Role'), options=roles, selected=user_role, error='', attrs=format_attrs) }} +{% endif %} + +
    + {% if user %} + {{ _('Delete') }} + + {% else %} + + {% endif %} +
    +
    +{% endblock %} diff --git a/ckanext/nhm/theme/templates/package/snippets/package_basic_fields.html b/ckanext/nhm/theme/templates/package/snippets/package_basic_fields.html index 2cc54166..f44dc6b2 100644 --- a/ckanext/nhm/theme/templates/package/snippets/package_basic_fields.html +++ b/ckanext/nhm/theme/templates/package/snippets/package_basic_fields.html @@ -14,7 +14,7 @@ {% set dataset_has_organization = data.owner_org or data.group_id %} {% set organizations_available = h.organizations_available('create_dataset') %} {% set user_is_sysadmin = h.check_access('sysadmin') %} - {% set show_organizations_selector = organizations_available and (user_is_sysadmin or dataset_is_draft) %} + {% set show_organizations_selector = organizations_available and organizations_available|length > 1 %} {% set show_visibility_selector = dataset_has_organization or (organizations_available and (user_is_sysadmin or dataset_is_draft)) %} {% if show_organizations_selector and show_visibility_selector %} @@ -32,20 +32,40 @@ {% set existing_org = data.owner_org or data.group_id %} -
    +
    -
    - -
    +
    +
    +
    + +
    + +
    +
    {% endif %} {% endif %} diff --git a/ckanext/nhm/theme/templates/user/organisations.html b/ckanext/nhm/theme/templates/user/organisations.html new file mode 100644 index 00000000..e7ed3152 --- /dev/null +++ b/ckanext/nhm/theme/templates/user/organisations.html @@ -0,0 +1,13 @@ +{% extends "user/read.html" %} + +{% block subtitle %}{{ _('Organisations') }} {{ g.template_title_delimiter }} {{ super() }}{% endblock %} + +{% block primary_content_inner %} +

    + {% block page_heading -%} + {{ _('Organisations') }} + {%- endblock %} +

    + +{% snippet "organization/snippets/organization_list.html", organizations=organizations %} +{% endblock %} diff --git a/ckanext/nhm/theme/templates/user/read_base.html b/ckanext/nhm/theme/templates/user/read_base.html index 2b68cf33..f760695e 100644 --- a/ckanext/nhm/theme/templates/user/read_base.html +++ b/ckanext/nhm/theme/templates/user/read_base.html @@ -52,3 +52,8 @@ {% endblock %}
    {% endblock %} + +{% block content_primary_nav %} + {{ super() }} + {{ h.build_nav_icon('nhm_user.orgs', _('Organisations'), username=user.name, icon='users') }} +{% endblock %}