Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature-2375-demo-theme' of github.com:okfn/ckan into f…
…eature-2375-demo-theme
- Loading branch information
Showing
10 changed files
with
122 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% extends 'package/pages/form_page.html' %} | ||
|
||
{% set pkg = c.pkg_dict %} | ||
|
||
{% block breadcrumb %} | ||
<ol class="breadcrumb"> | ||
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li> | ||
<li>{% link_for _('Datasets'), controller='package', action='search', highlight_actions = 'new index' %}</li> | ||
<li>{% link_for pkg.title|truncate(30), controller='package', action='read', id=pkg.name %}</li> | ||
<li class="active">{% link_for _('Edit Dataset'), controller='package', action='edit', id=pkg.name %}</li> | ||
</ol> | ||
{% endblock %} | ||
|
||
{% block stages %}{% endblock %} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
{# FIXME why is this here? #} | ||
{% include 'package/snippets/package_form.html' %} | ||
{% extends 'package/pages/form.html' %} | ||
|
||
{% block metadata_fields %} | ||
{% if action == 'edit' %}{{ super() }}{% endif %} | ||
{% endblock %} | ||
|
||
{% block disclaimer %} | ||
{% if action != 'edit' %}{{ super() }}{% endif %} | ||
{% endblock %} | ||
|
||
{% block save_button_text %} | ||
{% if action != 'edit' %} | ||
{{ super() }} | ||
{% else %} | ||
Update | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block cancel_button %} | ||
{% if action != 'edit' %} | ||
{{ super() }} | ||
{% endif %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% import 'macros/form.html' as form %} | ||
|
||
<form class="dataset-form form-horizontal" method="post"> | ||
<input type="hidden" name="_ckan_phase" value="dataset_new_1" /> | ||
{% block errors %}{{ form.errors(error_summary) }}{% endblock %} | ||
|
||
{% block basic_fields %} | ||
{% snippet 'package/snippets/package_basic_fields.html', data=data, errors=errors, licenses=c.licences, groups_available=c.groups_available %} | ||
{% endblock %} | ||
|
||
{% block metadata_fields %} | ||
{% snippet 'package/snippets/package_metadata_fields.html', data=data, errors=errors %} | ||
{% endblock %} | ||
|
||
{% block form_actions %} | ||
<div class="form-actions"> | ||
{% block disclaimer %} | ||
<p class="action-info small"> | ||
{%- trans -%} | ||
Important: By submitting content, you | ||
agree to release your contributions under the Open Database | ||
License. | ||
{%- endtrans -%} | ||
</p> | ||
{% endblock %} | ||
{% block cancel_button %} | ||
<a class="btn" href="">{% block save_button %}{{ _('Cancel') }}{% endblock %}</a> | ||
{% endblock %} | ||
<button class="btn btn-primary" type="submit" name="save">{% block save_button_text %}Next: Add Data{% endblock %}</button> | ||
</div> | ||
{% endblock %} | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<ol class="breadcrumb"> | ||
<li class="home"><a href="hide-text ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">{{ _('Home') }}</a></li> | ||
<li>{% link_for _('Datasets'), controller='package', action='search', highlight_actions = 'new index' %}</li> | ||
<li class="active">{% link_for _('Create Dataset'), controller='package', action='new' %}</li> | ||
</ol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{% import 'macros/form.html' as form %} | ||
|
||
{{ form.input('title', id='field-title', label=_('Title'), placeholder=_('A descriptive title'), value=data.title, error=errors.title, classes=['control-full', 'control-large']) }} | ||
|
||
{{ form.input('name', id='field-name', label=_('URL'), placeholder=_('my-dataset'), value=data.title, error=errors.name, classes=['control-full']) }} | ||
|
||
{{ form.markdown('notes', id='field-notes', label=_('Description'), placeholder=_('Some useful notes about the data'), value=data.notes, error=errors.notes) }} | ||
|
||
<div class="control-group"> | ||
{% set error = errors.license_id %} | ||
<label class="control-label" for="field-license">{{ _("License") }}</label> | ||
<div class="controls"> | ||
<select id="field-license" name="license_id"> | ||
{% for licence_desc, licence_id in licences if licence_desc %} | ||
<option value="{{ licence_id }}" {% if data.get('license_id', '') == licence_id %}selected="selected"{% endif %}>{{ licence_desc }}</option> | ||
{% endfor %} | ||
</select> | ||
{% if error %}<span class="error-block">{{ error }}</span>{% endif %} | ||
<span class="info-block">{{ _("Don't worry if you don't know which license the data has been released under") }}</span> | ||
</div> | ||
</div> | ||
|
||
{% if groups_available %} | ||
<div class="control-group"> | ||
{% set groups = data.groups or [] %} | ||
<label for="field-groups" class="control-label">{{ _('Add to Groups') }}</label> | ||
<div class="controls"> | ||
<select id="field-groups" name="groups__{{ groups | count }}__id"> | ||
<option value="">{{ _('Select a group...') }}</option> | ||
{% for group in groups_available %} | ||
<option value="{{ group.id }}">{{ group.name }}</option> | ||
{% endfor %} | ||
</select> | ||
</div> | ||
</div> | ||
{% endif %} |
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
ckan/templates/package/snippets/package_metadata_fields.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% import 'macros/form.html' as form %} | ||
|
||
{{ form.input('author', label=_('Author'), id='field-author', placeholder=_('Joe Bloggs'), value=data.author, error=errors.author, classes=['control-medium']) }} | ||
|
||
{{ form.input('author_email', label=_('Author Email'), id='field-author-email', placeholder=_('joe@example.com'), value=data.author_email, error=errors.author_email, classes=['control-medium']) }} | ||
|
||
{{ form.input('maintainer', label=_('Maintainer'), id='field-maintainer', placeholder=_('Joe Bloggs'), value=data.maintainer, error=errors.maintainer, classes=['control-medium']) }} | ||
|
||
{{ form.input('maintainer_email', label=_('Maintainer Email'), id='field-maintainer-email', placeholder=_('joe@example.com'), value=data.maintainer_email, error=errors.maintainer_email, classes=['control-medium']) }} | ||
|
||
{% block custom_fields %} | ||
{% snippet 'snippets/custom_form_fields.html', extras=data.extras, errors=errors, limit=3 %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters