[ckan-changes] commit/ckanextiati: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Thu Jun 23 16:33:17 UTC 2011
2 new changesets in ckanextiati:
http://bitbucket.org/okfn/ckanextiati/changeset/d4a0c306e138/
changeset: d4a0c306e138
user: amercader
date: 2011-06-23 18:31:07
summary: Revert 905ef3 as it caused to much trouble, just filter the list to avoid empty values
affected #: 3 files (280 bytes)
--- a/ckanext/iati/patch.py Thu Jun 23 14:39:52 2011 +0100
+++ b/ckanext/iati/patch.py Thu Jun 23 17:31:07 2011 +0100
@@ -25,10 +25,7 @@
# TODO move this to helpers proper
def country_name(code):
- if code == "":
- return "(No country assigned)"
- else:
- return dict(COUNTRIES).get(code, code)
+ return dict(COUNTRIES).get(code, code)
def group_title(name):
from ckan import model
@@ -37,12 +34,6 @@
name = group.title
return name
-def type_title(name):
- if name == "":
- return "(No type assigned)"
- else:
- return name
-
def am_authorized_with_publisher(c, action, domain_object=None):
from ckan import model
from ckan.authz import Authorizer
@@ -71,7 +62,6 @@
h.am_authorized_with_publisher = am_authorized_with_publisher
h.country_name = country_name
h.group_title = group_title
-h.type_title = type_title
h.publisher_record_fields = fields
h.my_group = my_group
h.my_group_license = my_group_license
--- a/ckanext/iati/templates/package/search_form.html Thu Jun 23 14:39:52 2011 +0100
+++ b/ckanext/iati/templates/package/search_form.html Thu Jun 23 17:31:07 2011 +0100
@@ -9,10 +9,10 @@
global_query.run(facet_by=g.facets)
global_facets = global_query.facets
- any = ('*', 'Any')
- country_options = [(o, h.country_name(o) + " (%s)" % n) for o, n in global_facets.get('extras_country', {}).items()]
- groups_options = [(o, h.group_title(o) + " (%s)" % n) for o, n in global_facets.get('groups', {}).items()]
- types_options = [(o, h.type_title(o) + " (%s)" % n) for o, n in global_facets.get('groups_types', {}).items()]
+ any = ('', 'Any')
+ country_options = [(o, h.country_name(o) + " (%s)" % n) for o, n in global_facets.get('extras_country', {}).items() if o != ""]
+ groups_options = [(o, h.group_title(o) + " (%s)" % n) for o, n in global_facets.get('groups', {}).items() if o != ""]
+ types_options = [(o, o + " (%s)" % n) for o, n in global_facets.get('groups_types', {}).items() if o != ""]
country_options.sort(key=lambda name: name[1])
country_options.insert(0,any)
@@ -25,15 +25,15 @@
<table border="0" class="facets"><tr><td>Source:</td>
- <td>${h.select('groups_types', dict(c.fields).get('groups_types', '*') if c.facets else '*', types_options)}</td>
+ <td>${h.select('groups_types', dict(c.fields).get('groups_types', '') if c.facets else '', types_options)}</td></tr><tr><td>Publisher:</td>
- <td>${h.select('groups', dict(c.fields).get('groups', '*') if c.facets else '*', groups_options)}</td>
+ <td>${h.select('groups', dict(c.fields).get('groups', '') if c.facets else '', groups_options)}</td></tr><tr><td>Country:</td>
- <td>${h.select('extras_country', dict(c.fields).get('extras_country', '*') if c.facets else '*', country_options)}</td>
+ <td>${h.select('extras_country', dict(c.fields).get('extras_country', '') if c.facets else '', country_options)}</td></tr></table>
--- a/solr/schema.xml Thu Jun 23 14:39:52 2011 +0100
+++ b/solr/schema.xml Thu Jun 23 17:31:07 2011 +0100
@@ -51,7 +51,6 @@
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/><filter class="solr.LowerCaseFilterFactory"/><filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
- <filter class="solr.ReversedWildcardFilterFactory" /></analyzer><analyzer type="query"><tokenizer class="solr.WhitespaceTokenizerFactory"/>
http://bitbucket.org/okfn/ckanextiati/changeset/1301f0364978/
changeset: 1301f0364978
user: amercader
date: 2011-06-23 18:32:55
summary: Minor cosmetic change
affected #: 1 file (2 bytes)
--- a/ckanext/iati/templates/_util_local.html Thu Jun 23 17:31:07 2011 +0100
+++ b/ckanext/iati/templates/_util_local.html Thu Jun 23 17:32:55 2011 +0100
@@ -49,11 +49,11 @@
</div></div><div class="package-result-links">
- ${h.link_to('View Metadata', h.url_for(controller='package', action='read', id=package.name))} |
+ ${h.link_to('View Metadata', h.url_for(controller='package', action='read', id=package.name))}
<py:if test="package.resources">
- ${h.link_to('Download file', package.resources[0].url,target='_blank')} |
+ | ${h.link_to('Download file', package.resources[0].url,target='_blank')}
<py:if test="'iati:preview:%s' % package.resources[0].id in package.extras.keys() and config.get('iati.preview_service','')">
- ${h.link_to('Preview file', config.get('iati.preview_service') % package.resources[0].url, target='_blank')}
+ | ${h.link_to('Preview file', config.get('iati.preview_service') % package.resources[0].url, target='_blank')}
</py:if></py:if></div>
Repository URL: https://bitbucket.org/okfn/ckanextiati/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list