Skip to content

Commit

Permalink
minor template cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed May 18, 2012
1 parent a4ce144 commit 5bc3ef6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckan/templates/package/read.html
Expand Up @@ -38,17 +38,17 @@ <h1>${c.pkg_dict.get('title', c.pkg_dict.get('name'))}</h1>

<section id="dataset-resources" class="resources content">
<h3>Resources</h3>
<ul class="resource-list" py:if="len(c.pkg_dict.get('resources', []))">
<li class="resource-item" py:for="res in c.pkg_dict.get('resources', [])" py:with="url=h.url_for(controller='package', action='resource_read', id=c.pkg_dict['name'], resource_id=res['id'])">
<ul class="resource-list" py:if="c.pkg_dict.resources">
<li class="resource-item" py:for="res in c.pkg_dict.resources" py:with="url=h.url_for(controller='package', action='resource_read', id=c.pkg_dict['name'], resource_id=res['id'])">
<a class="heading" href="${url}">
${h.resource_display_name(res)}
<span py:if="res.get('format')" class="format-box" property="dc:format">${res.get('format')}</span>
<span py:if="res.format" class="format-box" property="dc:format">${res.format}</span>
</a>
<p class="description">${h.markdown_extract(res.description, extract_length=80)}</p>
<a class="btn btn-primary" href="${url}">Explore Data</a>
</li>
</ul>
<py:if test="not len(c.pkg_dict.get('resources', []))">
<py:if test="not c.pkg_dict.resources">
(none)
</py:if>
</section>
Expand Down

0 comments on commit 5bc3ef6

Please sign in to comment.