diff --git a/ckanext/harvest/plugin.py b/ckanext/harvest/plugin.py index 5cdf8d2..e3ba231 100644 --- a/ckanext/harvest/plugin.py +++ b/ckanext/harvest/plugin.py @@ -52,6 +52,9 @@ class Harvest(p.SingletonPlugin, DefaultDatasetForm): def package_form(self): return 'source/new_source_form.html' + def search_template(self): + return 'source/search.html' + def new_template(self): return 'source/new.html' diff --git a/ckanext/harvest/templates_new/snippets/source_item.html b/ckanext/harvest/templates_new/snippets/source_item.html new file mode 100644 index 0000000..c9ef735 --- /dev/null +++ b/ckanext/harvest/templates_new/snippets/source_item.html @@ -0,0 +1,39 @@ +{# +Displays a single harvest source result. + +source - A source to display. +item_class - The class name to use on the list item. +hide_resources - If true hides the resources (default: false). +banner - If true displays a popular banner (default: false). +truncate - The length to trucate the description to (default: 180) +truncate_title - The length to truncate the title to (default: 80). + +Example: + + {% snippet 'snippets/source_item.html', source=c.sources[0] %} + +#} +{% set truncate = truncate or 180 %} +{% set truncate_title = truncate_title or 80 %} +{% set title = source.title or source.name %} + +
Try another search term, + browse the sources below or {{ _('add a new one') }}. +
+ {% endif %} +There was an error while searching. Please try again.
+ {% endtrans %} + {% endif %} + + {{ h.snippet('snippets/source_list.html', sources=c.page.items) }} + +