Skip to content

Commit

Permalink
[#368] Move package_revision_info block and fix wrong tag (div->p) to…
Browse files Browse the repository at this point in the history
… make the sidebar float correctly on package read pages if a certain revision of a package is requested
  • Loading branch information
domoritz committed Mar 25, 2013
1 parent 5a77d67 commit adfc4bf
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions ckan/templates/package/read_base.html
Expand Up @@ -17,23 +17,6 @@
{% endblock %}

{% block primary_content %}
{% block package_revision_info %}
{% if c.pkg_revision_id %}
<div class="module info">
<p class="module-content">
{% set timestamp = h.render_datetime(c.pkg_revision_timestamp, with_hours=True) %}
{% set url = h.url(controller='package', action='read', id=pkg.name) %}

{% if c.pkg_revision_not_latest %}
{% trans timestamp=timestamp, url=url %}This is an old revision of this dataset, as edited at {{ timestamp }}. It may differ significantly from the <a href="{{ url }}">current revision</a>.{% endtrans %}
{% else %}
{% trans timestamp=timestamp %}This is the current revision of this dataset, as edited at {{ timestamp }}.{% endtrans %}
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}

<article class="module prose">

{% block page_header %}
Expand All @@ -44,6 +27,23 @@
] %}
{% endblock %}

{% block package_revision_info %}
{% if c.pkg_revision_id %}
<div class="module info">
<p class="module-content">
{% set timestamp = h.render_datetime(c.pkg_revision_timestamp, with_hours=True) %}
{% set url = h.url(controller='package', action='read', id=pkg.name) %}

{% if c.pkg_revision_not_latest %}
{% trans timestamp=timestamp, url=url %}This is an old revision of this dataset, as edited at {{ timestamp }}. It may differ significantly from the <a href="{{ url }}">current revision</a>.{% endtrans %}
{% else %}
{% trans timestamp=timestamp %}This is the current revision of this dataset, as edited at {{ timestamp }}.{% endtrans %}
{% endif %}
</p>
</div>
{% endif %}
{% endblock %}

{% block primary_content_inner %}{% endblock %}
</article>
{% endblock %}
Expand Down

0 comments on commit adfc4bf

Please sign in to comment.