[ckan-changes] [okfn/ckan] da0407: [2347] Added config option to hide related and doc...

GitHub noreply at github.com
Fri May 4 08:56:30 UTC 2012


  Branch: refs/heads/feature-2347-related-dashboard
  Home:   https://github.com/okfn/ckan
  Commit: da04077f943dfd83354b74097c5aa09d9ef7fcbc
      https://github.com/okfn/ckan/commit/da04077f943dfd83354b74097c5aa09d9ef7fcbc
  Author: Ross Jones <rossdjones at gmail.com>
  Date:   2012-05-04 (Fri, 04 May 2012)

  Changed paths:
    M ckan/templates/package/layout.html
    M doc/configuration.rst

  Log Message:
  -----------
  [2347] Added config option to hide related and documented it


diff --git a/ckan/templates/package/layout.html b/ckan/templates/package/layout.html
index 3646d0f..ae63355 100644
--- a/ckan/templates/package/layout.html
+++ b/ckan/templates/package/layout.html
@@ -34,8 +34,7 @@
         </li>
       </py:otherwise>
       </py:choose>
-      <li class="${'active' if c.action=='related' else ''}">${h.subnav_link(h.icon('package') + _('Related') + ' (%s)' % c.related_count, controller='related', action='list', id=c.pkg.name)}</li>
-
+      <li py:if="config.get('package_show_related', '1') == '1'" class="${'active' if c.action=='related' else ''}">${h.subnav_link(h.icon('package') + _('Related') + ' (%s)' % c.related_count, controller='related', action='list', id=c.pkg.name)}</li>
 
       <py:if test="h.check_access('package_update',{'id':c.pkg.id})">
         <li class="divider">|</li>
diff --git a/doc/configuration.rst b/doc/configuration.rst
index 7bcc747..728cbec 100644
--- a/doc/configuration.rst
+++ b/doc/configuration.rst
@@ -122,6 +122,17 @@ This sets a space-separated list of extra field key values which will not be sho
 .. index::
    single: rdf_packages
 
+package_show_related
+^^^^^^^^^^^^^^^^^^^^
+
+package_show_related::
+
+ package_show_related = 0
+
+Default value:  1
+
+When set to 0 this setting will hide the related item tab on the package read page. If the value is not set, or is set to 1, then the related item tab will shown.
+
 rdf_packages
 ^^^^^^^^^^^^
 


================================================================



More information about the ckan-changes mailing list