From 26888b62acc963c99f385111cba1169d97410abb Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Fri, 18 Aug 2017 15:05:04 +0100 Subject: [PATCH 1/6] fallback link where no id guidance --- prefix_finder/frontend/templates/list.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index d042cf3..ae60c14 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -52,7 +52,11 @@

Description

To find identifiers

-

{{ org_list.access.guidanceOnLocatingIds|urlize|linebreaks}}

+ {% if org_list.access.guidanceOnLocatingIds %} +

{{ org_list.access.guidanceOnLocatingIds|urlize|linebreaks}}

+ {% else %} +

Visit the website.

+ {% endif %}
From 7780d17628a4c0778fd18b30afaf4998ed61c84f Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Sat, 19 Aug 2017 18:37:10 +0100 Subject: [PATCH 2/6] > @media width --- prefix_finder/frontend/static/css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prefix_finder/frontend/static/css/main.css b/prefix_finder/frontend/static/css/main.css index 280b713..efc7f1c 100644 --- a/prefix_finder/frontend/static/css/main.css +++ b/prefix_finder/frontend/static/css/main.css @@ -1137,7 +1137,7 @@ fieldset { display: flex; flex-direction: column; } -@media (min-width: 40em) { +@media (min-width: 100em) { .homepage { height: 100vh; } From 3b3155e94f8d7095a10d5bb5c0751114dd258c1c Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Sun, 20 Aug 2017 15:59:16 +0100 Subject: [PATCH 3/6] Use country code as abbreviation of full name --- prefix_finder/frontend/templates/list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index ae60c14..a1bbfbc 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -20,7 +20,7 @@

{{ org_list.name.en }} ({{ org_list.code }})

-

The code for this list is
{{ org_list.code }}. When you can located the organization you wish to identify in this list, you should either:

+

The code for this list is
{{ org_list.code }}. When you have located the organization you wish to identify in this list, you should either:

Enter it in an identifier database field prefixed with {{ org_list.code }}.

Example

@@ -40,7 +40,7 @@ 

Description

  • -

    Coverage: {% for x in org_list.coverage %}{{ x }}{% if not forloop.last %},{% endif %} {% endfor %}

    +

    Coverage: {% for x in org_list.coverage %}{{ x }}{% if not forloop.last %},{% endif %} {% endfor %}

  • {% if org_list.sector %} From 35542bcd662993e48b62b6a2c9bff84a4a1bb221 Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Sun, 20 Aug 2017 16:12:41 +0100 Subject: [PATCH 4/6] lookups context in list_details view --- prefix_finder/frontend/templates/list.html | 2 +- prefix_finder/frontend/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index a1bbfbc..d186792 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -40,7 +40,7 @@

    Description

    • -

      Coverage: {% for x in org_list.coverage %}{{ x }}{% if not forloop.last %},{% endif %} {% endfor %}

      +

      Coverage: {% for x in org_list.coverage %}{{ x }}{% if not forloop.last %},{% endif %} {% endfor %}

    • {% if org_list.sector %} diff --git a/prefix_finder/frontend/views.py b/prefix_finder/frontend/views.py index fc116d5..fad1da9 100644 --- a/prefix_finder/frontend/views.py +++ b/prefix_finder/frontend/views.py @@ -500,7 +500,7 @@ def list_details(request, prefix): except KeyError: raise Http404('Organization list {} does not exist'.format(prefix)) - return render(request, 'list.html', context={'org_list': org_list, 'branch':use_branch}) + return render(request, 'list.html', context={'org_list': org_list, 'lookups': lookups, 'branch':use_branch}) def _get_filename(use_branch='master'): From cfa52b3b48a0d268cc3bab09f4483830bbbfe033 Mon Sep 17 00:00:00 2001 From: BobHarper1 Date: Mon, 18 Sep 2017 10:35:03 +0100 Subject: [PATCH 5/6] point preview message to 'org-id/register' repo, not app repo --- prefix_finder/frontend/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prefix_finder/frontend/templates/base.html b/prefix_finder/frontend/templates/base.html index 5844628..f3e4d4e 100644 --- a/prefix_finder/frontend/templates/base.html +++ b/prefix_finder/frontend/templates/base.html @@ -27,7 +27,7 @@

      error_outline You are using an outdated browser. Please upgrade your browser to improve your experience.

      {% if branch and branch != "master" %} -

      error_outline You are currently previewing branch {{ branch }}. Return to master or view on GitHub

      +

      error_outline You are currently previewing branch {{ branch }}. Return to master or view on GitHub

      {% endif %} {% block main %}{% endblock %} From ebe9cae2668f2af30d42f035f25bd61a57227704 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 18 Jan 2018 12:57:55 +0000 Subject: [PATCH 6/6] Tidy up template for list coverage --- prefix_finder/frontend/templates/list.html | 2 +- prefix_finder/frontend/views.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index fb293ac..53381fd 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -52,7 +52,7 @@

      Description

      • -

        Coverage: {% for x in org_list.coverage %}{{ x }}{% if not forloop.last %},{% endif %} {% endfor %}

        +

        Coverage: {% for code, title in org_list.coverage_codes_and_titles %}{{ code }}{% if not forloop.last %},{% endif %} {% endfor %}

      • {% if org_list.sector %} diff --git a/prefix_finder/frontend/views.py b/prefix_finder/frontend/views.py index fad1da9..82f3626 100644 --- a/prefix_finder/frontend/views.py +++ b/prefix_finder/frontend/views.py @@ -158,6 +158,7 @@ def add_titles(org_list): coverage_codes = org_list.get('coverage') if coverage_codes: org_list['coverage_titles'] = [tup[1] for tup in lookups['coverage'] if tup[0] in coverage_codes] + org_list['coverage_codes_and_titles'] = [tup for tup in lookups['coverage'] if tup[0] in coverage_codes] subnational_codes = org_list.get('subnationalCoverage') if subnational_codes: subnational_coverage = []