Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #512 from eregs/511-footnotes
Browse files Browse the repository at this point in the history
Ensure footnotes template has proper params.
  • Loading branch information
cmc333333 authored Oct 10, 2017
2 parents 2f75507 + 8b7cbed commit b7fb257
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
34 changes: 19 additions & 15 deletions regulations/templates/regulations/footnotes.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
{% if sub_context.node.footnotes %}
<div class="footnote-box">
<h5>Footnotes</h5>
<ul class="footnotes">
{% for footnote in sub_context.node.footnotes %}
<li id="footnote-{{footnote.ref}}">
<span class="reference-num">{{footnote.ref}}.</span>
<p>
{{footnote.note}}
</p>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% comment %}
Lists footnotes at the bottom of a section. Assumes the "footnotes" variable
is defined as a list.
{% endcomment %}
{% if footnotes %}
<div class="footnote-box">
<h5>Footnotes</h5>
<ul class="footnotes">
{% for footnote in footnotes %}
<li id="footnote-{{footnote.ref}}">
<span class="reference-num">{{footnote.ref}}.</span>
<p>
{{footnote.note}}
</p>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
2 changes: 1 addition & 1 deletion regulations/templates/regulations/preamble-partial.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{% endif %}
</div>

{% include "regulations/footnotes.html" %}
{% include "regulations/footnotes.html" with footnotes=sub_context.node.footnotes only %}
{% include "regulations/navigation.html" %}
</div>

Expand Down
2 changes: 1 addition & 1 deletion regulations/templates/regulations/regulation_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h3 class="section-title" tabindex="0"> {{c.header|safe}} </h3>
{% endwith %}
{% endif %}

{% include "regulations/footnotes.html" %}
{% include "regulations/footnotes.html" with footnotes=c.footnotes only %}

</section>
{% endif %}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="regulations",
version="8.4.0",
version="8.4.1",
packages=find_packages(),
include_package_data=True,
install_requires=[
Expand Down

0 comments on commit b7fb257

Please sign in to comment.