From 7a4c29b761d51b5c37aae4d185564911794c12f2 Mon Sep 17 00:00:00 2001 From: Wilson Gaturu Date: Tue, 26 Sep 2023 18:22:54 +0300 Subject: [PATCH 1/2] adds updated links to user guide --- africanlii/templates/africanlii/au_detail_page.html | 1 + africanlii/views/taxonomy.py | 5 ++++- liiweb/templates/liiweb/pocketlaw.html | 1 + peachjam/templates/peachjam/taxonomy_first_level_detail.html | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/africanlii/templates/africanlii/au_detail_page.html b/africanlii/templates/africanlii/au_detail_page.html index 27b6cb064..23bb8ecad 100644 --- a/africanlii/templates/africanlii/au_detail_page.html +++ b/africanlii/templates/africanlii/au_detail_page.html @@ -9,6 +9,7 @@ {% block breadcrumbs %}{% endblock %} {% block page-heading %}

{% trans 'African Union (AU)' %}

+ {% include "peachjam/_help_button.html" with link="african-union-documents-au" %} {% endblock %}

{% blocktrans trimmed %} diff --git a/africanlii/views/taxonomy.py b/africanlii/views/taxonomy.py index 7d17fa0b2..37db2f8ed 100644 --- a/africanlii/views/taxonomy.py +++ b/africanlii/views/taxonomy.py @@ -44,7 +44,10 @@ def get(self, request, *args, **kwargs): return super().get(request, *args, **kwargs) def get_context_data(self, **kwargs): - return super().get_context_data(taxonomy_link_prefix="indexes", **kwargs) + context = super().get_context_data(**kwargs) + context["taxonomy_link_prefix"] = "indexes" + context["link"] = "federated-case-indexes-on-africanlii" + return context class DocIndexDetailView(TaxonomyDetailView): diff --git a/liiweb/templates/liiweb/pocketlaw.html b/liiweb/templates/liiweb/pocketlaw.html index 088257369..2a871894d 100644 --- a/liiweb/templates/liiweb/pocketlaw.html +++ b/liiweb/templates/liiweb/pocketlaw.html @@ -22,6 +22,7 @@

Your offline {{ APP_NAME }} companion.

Get started with Pocket Law

+ {% include "peachjam/_help_button.html" with link="pocket-law" %}
  1. Download Pocket Law {{ APP_NAME }}.
  2. Double-click the application to start the installation.
  3. diff --git a/peachjam/templates/peachjam/taxonomy_first_level_detail.html b/peachjam/templates/peachjam/taxonomy_first_level_detail.html index 438721461..d87e53529 100644 --- a/peachjam/templates/peachjam/taxonomy_first_level_detail.html +++ b/peachjam/templates/peachjam/taxonomy_first_level_detail.html @@ -16,6 +16,9 @@ {% block taxonomy-content %}

    {{ taxonomy }}

    + {% if link %} + {% include "peachjam/_help_button.html" %} + {% endif %} {% if taxonomy.get_children|length > 0 %}
      {% for child in taxonomy.get_children %} From 06d44d6697307a8f63743664c9b882b9b7c65f95 Mon Sep 17 00:00:00 2001 From: Wilson Gaturu Date: Wed, 27 Sep 2023 10:36:31 +0300 Subject: [PATCH 2/2] change help link variable --- africanlii/views/taxonomy.py | 2 +- peachjam/templates/peachjam/taxonomy_first_level_detail.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/africanlii/views/taxonomy.py b/africanlii/views/taxonomy.py index 37db2f8ed..7ea7e59b7 100644 --- a/africanlii/views/taxonomy.py +++ b/africanlii/views/taxonomy.py @@ -46,7 +46,7 @@ def get(self, request, *args, **kwargs): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["taxonomy_link_prefix"] = "indexes" - context["link"] = "federated-case-indexes-on-africanlii" + context["help_link"] = "federated-case-indexes-on-africanlii" return context diff --git a/peachjam/templates/peachjam/taxonomy_first_level_detail.html b/peachjam/templates/peachjam/taxonomy_first_level_detail.html index d87e53529..f0d1aa21f 100644 --- a/peachjam/templates/peachjam/taxonomy_first_level_detail.html +++ b/peachjam/templates/peachjam/taxonomy_first_level_detail.html @@ -16,8 +16,8 @@ {% block taxonomy-content %}

      {{ taxonomy }}

      - {% if link %} - {% include "peachjam/_help_button.html" %} + {% if help_link %} + {% include "peachjam/_help_button.html" with link=help_link %} {% endif %} {% if taxonomy.get_children|length > 0 %}