diff --git a/liiweb/templates/liiweb/legislation_list.html b/liiweb/templates/liiweb/legislation_list.html index 24eba7789..2995d8c45 100644 --- a/liiweb/templates/liiweb/legislation_list.html +++ b/liiweb/templates/liiweb/legislation_list.html @@ -38,6 +38,7 @@

{% trans 'Legislation' %}

{% endblock %} + {% include "peachjam/_help_popover.html" with link="https://example.com" btn_text=help_button_text content=legislation_help_text %} {% if view.variant == 'repealed' %}
{% trans 'You are viewing repealed legislation which is no longer in force.' %}
{% endif %} diff --git a/liiweb/views/legislation.py b/liiweb/views/legislation.py index a51872330..e29352c03 100644 --- a/liiweb/views/legislation.py +++ b/liiweb/views/legislation.py @@ -1,6 +1,7 @@ from collections import defaultdict from django.shortcuts import get_object_or_404 +from django.utils.translation import gettext_lazy as _ from django.views.generic import TemplateView from peachjam.helpers import chunks, get_language @@ -46,6 +47,13 @@ def get_context_data(self, **kwargs): context["legislation_table"] = LegislationSerializer(qs, many=True).data + context["help_button_text"] = _("Help") + context["legislation_help_text"] = _( + "This is is a list of legislation for this jurisdiction. Click on the " + "tabs to filter according to current, repealed and subsidiary " + "legislation." + ) + return context def add_children(self, queryset): diff --git a/peachjam/js/components/FindDocuments/AdvancedSearch.vue b/peachjam/js/components/FindDocuments/AdvancedSearch.vue index e13682077..7f3e8b193 100644 --- a/peachjam/js/components/FindDocuments/AdvancedSearch.vue +++ b/peachjam/js/components/FindDocuments/AdvancedSearch.vue @@ -71,11 +71,24 @@ - -
- +
+
+ + + Help + +
+
+ +
diff --git a/peachjam/js/components/FindDocuments/index.vue b/peachjam/js/components/FindDocuments/index.vue index ecc0bcc10..cf4613810 100644 --- a/peachjam/js/components/FindDocuments/index.vue +++ b/peachjam/js/components/FindDocuments/index.vue @@ -76,6 +76,18 @@ Filters ({{ selectedFacetsCount }}) +
-
diff --git a/peachjam/js/locale/fr/translation.json b/peachjam/js/locale/fr/translation.json index d8e85afaa..a7f14e281 100644 --- a/peachjam/js/locale/fr/translation.json +++ b/peachjam/js/locale/fr/translation.json @@ -65,5 +65,8 @@ "Try searching instead": "Essayez plutôt de faire une recherche", "What changed?": "Quels sont les changements ?", "Year": "Année", - "Years": "Années" + "Years": "Années", + "Help": "Aide", + "You can search for documents by entering a keyword or phrase in the search box. You can also use the Advanced search to search for documents by more specific criteria.": "Vous pouvez rechercher des documents en entrant un mot-clé ou une phrase dans la zone de recherche. Vous pouvez également utiliser la recherche avancée pour rechercher des documents selon des critères plus spécifiques.", + "This is Advanced Search. Enter keywords in the fields above for a more fine grained search of documents.": "Ceci est une recherche avancée. Entrez des mots-clés dans les champs ci-dessus pour une recherche plus fine des documents.", } diff --git a/peachjam/js/locale/sw/translation.json b/peachjam/js/locale/sw/translation.json index a86527999..547d9ea38 100644 --- a/peachjam/js/locale/sw/translation.json +++ b/peachjam/js/locale/sw/translation.json @@ -65,5 +65,8 @@ "Try searching instead": "Jaribu kutafuta badala yake", "What changed?": "Nini kimebadilika?", "Year": "Mwaka", - "Years": "Miaka" + "Years": "Miaka", + "Help": "Msaada", + "You can search for documents by entering a keyword or phrase in the search box. You can also use the Advanced search to search for documents by more specific criteria.": "Unaweza kutafuta nyaraka kwa kuingiza neno au kifungu cha maneno katika sanduku la utafutaji.Unaweza pia kutumia utafutaji wa kina kutafuta nyaraka kwa vigezo zaidi maalum.", + "This is Advanced Search. Enter keywords in the fields above for a more fine grained search of documents.": "Hii ni utafutaji wa kina. Weka maneno katika uga ulio juu kwa utafutaji wa nyaraka kwa undani zaidi." } diff --git a/peachjam/js/peachjam.ts b/peachjam/js/peachjam.ts index 9ab98dafd..621c55361 100644 --- a/peachjam/js/peachjam.ts +++ b/peachjam/js/peachjam.ts @@ -143,9 +143,10 @@ class PeachJam { // @ts-ignore new window.bootstrap.Popover(el, { html: true, - content: - (el.getAttribute('data-bs-content') - + ""), + content: ` + ${el.getAttribute('data-bs-content')} + + `, container: 'body' }); }); diff --git a/peachjam/templates/peachjam/_citations.html b/peachjam/templates/peachjam/_citations.html index e74c894bd..9af681df3 100644 --- a/peachjam/templates/peachjam/_citations.html +++ b/peachjam/templates/peachjam/_citations.html @@ -1,6 +1,7 @@ {% load peachjam i18n %}
+ {% include 'peachjam/_help_popover.html' with link='#' btn_text=help_button_text content=citations_help_text %}

{% translate 'Cited documents' %} {{ cited_documents_count }} diff --git a/peachjam/templates/peachjam/_help_popover.html b/peachjam/templates/peachjam/_help_popover.html new file mode 100644 index 000000000..525f1f66f --- /dev/null +++ b/peachjam/templates/peachjam/_help_popover.html @@ -0,0 +1,7 @@ + diff --git a/peachjam/templates/peachjam/_related_documents.html b/peachjam/templates/peachjam/_related_documents.html index a4714d028..3dd1bffce 100644 --- a/peachjam/templates/peachjam/_related_documents.html +++ b/peachjam/templates/peachjam/_related_documents.html @@ -1,12 +1,6 @@ {% load peachjam i18n %}

{% trans "Related documents" %}

-
- Help -
+{% include 'peachjam/_help_popover.html' with link='https://google.com' btn_text=help_button_text content=related_documents_help_text %}
{% if relationships_as_subject %}
diff --git a/peachjam/views/generic_views.py b/peachjam/views/generic_views.py index a8fe5862c..cccccf2dc 100644 --- a/peachjam/views/generic_views.py +++ b/peachjam/views/generic_views.py @@ -1,6 +1,7 @@ import itertools from django.shortcuts import get_object_or_404 +from django.utils.translation import gettext_lazy as _ from django.views.generic import DetailView, ListView from lxml import html @@ -183,6 +184,14 @@ def get_context_data(self, **kwargs): + context["documents_citing_current_doc_count"] ) context["labels"] = doc.labels.all() + context["help_button_text"] = _("Help") + context["citations_help_text"] = _( + "This is a list citations. On the left is a list of documents that this " + "document cites. On the right are documents that cite this one." + ) + context["related_documents_help_text"] = _( + "This is a list of documents that are related to this one." + ) return context