From 28e589ee921ff5873601e0c3340845bd782371a7 Mon Sep 17 00:00:00 2001 From: John Martin Date: Tue, 12 Feb 2013 16:29:07 +0000 Subject: [PATCH] [#7] Updates to the edit/new harvest source form --- .../fanstatic_library/styles/harvest.css | 7 +++++++ .../fanstatic_library/styles/harvest.less | 8 ++++++++ .../templates_new/source/new_source_form.html | 19 +++++++++++++------ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/ckanext/harvest/fanstatic_library/styles/harvest.css b/ckanext/harvest/fanstatic_library/styles/harvest.css index 0e582a4..0c29644 100644 --- a/ckanext/harvest/fanstatic_library/styles/harvest.css +++ b/ckanext/harvest/fanstatic_library/styles/harvest.css @@ -95,3 +95,10 @@ header.with-filter h1 { .harvest-error-list .error { padding-left: 20px; } +.harvest-types label.radio { + font-weight: normal; + margin-bottom: 0; +} +.harvest-types label.radio i { + color: #999; +} diff --git a/ckanext/harvest/fanstatic_library/styles/harvest.less b/ckanext/harvest/fanstatic_library/styles/harvest.less index f10c0db..c9b77b3 100644 --- a/ckanext/harvest/fanstatic_library/styles/harvest.less +++ b/ckanext/harvest/fanstatic_library/styles/harvest.less @@ -104,3 +104,11 @@ header.with-filter { padding-left: 20px; } } + +.harvest-types label.radio { + font-weight: normal; + margin-bottom: 0; + i { + color: #999; + } +} diff --git a/ckanext/harvest/templates_new/source/new_source_form.html b/ckanext/harvest/templates_new/source/new_source_form.html index 2b4fae1..a4c9641 100644 --- a/ckanext/harvest/templates_new/source/new_source_form.html +++ b/ckanext/harvest/templates_new/source/new_source_form.html @@ -5,7 +5,7 @@ {% 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']) %} - + {{ _('This should include the http:// part of the URL') }} {% endcall %} @@ -21,14 +21,19 @@ {{ form.markdown('notes', id='field-notes', label=_('Description'), value=data.notes, error=errors.notes) }} - {{ form.select('source_type', id='field-source_type', label=_('Source type'), options=h.harvester_types(), selected=data.source_type, error=errors.source_type) }} +
+
-
    {% for harvester in h.harvesters_info() %} -
  • {{ harvester['title']}}: {{harvester['description'] }}
  • + {% set checked = harvester['name'] == ( data.source_type or 'ckan' ) %} + {% endfor %} -
+
{{ form.select('frequency', id='field-frequency', label=_('Frequency of update'), options=h.harvest_frequencies(), selected=data.frequency, error=errors.frequency) }} @@ -58,6 +63,8 @@ {% endif %} {% endif %} - +

+ +