Skip to content

Commit

Permalink
Merge pull request #146 from vrk-kpa/REKDAT-81_pages-only-footer
Browse files Browse the repository at this point in the history
REKDAT-81: Only show ckanext-pages links in footer
  • Loading branch information
bzar authored Dec 7, 2023
2 parents 43bb557 + d90cd39 commit 647ead2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions ckan/ckanext/ckanext-registrydata/ckanext/registrydata/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import iso8601
import requests

from ckan.lib.helpers import build_nav_main as ckan_build_nav_main
from ckanext.pages.plugin import build_pages_nav_main as pages_build_nav_main


log = getLogger(__name__)
_ = toolkit._
Expand Down Expand Up @@ -188,3 +191,10 @@ def scheming_category_list(args):

def check_group_selected(val, data):
return any(x['name'] == val for x in data)


def build_nav_main(*args, pages=False):
if pages:
return pages_build_nav_main(*args)
else:
return ckan_build_nav_main(*args)
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def get_helpers(self):
'get_homepage_news': helpers.get_homepage_news,
'get_homepage_groups': helpers.get_homepage_groups,
'scheming_category_list': helpers.scheming_category_list,
'check_group_selected': helpers.check_group_selected
'check_group_selected': helpers.check_group_selected,
'build_nav_main': helpers.build_nav_main
}

# IValidators:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
<div class="footer-links">
<ul class="nav navbar footer-nav">
{{ h.build_nav_main() }}
{{ h.build_nav_main(pages=True) }}
</ul>
</div>
</div>
Expand Down

0 comments on commit 647ead2

Please sign in to comment.