[ckan-changes] [okfn/ckan] d2ea87: [2347] Following advice from tobes to use h.bool t...
GitHub
noreply at github.com
Fri May 4 10:06:17 UTC 2012
Branch: refs/heads/feature-2347-related-dashboard
Home: https://github.com/okfn/ckan
Commit: d2ea8735a3d01a8135c7635b83f204c92712b878
https://github.com/okfn/ckan/commit/d2ea8735a3d01a8135c7635b83f204c92712b878
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] Following advice from tobes to use h.bool to allow use or more than 1 or 0 in ini file
diff --git a/ckan/templates/package/layout.html b/ckan/templates/package/layout.html
index ae63355..5ff630a 100644
--- a/ckan/templates/package/layout.html
+++ b/ckan/templates/package/layout.html
@@ -34,7 +34,7 @@
</li>
</py:otherwise>
</py:choose>
- <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>
+ <li py:if="h.asbool(config.get('package_show_related', 'true'))" 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 728cbec..523323c 100644
--- a/doc/configuration.rst
+++ b/doc/configuration.rst
@@ -127,11 +127,11 @@ package_show_related
package_show_related::
- package_show_related = 0
+ package_show_related = false
-Default value: 1
+Default value: true
-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.
+When set to false, or no, this setting will hide the related item tab on the package read page. If the value is not set, or is set to true or yes, then the related item tab will shown.
rdf_packages
^^^^^^^^^^^^
================================================================
More information about the ckan-changes
mailing list