remove extra templates-bs3
This commit is contained in:
parent
ba40b7e0fb
commit
1e228f0992
|
@ -1,9 +0,0 @@
|
|||
{% ckan_extends %}
|
||||
|
||||
{% block styles %}
|
||||
{{ super() }}
|
||||
|
||||
{% set type = 'asset' if h.ckan_version().split('.')[1] | int >= 9 else 'resource' %}
|
||||
{% include 'harvest/snippets/harvest_' ~ type ~ '.html' %}
|
||||
|
||||
{% endblock %}
|
|
@ -1,27 +0,0 @@
|
|||
This is a failure notification of the latest harvest job set-up in {{ site_url }}.
|
||||
Job URL: {{ job_url }}
|
||||
|
||||
Harvest Source: {{ harvest_source_title }}
|
||||
Harvest Configuration: {{ harvest_configuration | safe }}
|
||||
Organization: {{ organization }}
|
||||
|
||||
Harvest Job Id: {{ job_id }}
|
||||
Created: {{ job_created }}
|
||||
Finished: {{ job_finished }}
|
||||
|
||||
Records in Error: {{ records_in_error }}
|
||||
Records Added: {{ records_added }}
|
||||
Records Updated: {{ records_updated }}
|
||||
Records Deleted: {{ records_deleted }}
|
||||
|
||||
{{ error_summary_title }}: {{ errors|length }} errors
|
||||
|
||||
{{ job_errors_title }}: {{ job_errors|length }}
|
||||
{% for error in job_errors %}
|
||||
- {{ error }} {% endfor %}
|
||||
{{ obj_errors_title }}: {{ obj_errors|length }}
|
||||
{% for error in obj_errors %}
|
||||
- {{ error }} {% endfor %}
|
||||
--
|
||||
You are receiving this email because you are currently set-up as Administrator for {{ site_url }}.
|
||||
Please do not reply to this email as it was sent from a non-monitored address.
|
|
@ -1,29 +0,0 @@
|
|||
This is a summary of the latest harvest job set-up in {{ site_url }}.
|
||||
Job URL: {{ job_url }}
|
||||
|
||||
Harvest Source: {{ harvest_source_title }}
|
||||
Harvest Configuration: {{ harvest_configuration | safe }}
|
||||
|
||||
Organization: {{ organization }}
|
||||
|
||||
Harvest Job Id: {{ job_id }}
|
||||
Created: {{ job_created }}
|
||||
Finished: {{ job_finished }}
|
||||
|
||||
Records in Error: {{ records_in_error }}
|
||||
Records Added: {{ records_added }}
|
||||
Records Updated: {{ records_updated }}
|
||||
Records Deleted: {{ records_deleted }}
|
||||
|
||||
{{ error_summary_title }}: {{ errors|length }} errors
|
||||
{{ job_errors_title }}: {{ job_errors|length }}
|
||||
{% for error in job_errors %}
|
||||
- {{ error }} {% endfor %}
|
||||
|
||||
{{ obj_errors_title }}: {{ obj_errors|length }}
|
||||
{% for error in obj_errors %}
|
||||
- {{ error }} {% endfor %}
|
||||
|
||||
--
|
||||
You are receiving this email because you are currently set-up as Administrator for {{ site_url }}.
|
||||
Please do not reply to this email as it was sent from a non-monitored address.
|
|
@ -1 +0,0 @@
|
|||
{% asset 'ckanext-harvest/harvest_css' %}
|
|
@ -1 +0,0 @@
|
|||
{% asset 'harvest-extra-field/main' %}
|
|
@ -1 +0,0 @@
|
|||
{% resource 'harvest-extra-field/main' %}
|
|
@ -1 +0,0 @@
|
|||
{% resource 'ckanext-harvest/styles/harvest.css' %}
|
|
@ -1,9 +0,0 @@
|
|||
{% set authorized_user = h.check_access('harvest_source_create') %}
|
||||
|
||||
{% if authorized_user %}
|
||||
<a href="{{ h.url_for('{0}_new'.format(dataset_type)) }}" class="btn btn-primary">
|
||||
<i class="fa fa-plus-square icon-plus-sign-alt"></i>
|
||||
{{ _('Add Harvest Source') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
{#
|
||||
Displays information for a particular harvest job, including:
|
||||
|
||||
* counts for added, updated, deleted or errored datasets
|
||||
* table with general details
|
||||
* table with a summary of the most common errors on this job
|
||||
|
||||
job - dictized harvest job object
|
||||
|
||||
Example:
|
||||
|
||||
{% snippet 'snippets/job_details.html', job=job %}
|
||||
|
||||
#}
|
||||
|
||||
{% set stats = job.stats %}
|
||||
|
||||
{% if job.status == 'Finished' %}
|
||||
<p>
|
||||
<span class="label label-important" data-diff="error">
|
||||
{% if 'errored' in stats and stats['errored'] > 0 %}
|
||||
{{ stats['errored'] }}
|
||||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
{{ _('errors') }}
|
||||
</span>
|
||||
{% for action in ['added', 'updated', 'deleted', 'not modified'] %}
|
||||
<span class="label" data-diff="{{ action }}">
|
||||
{% if action in stats and stats[action] > 0 %}
|
||||
{{ stats[action] }}
|
||||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
{{ _(action) }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h3 class="hide-heading">{{ _('Details') }}</h3>
|
||||
<table class="table table-striped table-bordered table-condensed">
|
||||
<colgroup>
|
||||
<col width="15">
|
||||
<col width="85">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>{{ _('Id') }}</th>
|
||||
<td>{{ job.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ _('Created') }}</th>
|
||||
<td>
|
||||
<span class="automatic-local-datetime" data-datetime="{{ h.render_datetime(job.created, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
|
||||
{{ h.render_datetime(job.created, with_hours=True) }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ _('Started') }}</th>
|
||||
<td>
|
||||
<span class="automatic-local-datetime" data-datetime="{{ h.render_datetime(job.gather_started, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
|
||||
{{ h.render_datetime(job.gather_started, with_hours=True) }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ _('Finished') }}</th>
|
||||
<td>
|
||||
<span class="automatic-local-datetime" data-datetime="{{ h.render_datetime(job.finished, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
|
||||
{{ h.render_datetime(job.finished, with_hours=True) }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ _('Status') }}</th>
|
||||
<td>{{ _(job.status) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
{#
|
||||
Displays a table with a summary of the most common errors for a job
|
||||
|
||||
error_summary - List of tuples with (message, count)
|
||||
|
||||
Example:
|
||||
|
||||
{% snippet 'snippets/job_error_summary.html', summary=job.object_error_summary %}
|
||||
|
||||
#}
|
||||
<table class="table table-striped table-bordered table-condensed harvest-error-summary">
|
||||
<colgroup>
|
||||
<col width="8">
|
||||
<col width="92">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="count">{{ _('Count') }}</th>
|
||||
<th>{{ _('Message') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for error in summary %}
|
||||
<tr>
|
||||
<td class="count">{{ error[1] }}</td>
|
||||
<td>{{ error[0] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
<p class="empty">{% trans %}There are no datasets associated to this harvest source.{% endtrans %}</p>
|
|
@ -1,8 +0,0 @@
|
|||
{% ckan_extends %}
|
||||
|
||||
{% if type == 'harvest' %}
|
||||
{% set text_query = ungettext('{number} harvest source found for "{query}"', '{number} harvest sources found for "{query}"', count) %}
|
||||
{% set text_query_none = _('Sorry no harvest sources found for "{query}"') %}
|
||||
{% set text_no_query = ungettext('{number} harvest source found', '{number} harvest sources found', count) %}
|
||||
{% set text_no_query_none = _('Sorry no harvest sources found') %}
|
||||
{%- endif -%}
|
|
@ -1,51 +0,0 @@
|
|||
{#
|
||||
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).
|
||||
show_organization - Boolean on whether to show the related organization
|
||||
|
||||
Example:
|
||||
|
||||
{% snippet 'snippets/source_item.html', source=sources[0] %}
|
||||
|
||||
#}
|
||||
{% set truncate = truncate or 180 %}
|
||||
{% set truncate_title = truncate_title or 80 %}
|
||||
{% set title = source.title or source.name %}
|
||||
{% set source_type = h.get_pkg_dict_extra(source, 'source_type') %}
|
||||
{% set url = h.url_for('harvest_admin', id=source.name) if within_organization else h.url_for('harvest_read', id=source.name) %}
|
||||
|
||||
<li class="{{ item_class or "dataset-item" }}">
|
||||
<div class="dataset-content">
|
||||
<h3 class="dataset-heading">
|
||||
{{ h.link_to(h.truncate(title, truncate_title), url) }}
|
||||
{% if source.get(state, '').startswith('draft') %}
|
||||
<span class="label label-info">{{ _('Draft') }}</span>
|
||||
{% elif source.get(state, '').startswith('deleted') %}
|
||||
<span class="label label-important">{{ _('Deleted') }}</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
|
||||
{% if source.notes %}
|
||||
<p>{{ source.notes }}</p>
|
||||
{% else %}
|
||||
<p class="empty">{{ _('There is no description for this harvest source') }}</p>
|
||||
{% endif %}
|
||||
|
||||
<p class="muted">
|
||||
{% if source.status %}
|
||||
{{ _('Datasets') }}: {{ source.status.total_datasets }}
|
||||
{% endif %}
|
||||
{% if not within_organization and source.organization %}
|
||||
— {{ _('Organization') }}: {{ h.link_to(source.organization.title or source.organization.name, h.url_for('organization_read', id=source.organization.name)) }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{#
|
||||
Displays a list of harvest sources.
|
||||
|
||||
sources - A list of harvest sources to display.
|
||||
list_class - The class name for the list item.
|
||||
item_class - The class name to use on each 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/sources_list.html', sources=sources %}
|
||||
|
||||
#}
|
||||
{% if sources %}
|
||||
<ul class="{{ list_class or 'dataset-list unstyled list-unstyled' }}">
|
||||
{% for source in sources %}
|
||||
{% snippet 'snippets/source_item.html', source=source, item_class=item_class, hide_resources=hide_resources, banner=banner, truncate=truncate, truncate_title=truncate_title, within_organization=within_organization %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{% extends "source/read_base.html" %}
|
||||
|
||||
{% block primary_content_inner %}
|
||||
<section class="module-content">
|
||||
<h1>{{ harvest_source.title or harvest_source.name }}</h1>
|
||||
{% if harvest_source.notes %}
|
||||
<p>{{ h.markdown_extract(harvest_source.notes)|urlize }}</p>
|
||||
{% else %}
|
||||
<p class="empty">{{ _('There is no description for this harvest source') }}</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% snippet "package/snippets/additional_info.html", pkg_dict=harvest_source %}
|
||||
{% endblock %}
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "source/admin_base.html" %}
|
||||
|
||||
{% block primary_content_inner %}
|
||||
<section class="module-content">
|
||||
<h1>{{ _('Last Harvest Job') }}</h1>
|
||||
{% if harvest_source.status and harvest_source.status.last_job %}
|
||||
{% snippet "snippets/job_details.html", job=harvest_source.status.last_job %}
|
||||
<div class="form-actions">
|
||||
<a href="{{ h.url_for('harvest_job_show_last', source=harvest_source.name) }}" class="btn pull-right btn-default">
|
||||
<i class="fa fa-briefcase icon-briefcase"></i>
|
||||
{{ _('View full job report') }}
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="empty">{{ _('No jobs yet for this source') }}</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
|
@ -1,64 +0,0 @@
|
|||
{% extends "source/read_base.html" %}
|
||||
|
||||
{% block breadcrumb_content_root_selected %}{% endblock %}
|
||||
|
||||
{% block breadcrumb_content %}
|
||||
{{ super() }}
|
||||
<li class="active"><a href="">{{ _('Admin') }}</a></li>
|
||||
{% endblock %}
|
||||
|
||||
{% block action_links %}
|
||||
{% if harvest_source.status and harvest_source.status.last_job and (harvest_source.status.last_job.status == 'New' or harvest_source.status.last_job.status == 'Running') %}
|
||||
<a class="btn btn-default disabled" rel="tooltip" title="There already is an unrun job for this source"><i class="fa fa-lg fa-refresh icon-refresh icon-large"></i> Reharvest</a>
|
||||
{% else %}
|
||||
{% set locale = h.dump_json({'content': _('This will re-run the harvesting for this source. Any updates at the source will overwrite the local datasets. Sources with a large number of datasets may take a significant amount of time to finish harvesting. Please confirm you would like us to start reharvesting.')}) %}
|
||||
|
||||
<a href="{{ h.url_for('harvest_refresh', id=harvest_source.id) }}" class="btn btn-default" data-module="confirm-action" data-module-i18n="{{ locale }}"
|
||||
title="{{ _('Start a new harvesting job for this harvest source now') }}">
|
||||
<i class="fa fa-refresh icon-refresh"></i>
|
||||
{{ _('Reharvest') }}
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
{% if harvest_source.status and harvest_source.status.last_job and (harvest_source.status.last_job.status == 'Running') %}
|
||||
|
||||
<a href="{{ h.url_for('harvest_job_abort', source=harvest_source.name, id=harvest_source.status.last_job.id) }}" class="btn btn-default" title="Stop this Job">
|
||||
<i class="fa fa-ban icon-ban-circle"></i>
|
||||
{{ _('Stop') }}
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
{% set locale = h.dump_json({'content': _('Warning: This will remove all datasets for this source, as well as all previous job reports. Are you sure you want to continue?')}) %}
|
||||
|
||||
<a href="{{ h.url_for('harvest_clear', id=harvest_source.id) }}" class="btn btn-default" data-module="confirm-action" data-module-i18n="{{ locale }}"
|
||||
title="{{ _('Delete all harvest jobs and existing datasets from this source') }}">
|
||||
{{ _('Clear') }}
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<a href="{{ h.url_for('{0}_read'.format(c.dataset_type), id=harvest_source.id) }}" class="btn btn-default">
|
||||
<i class="fa fa-eye eye-open"></i>
|
||||
{{ _('View harvest source') }}
|
||||
</a>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{# CKAN 2.0 #}
|
||||
{% block actions_content %}
|
||||
{{ self.action_links() }}
|
||||
{% endblock %}
|
||||
|
||||
{# CKAN 2.1 #}
|
||||
{% block content_action %}
|
||||
<div class="content_action btn-group">
|
||||
{{ self.action_links() }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header_tabs %}
|
||||
{{ h.build_nav_icon('{0}_admin'.format(c.dataset_type), _('Dashboard'), id=harvest_source.name, icon='dashboard') }}
|
||||
{{ h.build_nav_icon('harvest_job_list'.format(c.dataset_type), _('Jobs'), source=harvest_source.name, icon='reorder') }}
|
||||
{{ h.build_nav_icon('{0}_edit'.format(c.dataset_type), _('Edit'), id=harvest_source.name, icon='edit') }}
|
||||
{% endblock %}
|
|
@ -1,24 +0,0 @@
|
|||
{% extends "page.html" %}
|
||||
{% set harvest_source = harvest_source or h.get_harvest_source() %}
|
||||
{% if harvest_source %}
|
||||
{% set authorized_user = h.check_access('harvest_source_update', {'id':harvest_source.id }) %}
|
||||
{% else %}
|
||||
{% set authorized_user = h.check_access('harvest_source_create') %}
|
||||
{% endif %}
|
||||
|
||||
{% block subtitle %}{{ harvest_source.title or harvest_source.name }}{% endblock %}
|
||||
|
||||
{% block breadcrumb_content_root_selected %} class="active"{% endblock %}
|
||||
|
||||
{% block breadcrumb_content %}
|
||||
{% if harvest_source.organization %}
|
||||
{% set org = harvest_source.organization %}
|
||||
<li>{{ h.nav_link(_('Organizations'), named_route='organizations_index') }}</li>
|
||||
<li>{{ h.nav_link(org.title or org.name|truncate(10), named_route='organization_read', id=org.name) }}</li>
|
||||
<li>{{ h.nav_link(_('Harvest Sources'), named_route='{0}_search'.format(c.dataset_type)) }}</li>
|
||||
<li{{ self.breadcrumb_content_root_selected() }}>{{ h.nav_link(harvest_source.title|truncate(10), named_route='{0}_read'.format(c.dataset_type), id=harvest_source.name) }}</li>
|
||||
{% else %}
|
||||
<li>{{ h.nav_link(_('Harvest Sources'), named_route='{0}_search'.format(c.dataset_type)) }}</li>
|
||||
<li{{ self.breadcrumb_content_root_selected() }}>{{ h.nav_link(harvest_source.title|truncate(30), named_route='{0}_read'.format(c.dataset_type), id=harvest_source.name) }}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -1,17 +0,0 @@
|
|||
{% extends "source/admin_base.html" %}
|
||||
|
||||
{% block subtitle %}{{ _('Edit harvest source') }}{% endblock %}
|
||||
|
||||
{% block primary_content_inner %}
|
||||
|
||||
<div class="module-content">
|
||||
{% block form %}
|
||||
{% if c.form %}
|
||||
{# CKAN < 2.3 #}
|
||||
{{ c.form | safe }}
|
||||
{% else %}
|
||||
{{- h.snippet(form_snippet, c=c, **form_vars) -}}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,67 +0,0 @@
|
|||
{% extends "source/admin_base.html" %}
|
||||
|
||||
|
||||
{% block subtitle %}{{ _('Harvest Jobs')}} - {{ super() }}{% endblock %}
|
||||
|
||||
{% block primary_content_inner %}
|
||||
<div class="module-content">
|
||||
|
||||
<h1 class="results">{{ _('Harvest Jobs') }}</h1>
|
||||
|
||||
{% if jobs|length == 0 %}
|
||||
<p class="empty">{{ _('No jobs yet for this source') }}</p>
|
||||
{% else %}
|
||||
<ul class="dataset-list unstyled">
|
||||
{% for job in jobs %}
|
||||
<li class="dataset-item">
|
||||
<div class="dataset-content">
|
||||
<h3 class="dataset-heading">
|
||||
<a href="{{ h.url_for('harvest_job_show', source=harvest_source.name, id=job.id) }}">
|
||||
{{ _('Job: ') }} {{ job.id }}
|
||||
</a>
|
||||
{% if job.status != 'Finished' %}
|
||||
<span class="label">{{ job.status }}</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<p>
|
||||
{{ _('Started:') }}
|
||||
<span class="automatic-local-datetime" data-datetime="{{ h.render_datetime(job.gather_started, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
|
||||
{{ h.render_datetime(job.gather_started, with_hours=True) or _('Not yet') }}
|
||||
</span>
|
||||
—
|
||||
{{ _('Finished:') }}
|
||||
<span class="automatic-local-datetime" data-datetime="{{ h.render_datetime(job.finished, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
|
||||
{{ h.render_datetime(job.finished, with_hours=True) or _('Not yet') }}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
{% if job.status == 'Finished' %}
|
||||
<ul class="dataset-resources unstyled">
|
||||
{% if 'errored' in job.stats and job.stats['errored'] > 0 %}
|
||||
<li>
|
||||
<span class="label label-important" data-diff="error">
|
||||
{{ job.stats['errored'] }} {{ _('errors') }}
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% for action in ['added', 'updated', 'deleted', 'not modified'] %}
|
||||
<li>
|
||||
<span class="label" data-diff="{{ action }}" title="{{ _(action) }}">
|
||||
{% if action in job.stats and job.stats[action] > 0 %}
|
||||
{{ job.stats[action] }}
|
||||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
{{ _(action) }}
|
||||
</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,95 +0,0 @@
|
|||
{% extends "source/admin_base.html" %}
|
||||
|
||||
{% block subtitle %}{{ _('Job Report') }} - {{ super() }}{% endblock %}
|
||||
|
||||
{% block primary_content_inner %}
|
||||
<div class="module-content">
|
||||
|
||||
<p class="pull-right">
|
||||
{{ h.nav_link(_('Back to job list'), named_route='harvest_job_list', source=harvest_source.name, class_='btn btn-default', icon='arrow-left')}}
|
||||
</p>
|
||||
|
||||
<h1>{{ _('Job Report') }}</h1>
|
||||
{% snippet 'snippets/job_details.html', job=job %}
|
||||
|
||||
{% if job.status == 'Finished' %}
|
||||
|
||||
{% if job.object_error_summary|length == 0 and job.gather_error_summary|length == 0 %}
|
||||
<h2>{{ _('Error Summary') }}</h2>
|
||||
<p class="empty">{{ _('No errors for this job') }}</p>
|
||||
{% else %}
|
||||
<h2>
|
||||
{{ _('Error Summary') }}
|
||||
<small>{{ _('Only the 20 most frequent errors are shown') }}</small>
|
||||
</h2>
|
||||
{% if job.gather_error_summary|length > 0 %}
|
||||
<h3>{{ _('Job Errors') }}</h3>
|
||||
{% snippet 'snippets/job_error_summary.html', summary=job.gather_error_summary %}
|
||||
{% endif %}
|
||||
{% if job.object_error_summary|length > 0 %}
|
||||
<h3>{{ _('Document Errors') }}</h3>
|
||||
{% snippet 'snippets/job_error_summary.html', summary=job.object_error_summary %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if job_report.gather_errors|length > 0 or job_report.object_errors.keys()|length > 0 %}
|
||||
<h2>
|
||||
{{ _('Error Report') }}
|
||||
</h2>
|
||||
{% if job_report.gather_errors|length > 0 %}
|
||||
<h3>{{ _('Job Errors') }}</h3>
|
||||
<table class="table table-bordered table-hover harvest-error-list">
|
||||
<tbody>
|
||||
{% for error in job_report.gather_errors %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="error">
|
||||
{{ error.message }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if job_report.object_errors.keys()|length > 0 %}
|
||||
<h3>{{ _('Document Errors') }}
|
||||
<small>{{ job_report.object_errors.keys()|length}} {{ _('documents with errors') }}</small>
|
||||
</h3>
|
||||
<table class="table table-bordered table-hover harvest-error-list">
|
||||
<tbody>
|
||||
{% for harvest_object_id in job_report.object_errors.keys() %}
|
||||
{% set object = job_report.object_errors[harvest_object_id] %}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="btn-group pull-right">
|
||||
{% if 'original_url' in object%}
|
||||
<a href="{{ object.original_url }}" class="btn btn-small">
|
||||
{{ _('Remote content') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{{ h.url_for('harvest_object_show', id=harvest_object_id) }}" class="btn btn-small">
|
||||
{{ _('Local content') }}
|
||||
</a>
|
||||
|
||||
</span>
|
||||
<h5>{{ object.guid }}</h5>
|
||||
{% for error in object.errors %}
|
||||
<div class="error">
|
||||
{{ error.message }}
|
||||
{% if error.line %}
|
||||
<span class="line">(line {{ error.line }})</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -1,40 +0,0 @@
|
|||
{% extends "source/admin_base.html" %}
|
||||
|
||||
{% block breadcrumb_content %}
|
||||
<li>{{ h.nav_link(_('Harvest Sources'), named_route='{0}_search'.format(c.dataset_type)) }}</li>
|
||||
<li class="active">{{ h.nav_link(_('Create Harvest Source'), named_route='{0}_new'.format(c.dataset_type)) }}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block actions_content %}
|
||||
{% endblock %}
|
||||
|
||||
{% block subtitle %}{{ _('Create harvest source') }}{% endblock %}
|
||||
|
||||
{% block primary_content %}
|
||||
<section class="module">
|
||||
<div class="module-content">
|
||||
{% if c.form %}
|
||||
{# CKAN < 2.3 #}
|
||||
{{ c.form | safe }}
|
||||
{% else %}
|
||||
{{- h.snippet(form_snippet, c=c, **form_vars) -}}
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block secondary_content %}
|
||||
<section class="module module-narrow">
|
||||
<h2 class="module-heading"><i class="fa fa-lg fa-info-circle icon-large icon-info-sign"></i> {{ _('Harvest sources') }}</h2>
|
||||
<div class="module-content">
|
||||
<p>
|
||||
{% trans %}
|
||||
Harvest sources allow importing remote metadata into this catalog.
|
||||
Remote sources can be other catalogs such as other CKAN instances, CSW
|
||||
servers or Web Accessible Folders (WAF) (depending on the actual
|
||||
harvesters enabled for this instance).
|
||||
{% endtrans %}
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
|
@ -1,121 +0,0 @@
|
|||
{% import 'macros/form.html' as form %}
|
||||
|
||||
|
||||
{% set type = 'asset' if h.ckan_version().split('.')[1] | int >= 9 else 'resource' %}
|
||||
{% include 'harvest/snippets/harvest_extra_field_' ~ type ~ '.html' %}
|
||||
|
||||
<form id="source-new" class="form-horizontal dataset-form {{ h.bootstrap_version() }}" method="post" >
|
||||
|
||||
{% block errors %}{{ form.errors(error_summary) }}{% endblock %}
|
||||
|
||||
{% call form.input('url', id='field-url', label=_('URL'), value=data.url, error=errors.url, classes=['control-full', 'control-large']) %}
|
||||
<span class="info-block">
|
||||
{{ _('This should include the http:// part of the URL') }}
|
||||
</span>
|
||||
{% endcall %}
|
||||
|
||||
{{ form.input('title', id='field-title', label=_('Title'), placeholder=_('eg. A descriptive title'), value=data.title, error=errors.title, classes=['control-full'], attrs={'data-module': 'slug-preview-target'}) }}
|
||||
|
||||
{% set prefix = 'harvest' %}
|
||||
{% set domain = h.url_for('{0}_read'.format(c.dataset_type), id='', qualified=true) %}
|
||||
{% set domain = domain|replace("http://", "")|replace("https://", "") %}
|
||||
{% set attrs = {'data-module': 'slug-preview-slug', 'data-module-prefix': domain, 'data-module-placeholder': '<harvest-source>'} %}
|
||||
|
||||
{{ form.prepend('name', id='field-name', label=_('Name'), prepend=prefix, placeholder=_('eg. my-dataset'), value=data.name, error=errors.name, attrs=attrs) }}
|
||||
|
||||
{{ form.markdown('notes', id='field-notes', label=_('Description'), value=data.notes, error=errors.notes) }}
|
||||
|
||||
<div class="harvest-types form-group control-group">
|
||||
<label class="control-label">Source type</label>
|
||||
<div class="controls">
|
||||
{% for harvester in h.harvesters_info() %}
|
||||
{% set checked = False %}
|
||||
{# select first option if nothing in data #}
|
||||
{% if data.source_type == harvester['name'] or (not data.source_type and loop.first) %}
|
||||
{% set checked = True %}
|
||||
{% endif %}
|
||||
<label class="radio">
|
||||
<input type="radio" name="source_type" value="{{ harvester['name'] }}" {{ "checked " if checked }} data-module="harvest-type-change">
|
||||
{{ harvester['title'] }}
|
||||
<i class="fa fa-question-circle icon-question-sign muted" title="{{ harvester['description'] }}" data-toggle="tooltip"></i>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form.select('frequency', id='field-frequency', label=_('Update frequency'), options=h.harvest_frequencies(), selected=data.frequency, error=errors.frequency) }}
|
||||
|
||||
{% block extra_config %}
|
||||
{{ form.textarea('config', id='field-config', label=_('Configuration'), value=data.config, error=errors.config) }}
|
||||
{% endblock extra_config %}
|
||||
|
||||
{# if we have a default group then this wants remembering #}
|
||||
{% if data.group_id %}
|
||||
<input type="hidden" name="groups__0__id" value="{{ data.group_id }}" />
|
||||
{% endif %}
|
||||
|
||||
{% set dataset_is_draft = data.get('state', 'draft').startswith('draft') or data.get('state', 'none') == 'none' %}
|
||||
{% set dataset_has_organization = data.owner_org or data.group_id %}
|
||||
{% set organizations_available = h.organizations_available('create_dataset') %}
|
||||
{% set user_is_sysadmin = h.check_access('sysadmin') %}
|
||||
{% set show_organizations_selector = organizations_available and (user_is_sysadmin or dataset_is_draft) %}
|
||||
|
||||
{% if show_organizations_selector %}
|
||||
{% set existing_org = data.owner_org %}
|
||||
<div class="control-group form-group">
|
||||
<label for="field-organizations" class="control-label">{{ _('Organization') }}</label>
|
||||
<div class="controls">
|
||||
<select id="field-organizations" name="owner_org" data-module="autocomplete">
|
||||
<option value="" {% if not selected_org and data.id %} selected="selected" {% endif %}>{{ _('No organization') }}</option>
|
||||
{% for organization in organizations_available %}
|
||||
{# get out first org from users list only if there is not an existing org #}
|
||||
{% set selected_org = (existing_org and existing_org == organization.id) or (not existing_org and not data.id and organization.id == organizations_available[0].id) %}
|
||||
<option value="{{ organization.id }}" {% if selected_org %} selected="selected" {% endif %}>{{ organization.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if data.get('id', None) and h.check_access('harvest_source_delete', {'id': data.id}) and data.get('state', 'none') == 'deleted' %}
|
||||
<div class="control-group">
|
||||
<label for="field-state" class="control-label">{{ _('State') }}</label>
|
||||
<div class="controls">
|
||||
<select id="field-state" name="state">
|
||||
<option value="active" {% if data.get('state', 'none') == 'active' %} selected="selected" {% endif %}>{{ _('Active') }}</option>
|
||||
<option value="deleted" {% if data.get('state', 'none') == 'deleted' %} selected="selected" {% endif %}>{{ _('Deleted') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<p class="form-actions">
|
||||
{% block delete_button %}
|
||||
{% if data.get('id', None) and h.check_access('harvest_source_delete', {'id': data.id}) and not data.get('state', 'none') == 'deleted' %}
|
||||
{% set locale_delete = h.dump_json({'content': _('This will flag the source as deleted but keep all its datasets and previous jobs. Are you sure you want to delete this harvest source?')}) %}
|
||||
{% set locale_clear = h.dump_json({'content': _('Warning: Apart from deleting this source, this command will remove all its datasets, as well as all previous job reports. Are you sure you want to continue?')}) %}
|
||||
<div class="dropdown btn-group">
|
||||
<a href="#" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
|
||||
{{ _('Delete') }}
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="{% url_for 'harvest_delete', id=data.name %}" data-module="confirm-action" data-module-i18n="{{ locale_delete }}">
|
||||
{{ _('Delete source') }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url_for 'harvest_delete', id=data.name %}?clear=True" data-module="confirm-action" data-module-i18n="{{ locale_clear }}">
|
||||
{{ _('Delete and clear source') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
<input id="save" name="save" value="Save" type="submit" class="btn btn-primary pull-right">
|
||||
</p>
|
||||
|
||||
</form>
|
|
@ -1,8 +0,0 @@
|
|||
{% extends "source/read_base.html" %}
|
||||
|
||||
{% block primary_content_inner %}
|
||||
<section class="module-content">
|
||||
<h1 class="hide-heading">{{ _('Datasets') }}</h1>
|
||||
{{ h.package_list_for_source(harvest_source.id) }}
|
||||
</section>
|
||||
{% endblock %}
|
|
@ -1,58 +0,0 @@
|
|||
{% extends "source/base.html" %}
|
||||
|
||||
{% block admin_link %}
|
||||
{% if h.check_access('harvest_source_update', {'id':harvest_source.id }) %}
|
||||
{{ h.nav_link(_('Admin'), named_route='{0}_admin'.format(c.dataset_type), id=harvest_source.name, class_='btn btn-primary', icon='wrench')}}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{# CKAN 2.0 #}
|
||||
{% block actions_content %}
|
||||
{% if authorized_user %}
|
||||
<li>{{ self.admin_link() }}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{# TODO: once #354 is merged in CKAN core .profile-info doesn't exist #}
|
||||
{% block secondary_content %}
|
||||
<div class="module context-info profile-info">
|
||||
<section class="module-content">
|
||||
<h1 class="heading">{{ harvest_source.title }}</h1>
|
||||
{% if harvest_source.notes %}
|
||||
<p>
|
||||
{{ h.markdown_extract(harvest_source.notes, 180) }}
|
||||
{{ h.nav_link(_('read more'), named_route='{0}_about'.format(c.dataset_type), id=harvest_source.name) }}
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="empty">{{ _('There is no description for this harvest source') }}</p>
|
||||
{% endif %}
|
||||
<div class="nums">
|
||||
<dl>
|
||||
<dt>{{ _('Datasets') }}</dt>
|
||||
<dd>{{ h.package_count_for_source(harvest_source.id) }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block primary_content %}
|
||||
<article class="module prose">
|
||||
{% block page_header %}
|
||||
<header class="module-content page-header">
|
||||
{% block content_action %}
|
||||
<div class="content_action">
|
||||
{{ self.admin_link() }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
<ul class="nav nav-tabs">
|
||||
{% block page_header_tabs %}
|
||||
{{ h.build_nav_icon('{0}_read'.format(c.dataset_type), _('Datasets'), id=harvest_source.name, icon='sitemap') }}
|
||||
{{ h.build_nav_icon('{0}_about'.format(c.dataset_type), _('About'), id=harvest_source.name, icon='info-sign') }}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</header>
|
||||
{% endblock %}
|
||||
{% block primary_content_inner %}{% endblock %}
|
||||
</article>
|
||||
{% endblock %}
|
|
@ -1,69 +0,0 @@
|
|||
{% extends "page.html" %}
|
||||
|
||||
{% block subtitle %}{{ _("Harvest sources") }}{% endblock %}
|
||||
|
||||
|
||||
{% block breadcrumb_content %}
|
||||
<li class="active">{{ h.nav_link(_('Harvest Sources'), named_route='{0}_search'.format(c.dataset_type)) }}</li>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% if g.ckan_base_version.startswith('2.0') %}
|
||||
{# CKAN 2.0 #}
|
||||
|
||||
{% block add_action_content %}
|
||||
{{ h.snippet('snippets/add_source_button.html', dataset_type=c.dataset_type) }}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% block primary_content %}
|
||||
{% if g.ckan_base_version.startswith('2.0') %}
|
||||
{# CKAN 2.0 #}
|
||||
|
||||
{% include 'source/search_2.0.html' %}
|
||||
|
||||
{% else %}
|
||||
{# > CKAN 2.0 #}
|
||||
|
||||
<section class="module">
|
||||
<div class="module-content">
|
||||
{% block page_primary_action %}
|
||||
<div class="page_primary_action">
|
||||
{{ h.snippet('snippets/add_source_button.html', dataset_type=c.dataset_type) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% set facets = {
|
||||
'fields': c.fields_grouped,
|
||||
'search': c.search_facets,
|
||||
'titles': c.facet_titles,
|
||||
'translated_fields': c.translated_fields,
|
||||
'remove_field': c.remove_field }
|
||||
%}
|
||||
{% set sorting = [
|
||||
(_('Relevance'), 'score desc, metadata_modified desc'),
|
||||
(_('Name Ascending'), 'title_string asc'),
|
||||
(_('Name Descending'), 'title_string desc'),
|
||||
(_('Last Modified'), 'metadata_modified desc'),
|
||||
(_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ]
|
||||
%}
|
||||
{% snippet 'snippets/search_form.html', type='harvest', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.params, error=c.query_error, placeholder=_("Search harvest sources...") %}
|
||||
|
||||
{{ h.snippet('snippets/source_list.html', sources=c.page.items, show_organization=true) }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ c.page.pager(q=c.q) }}
|
||||
</section>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block secondary_content %}
|
||||
{% for facet in c.facet_titles %}
|
||||
{{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, alternative_url=h.url_for('{0}_search'.format(c.dataset_type))) }}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
|
@ -37,7 +37,7 @@
|
|||
<label class="radio">
|
||||
<input type="radio" name="source_type" value="{{ harvester['name'] }}" {{ "checked " if checked }} data-module="harvest-type-change">
|
||||
{{ harvester['title'] }}
|
||||
<i class="fa fa-question-circle icon-question-sign muted" title="{{ harvester['description'] }}" data-bs-toggle="tooltip"></i>
|
||||
<i class="fa fa-question-circle icon-question-sign muted" title="{{ harvester['description'] }}" data-bs-toggle="tooltip" data-toggle="tooltip"></i>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -95,7 +95,7 @@
|
|||
{% set locale_delete = h.dump_json({'content': _('This will flag the source as deleted but keep all its datasets and previous jobs. Are you sure you want to delete this harvest source?')}) %}
|
||||
{% set locale_clear = h.dump_json({'content': _('Warning: Apart from deleting this source, this command will remove all its datasets, as well as all previous job reports. Are you sure you want to continue?')}) %}
|
||||
<div class="dropdown btn-group">
|
||||
<a href="#" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown">
|
||||
<a href="#" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown" data-toggle="dropdown">
|
||||
{{ _('Delete') }}
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue