Skip to content

Commit

Permalink
CONCD-675 include intro text from simple page body (#2273)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasarkar authored Feb 9, 2024
1 parent b4cbb77 commit d9ac8d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 77 deletions.
74 changes: 0 additions & 74 deletions concordia/templates/static-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,80 +34,6 @@ <h4>Instructions</h4>
</div>
</div>
<div class="p-3 col-9">
{% if title == "How to transcribe" %}
<nav class="border p-3 mb-4">
<h2 class="h6">Jump to a section:</h2>
<ul class="m-0">
<li>
<a href="#text-order">Text order</a>
</li>
<li>
<a href="#spelling-and-punctuation">Spelling and punctuation</a>
</li>
<li><a href="#notes">Notes</a></li>
<li>
<a href="#blank-pages">Blank pages</a>
</li>
<li>
<a href="#line-breaks">Line breaks</a>
</li>
<li>
<a href="#abbreviations">Abbreviations</a>
</li>
<li>
<a href="#formatting">Formatting</a>
</li>
<li>
<a href="#insertions">Insertions</a>
</li>
<li>
<a href="#illegible-or-unclear">Illegible or unclear text</a>
</li>
<li>
<a href="#deletions">Deletions</a>
</li>
<li>
<a href="#marginalia">Marginalia</a>
</li>
<li>
<a href="#printed-or-typed">Printed, typed, or newspaper text</a>
</li>
<li>
<a href="#nothing-to-transcribe">When not to transcribe printed text</a>
</li>
<li>
<a href="#shorthand">Shorthand</a>
</li>
<li>
<a href="#images">Images</a>
</li>
<li>
<a href="#non-english">Non-English languages, characters, and translation</a>
</li>
<li>
<a href="#other-special-characters">Other special characters</a>
</li>
<li>
<a href="#tables">Tables</a>
</li>
<li>
<a href="#long-s-or-funny-f">Long s or "funny" f</a>
</li>
<li>
<a href="#cross-writing">Cross-writing</a>
</li>
<li>
<a href="#bleed-through">Bleed-through</a>
</li>
<li>
<a href="#research">Research</a>
</li>
<li>
<a href="#saving-work">Saving work in progress</a>
</li>
</ul>
</nav>
{% endif %}
{{ body|safe }}
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions concordia/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ def simple_page(request, path=None):

guides = Guide.objects.filter(title__iexact=page.title)
if guides.count() > 0:
html = guides.first().body
ctx["add_navigation"] = True
guides = guides[:1]
elif page.title == "How to transcribe":
guides = Guide.objects.filter(title__startswith="Transcription: ").order_by(
"order"
)
html = "".join(guides.values_list("body", flat=True))
if guides.count() > 0:
html = "".join([page.body] + list(guides.values_list("body", flat=True)))
ctx["add_navigation"] = True
else:
html = page.body
Expand Down

0 comments on commit d9ac8d9

Please sign in to comment.