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-2445-add-related-new' into feature-2375-demo-theme
- Loading branch information
Showing
7 changed files
with
290 additions
and
6 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
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,39 @@ | ||
<!DOCTYPE html> | ||
<html | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:i18n="http://genshi.edgewall.org/i18n" | ||
xmlns:py="http://genshi.edgewall.org/" | ||
xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<!--! Include matchers nearest first --> | ||
<xi:include href="../page.html" /> | ||
|
||
<!--! Now include the current page --> | ||
<head> | ||
<title>Edit a related item</title> | ||
</head> | ||
<body> | ||
<div class="toolbar"> | ||
${h.snippet('package/new_breadcrumb.html')} | ||
</div> | ||
|
||
<div class="primary"> | ||
<section class="module"> | ||
<div class="content"> | ||
${c.form} | ||
</div> | ||
</section> | ||
</div> | ||
|
||
<div class="secondary"> | ||
<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> | ||
</div> | ||
|
||
</body> | ||
</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,63 @@ | ||
<form | ||
xmlns:i18n="http://genshi.edgewall.org/i18n" | ||
xmlns:py="http://genshi.edgewall.org/" | ||
xmlns:xi="http://www.w3.org/2001/XInclude" | ||
class="dataset-form form-horizontal" method="post"> | ||
<div class="alert alert-error error-explanation" py:if="error_summary"> | ||
<h2>Errors in form</h2> | ||
<p>The form contains invalid entries:</p> | ||
<ul> | ||
<li py:for="key, error in error_summary.items()">${"%s: %s" % (key if not key=='Name' else 'URL', error)}</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="control-group control-large control-full" py:with="error = errors.get('title', '')"> | ||
<label class="control-label" for="field-title">Title</label> | ||
<div class="controls"> | ||
<input id="field-title" name="title" value="${data.get('title', '')}" placeholder="${_('A descriptive title')}" /> | ||
<span class="error-block" py:if="error">${error}</span> | ||
</div> | ||
</div> | ||
|
||
<div class="control-group" py:with="error = errors.get('type', '')"> | ||
<label class="control-label" for="field-license">Type</label> | ||
<div class="controls"> | ||
<select id="field-type" name="type"> | ||
<py:for each="name, val in c.types"> | ||
<option value="${val}" py:attrs="{'selected': 'selected' if data.get('type', '') == val else None}">${name}</option> | ||
</py:for> | ||
</select> | ||
<span class="error-block" py:if="error">${error}</span> | ||
</div> | ||
</div> | ||
|
||
<div class="control-group control-full" py:with="error = errors.get('notes', '')"> | ||
<label class="control-label" for="field-notes">Description</label> | ||
<div class="controls editor"> | ||
<textarea id="field-notes" name="description" cols="20" rows="5" placeholder="Some useful description about the item">${data.get('description', '')}</textarea> | ||
<span class="info-block">You can use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a> editing here</span> | ||
<span class="error-block" py:if="error">${error}</span> | ||
</div> | ||
</div> | ||
|
||
<div class="control-group control-large control-full" py:with="error = errors.get('url', '')"> | ||
<label class="control-label" for="field-title">URL</label> | ||
<div class="controls"> | ||
<input id="field-url" type="url" name="url" value="${data.get('url', '')}" placeholder="${_('A URL for the related item')}" /> | ||
<span class="error-block" py:if="error">${error}</span> | ||
</div> | ||
</div> | ||
|
||
<div class="control-group control-large control-full" py:with="error = errors.get('image_url', '')"> | ||
<label class="control-label" for="field-title">Image URL</label> | ||
<div class="controls"> | ||
<input id="field-image-url" type="image_url" name="image_url" value="${data.get('image_url', '')}" placeholder="${_('URL of an image for this item')}" /> | ||
<span class="error-block" py:if="error">${error}</span> | ||
</div> | ||
</div> | ||
|
||
<div class="form-actions"> | ||
<a class="btn" href="">Cancel</a> | ||
<button class="btn btn-primary" type="submit" name="save">Save</button> | ||
</div> | ||
</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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!DOCTYPE html> | ||
<html | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:i18n="http://genshi.edgewall.org/i18n" | ||
xmlns:py="http://genshi.edgewall.org/" | ||
xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<!--! Include matchers nearest first --> | ||
<xi:include href="../page.html" /> | ||
|
||
<!--! Now include the current page --> | ||
<head> | ||
<title>Create a related item</title> | ||
</head> | ||
<body> | ||
<div class="toolbar"> | ||
${h.snippet('package/new_breadcrumb.html')} | ||
</div> | ||
|
||
<div class="primary"> | ||
<section class="module"> | ||
<div class="content"> | ||
${c.form} | ||
</div> | ||
</section> | ||
</div> | ||
|
||
<div class="secondary"> | ||
<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> | ||
</div> | ||
|
||
</body> | ||
</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