Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
Add Organizations to menu bar (#29)
Browse files Browse the repository at this point in the history
* Added organizations to facets

* refactoring

* Added organizations and renamed find data to data

* Added organizations and renamed find data to data

* Defines the top menu nav items

---------

Co-authored-by: toavina <[email protected]>
  • Loading branch information
A-Souhei and toavina authored Sep 10, 2024
1 parent 8fd2333 commit e9c4d25
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
3 changes: 2 additions & 1 deletion ckanext/zarr/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ def update_config(self, config_):
# IFacets
def dataset_facets(self, facet_dict, package_type):
new_fd = OrderedDict()
new_fd['program_area'] = plugins.toolkit._('Program Areas')
new_fd['organization'] = plugins.toolkit._('Organizations')
new_fd['tags'] = plugins.toolkit._('Tags')
new_fd['groups'] = plugins.toolkit._('Topics')
return new_fd

# IResourceController
Expand Down
27 changes: 15 additions & 12 deletions ckanext/zarr/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@
header_title='Zambia Research and<br/>Evaluation Repository' | safe %}
{% endblock %}

{% block nav_items %}
{% if c.userobj %}
{% block nav_items_signed %}
{{ h.build_nav_main(
('organization.index', _('Organizations')),
('dataset.search', _('Data')),
('home.about', _('About')),
('dataset.search', _('Find Data')),
('activity.dashboard', _('My account'))
) }}
{% else %}
{{ h.build_nav_main(
('home.about', _('About')),
('dataset.search', _('Find Data')),
('user.login', _('Log in'))
) }}
{% endif %}
{% endblock %}
{% endblock %}


{% block nav_items_unsigned %}
{{ h.build_nav_main(
('organization.index', _('Organizations')),
('dataset.search', _('Data')),
('home.about', _('About')),
('user.login', _('Log in'))
) }}
{% endblock %}

0 comments on commit e9c4d25

Please sign in to comment.