Skip to content

Commit

Permalink
replace usage of url with h.url in templates to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Toby committed Feb 10, 2012
1 parent 516c335 commit 47bb2a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ckan/templates/package/history.html
Expand Up @@ -12,7 +12,7 @@
<h4>Updates</h4>
<p class="atom-feed-link dataset-history-link">
<a
href="${url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}"
href="${h.url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}"
title="${g.site_title} - Dataset History - ${c.pkg_dict['name']}">
Subscribe &raquo;</a>
</p>
Expand Down Expand Up @@ -59,7 +59,7 @@ <h3 py:if="c.error" class="form-errors">

<py:def function="optional_feed">
<link rel="alternate" type="application/atom+xml" title="Dataset History"
href="${url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}" />
href="${h.url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}" />
</py:def>

<xi:include href="layout.html" />
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/package/new_package_form.html
Expand Up @@ -41,7 +41,7 @@ <h2>Errors in form</h2>

<dt class="name-label"><label class="field_req" for="name">Url</label></dt>
<dd class="name-field">
<span class="js-url-text url-text">${url(controller='package', action='index')+'/'}<span class="js-url-viewmode js-url-suffix">&nbsp;</span><a href="#" style="display: none;" class="url-edit js-url-editlink js-url-viewmode">(edit)</a></span>
<span class="js-url-text url-text">${h.url(controller='package', action='index')+'/'}<span class="js-url-viewmode js-url-suffix">&nbsp;</span><a href="#" style="display: none;" class="url-edit js-url-editlink js-url-viewmode">(edit)</a></span>
<input style="display: none;" id="name" maxlength="100" name="name" type="text" class="url-input js-url-editmode js-url-input" value="${data.get('name', '')}" />
<p class="js-url-is-valid">&nbsp;</p>
</dd>
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/package/read.html
Expand Up @@ -84,7 +84,7 @@ <h3>Related Datasets</h3>
<div py:match="content">
<py:if test="c.pkg_revision_id">
<div id="revision" class="widget-container">
<p py:if="c.pkg_revision_not_latest">This is an old revision of this dataset, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp, with_hours=True)}. It may differ significantly from the <a href="${url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
<p py:if="c.pkg_revision_not_latest">This is an old revision of this dataset, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp, with_hours=True)}. It may differ significantly from the <a href="${h.url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
<p py:if="not c.pkg_revision_not_latest">This is the current revision of this dataset, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp, with_hours=True)}.</p>
</div>
</py:if>
Expand All @@ -101,7 +101,7 @@ <h3>Related Datasets</h3>

<py:def function="optional_feed">
<link rel="alternate" type="application/atom+xml" title="Dataset History"
href="${url(controller='package', action='history', id=c.pkg.name, format='atom', days=7)}" />
href="${h.url(controller='package', action='history', id=c.pkg.name, format='atom', days=7)}" />
</py:def>

<xi:include href="layout.html" />
Expand Down

0 comments on commit 47bb2a5

Please sign in to comment.