Skip to content

Commit

Permalink
make help_link easier to set
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Jul 16, 2024
1 parent 0cb5a7a commit dbe13b6
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion africanlii/templates/africanlii/au_detail_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% block breadcrumbs %}{% endblock %}
{% block page-heading %}
<h1 class="my-4">{% trans 'African Union (AU)' %}</h1>
{% include "peachjam/_help_button.html" with link="african-union-documents-au" %}
{% include "peachjam/_help_button.html" with help_link="african-union-documents-au" %}
{% endblock %}
<p>
{% blocktrans trimmed %}
Expand Down
2 changes: 1 addition & 1 deletion liiweb/templates/liiweb/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</form>
<div class="d-flex">
<a class="me-4" href="{% url 'search:search' %}?show-advanced-tab=1">{% trans 'Advanced search' %}</a>
{% include "peachjam/_help_button.html" with link="search" %}
{% include "peachjam/_help_button.html" with help_link="search" %}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion liiweb/templates/liiweb/pocketlaw.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2 class="display-5">Your offline {{ APP_NAME }} companion.</h2>
<div class="row">
<div class="col-md-6 mb-3">
<h3>Get started with Pocket Law</h3>
{% include "peachjam/_help_button.html" with link="pocket-law" %}
{% include "peachjam/_help_button.html" with help_link="pocket-law" %}
<ol class="lead">
<li>Download Pocket Law {{ APP_NAME }}.</li>
<li>Double-click the application to start the installation.</li>
Expand Down
1 change: 1 addition & 0 deletions liiweb/views/legislation.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def get_context_data(self, **kwargs):
context["doc_table_show_court"] = False
context["doc_table_show_author"] = False
context["doc_table_show_jurisdiction"] = False
context["help_link"] = "legislation/"

context["documents"] = self.group_documents(context["documents"])

Expand Down
2 changes: 1 addition & 1 deletion peachjam/templates/peachjam/_count_and_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% include 'peachjam/_document_count.html' %}
{% endblock %}
{% block help %}
{% if link %}
{% if help_link %}
{% include "peachjam/_help_button.html" %}
{% endif %}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion peachjam/templates/peachjam/_help_button.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n %}
{% if PEACHJAM_SETTINGS.user_help_link %}
<div class="mb-3">
<a href="{{ PEACHJAM_SETTINGS.user_help_link }}{{ link }}"
<a href="{{ PEACHJAM_SETTINGS.user_help_link }}{{ help_link }}"
target="_blank"
rel="noopener noreferrer"><i class="bi bi-question-circle me-1"></i>{% trans 'Help' %}</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion peachjam/templates/peachjam/judgment_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<h1 class="mt-4">{% trans 'Judgments' %}</h1>
{% endblock %}
{% block count-and-search %}
{% include 'peachjam/_count_and_search.html' with link="judgments/courts" %}
{% include 'peachjam/_count_and_search.html' %}
{% endblock %}
{% endblock %}
{% include 'peachjam/_court_list.html' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="pt-4 pb-5">
<h1 class="mb-4">{{ taxonomy }}</h1>
{% if help_link %}
{% include "peachjam/_help_button.html" with link=help_link %}
{% include "peachjam/_help_button.html" %}
{% endif %}
{% if taxonomy.get_children|length > 0 %}
<ul>
Expand Down
1 change: 1 addition & 0 deletions peachjam/views/judgment.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def get_context_data(self, **kwargs):
).order_by("-date")[:30]
context["doc_type"] = "Judgment"
context["doc_count"] = Judgment.objects.filter(published=True).count()
context["help_link"] = "judgments/courts"
return context


Expand Down

0 comments on commit dbe13b6

Please sign in to comment.