Skip to content

Instantly share code, notes, and snippets.

@joetsoi
Last active August 29, 2015 14:21
Show Gist options
  • Save joetsoi/3789d670a86a25876a92 to your computer and use it in GitHub Desktop.
Save joetsoi/3789d670a86a25876a92 to your computer and use it in GitHub Desktop.
snippet/package_item.html
{% ckan_extends %}
{% block heading_meta %}
{% if package.get('state', '').startswith('draft') %}
<span class="label label-info">{{ _('Draft') }}</span>
{% elif package.get('state', '').startswith('deleted') %}
<span class="label label-important">{{ _('Deleted') }}</span>
{% endif %}
( {{ h.link_to(h.truncate(package.organization.title, truncate_title), h.url_for(controller='organization', action='read', id=package.organization.name)) }} )
{{ h.popular('recent views', package.tracking_summary.recent, min=10) if package.tracking_summary }}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment