From: root Date: Wed, 28 May 2014 01:25:52 +0000 Subject: Merge branch 'master' of git+ssh://maxious.lambdacomplex.org/git/ckanext-datagovau X-Git-Url: https://maxious.lambdacomplex.org/git/?p=ckanext-datagovau.git&a=commitdiff&h=e70fa7eec6ad3c261af8ec034d2ea0d0c575cfa6 --- Merge branch 'master' of git+ssh://maxious.lambdacomplex.org/git/ckanext-datagovau --- --- a/ckanext/datagovau/plugin.py +++ b/ckanext/datagovau/plugin.py @@ -24,7 +24,7 @@ def get_related_dataset(related_id): result = model.Session.execute("select dataset_id from related_dataset where related_id =\'"+related_id+"\' limit 1;").first()[0] - return lib.helpers.get_action('package_show',{'id':result}) + return result def related_create(context, data_dict=None): return {'success': False, 'msg': 'No one is allowed to create related items'} --- a/ckanext/datagovau/templates/package/snippets/resource_form.html +++ b/ckanext/datagovau/templates/package/snippets/resource_form.html @@ -21,7 +21,7 @@ {% call form.input(field_url, label=url_label, id='field-image-url', placeholder=placeholder, value=data.get(field_url), error=errors.get(field_url), classes=['control-full']) %} - {% call form.select('autoupdate', label=_('Generate API from this Link'), options= [{'value': 'active', 'text': 'Active'}, {'value': 'inactive', 'text': 'Inactive'}], selected='Active', error=errors.autoupdate) %} + {% call form.select('autoupdate', label=_('Generate API from this Link'), options= [{'value': 'active', 'text': 'Active'}, {'value': 'inactive', 'text': 'Inactive'}], selected='Inactive', error=errors.autoupdate) %}
Where a file is compatible with either CKAN or GeoServer we will attempt to make a functional end-point for this resource. The link provided above will also be checked for a new version based on the update frequency as set at the dataset level.
--- a/ckanext/datagovau/templates/related/snippets/related_item.html +++ b/ckanext/datagovau/templates/related/snippets/related_item.html @@ -22,8 +22,8 @@ {{ h.render_markdown(related.description) }} {% endif %} - {% if h.get_related_dataset(related.id) %} -Using dataset: {{ h.get_related_dataset(related.id).title }} + {% if h.check_access('package_show',{"id":h.get_related_dataset(related.id)}) %} +Using dataset: {{ h.get_action('package_show',{"id":h.get_related_dataset(related.id)}).title }} {% endif %}