Skip to content

Commit

Permalink
[2375] Style the related item on the dataset page
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 12, 2012
1 parent d65ede2 commit 6664862
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ckan/templates/snippets/group.html
Expand Up @@ -4,6 +4,6 @@
<img src="{{ group.image_url or "http://placehold.it/200x125" }}" width="200" height="125" />
<h3>{{ group.name }}</h3>
</a>
<p>{{ h.markdown_extract(group.description) }}</p>
<p>{{ h.markdown_extract(group.description, 70) }}</p>
</div>
</section>
17 changes: 10 additions & 7 deletions ckan/templates/snippets/related.html
@@ -1,14 +1,17 @@
{% set item = pkg.related | first %}
<section class="module info related{{ " related-empty" if not item }}">
<h2 class="heading"><i class="ckan-icon ckan-icon-photo"></i> Related <a class="action" href="{{ h.url_for(controller='related', action='new', id=pkg.name) }}">Add Related</a></h2>
<div class="content">
<div class="content media">
{% if item %}
{{ item.type }}
{{ item.title }}
{{ item.description }}
{{ item.url }}
{{ item.image_url }}
{{ item.id }}
{% with url = h.url_for(controller='related', action='list', id=pkg.name) %}
<a class="logo" href="{{ url }}">
<img src="{{ item.image_url or "http://placehold.it/200x125" }}" width="200" height="125" />
</a>
<div class="content">
<h3 class="heading"><a href="{{ url }}">{{ item.title }}</a></h3>
<p>{{ h.markdown_extract(item.description, 70) }}</p>
</div>
{% endwith %}
{% else %}
<p>No apps, ideas, news stories or images have been
related to this dataset yet, why not add one now?</p>
Expand Down

0 comments on commit 6664862

Please sign in to comment.