Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2445] Move new related code into a template page
This allows us to share the same code between the add and edit pages.
- Loading branch information
Showing
2 changed files
with
35 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,7 @@ | ||
{% extends "page.jinja.html" %} | ||
{% extends "related/pages/related_form_page.html" %} | ||
|
||
{% block title %}Create a related item - {{ super() }}{% endblock %} | ||
|
||
{% block breadcrumb %} | ||
{{ h.snippet('package/new_breadcrumb.html') }} | ||
{% endblock %} | ||
{% block breadcrumb_item %}{{ h.nav_link(_('Create Related'), controller='related', action='new', id=c.id) }}{% endblock %} | ||
|
||
{% block primary_content %} | ||
<section class="module"> | ||
<div class="content"> | ||
{{ c.form }} | ||
</div> | ||
</section> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
<section class="module"> | ||
<h2 class="heading"><i class="ckan-icon ckan-icon-info"></i> What are related items?</h2> | ||
<div class="content"> | ||
<p>Related Media is any app, article, visualisation or idea related to | ||
this dataset. For example, it could be a custom visualisation, pictograph | ||
or bar chart, an app using all or part of the data or even a news story | ||
that references this dataset.</p> | ||
</div> | ||
</section> | ||
{% endblock %} | ||
{% block page_heading %}{{ _('Create Related Item') }}{% 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 @@ | ||
{% extends "page.jinja.html" %} | ||
|
||
{% block breadcrumb %} | ||
<ol class="breadcrumb"> | ||
<li>{{ h.nav_link(_('Datasets'), controller='package', action='search', highlight_actions = 'new index') }}</li> | ||
{# TODO: Insert rest of breadcrumb here #} | ||
<li class="current">{% block breadcrumb_item %}{% endblock %}</li> | ||
</ol> | ||
{% endblock %} | ||
|
||
{% block primary_content %} | ||
<section class="module"> | ||
<div class="content"> | ||
<h1 class="page-heading">{% block page_heading %}{{ _('Related Form') }}{% endblock %}</h1> | ||
{{ c.form }} | ||
</div> | ||
</section> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
<section class="module"> | ||
<h2 class="heading"><i class="ckan-icon ckan-icon-info"></i> What are related items?</h2> | ||
<div class="content"> | ||
<p>Related Media is any app, article, visualisation or idea related to | ||
this dataset.</p> | ||
|
||
<p>For example, it could be a custom visualisation, pictograph | ||
or bar chart, an app using all or part of the data or even a news story | ||
that references this dataset.</p> | ||
</div> | ||
</section> | ||
{% endblock %} |