From 26888b62acc963c99f385111cba1169d97410abb Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Fri, 18 Aug 2017 15:05:04 +0100 Subject: [PATCH 01/18] 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 02/18] > @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 03/18] 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 04/18] 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 05/18] 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 f8d60791b574b1bb0ec3686c5bf4871ea0e0a3ee Mon Sep 17 00:00:00 2001 From: BobHarper1 Date: Mon, 25 Sep 2017 18:05:30 +0100 Subject: [PATCH 06/18] show onlineAccessDetails under "To find identifiers" --- prefix_finder/frontend/templates/list.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index bafcd73..474f360 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -52,7 +52,12 @@

      Description

      To find identifiers

      -

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

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

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

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

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

      + {% endif %}
    From df5ee2ba9b46ebc54d59209fe11e468d02daf1db Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 24 Oct 2017 16:43:09 +0100 Subject: [PATCH 07/18] [#177] Fix broken link in XML metadata --- prefix_finder/frontend/views.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/prefix_finder/frontend/views.py b/prefix_finder/frontend/views.py index fc116d5..edd99ef 100644 --- a/prefix_finder/frontend/views.py +++ b/prefix_finder/frontend/views.py @@ -561,7 +561,18 @@ def make_xml_codelist(use_branch="master"): root = ET.Element("codelist") meta = ET.SubElement(root, "metadata") ET.SubElement(ET.SubElement(meta, "name"),"narrative").text = "Organization Identifier Lists" - ET.SubElement(ET.SubElement(meta, "description"),"narrative").text = "Organization identifier lists and their code. These can be used as the prefix for an organization identifier. For general guidance about constructing Organization Identifiers, please see http://iatistandard.org/organization-identifiers/ This list was formerly maintained by the IATI Secretariat as the Organization Registration Agency codelist. This version is maintained by the Identify-Org project, of which IATI is a member. New code requests should be made via Identify-org.net" + ET.SubElement(ET.SubElement(meta, "description"),"narrative").text = """ + Organization identifier lists and their code. These can be used as the + prefix for an organization identifier. For general guidance about + constructing Organization Identifiers, please see + http://iatistandard.org/organization-identifiers/ + + This list was formerly maintained by the IATI Secretariat as the + Organization Registration Agency codelist. This version is maintained + by the org-id.guide project, of which IATI is a member. New code + requests should be made via + http://docs.org-id.guide/en/latest/contribute/ + """ items = ET.SubElement(root, "codelist-items") for entry in org_id_dict[use_branch].values(): From 1b34775e6f41867030ee8b1d5a592d7ed920910f Mon Sep 17 00:00:00 2001 From: BobHarper1 Date: Wed, 1 Nov 2017 16:57:11 +0000 Subject: [PATCH 08/18] better link/more info icons plus tooltip titles --- prefix_finder/frontend/templates/list.html | 2 +- prefix_finder/frontend/templates/results.html | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index bafcd73..72c9531 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -7,7 +7,7 @@
    - link + launch

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

    diff --git a/prefix_finder/frontend/templates/results.html b/prefix_finder/frontend/templates/results.html index 9e938ef..d7533ce 100644 --- a/prefix_finder/frontend/templates/results.html +++ b/prefix_finder/frontend/templates/results.html @@ -56,9 +56,9 @@

    Sectors

@@ -115,9 +115,9 @@

Sectors

@@ -174,9 +174,9 @@

Sectors

From 5e2524224572a11dc7413a4c34b80d85bcf0ab8e Mon Sep 17 00:00:00 2001 From: BobHarper1 Date: Sat, 4 Nov 2017 16:04:46 +0000 Subject: [PATCH 09/18] link handbook from footer --- prefix_finder/frontend/templates/footer.html | 1 + 1 file changed, 1 insertion(+) diff --git a/prefix_finder/frontend/templates/footer.html b/prefix_finder/frontend/templates/footer.html index dfae8e1..82f5564 100644 --- a/prefix_finder/frontend/templates/footer.html +++ b/prefix_finder/frontend/templates/footer.html @@ -6,6 +6,7 @@ {% trans "The code for this site is available on Github" %}: {%trans "org-ids" %}. {% trans "Licence" %}: {% trans "AGPLv3" %}. {% trans "Report/View issues" %}: {% trans "org-id issues" %}. + {% trans "To contribute lists" %}: {% trans "contributors handbook" %}. {% trans "Terms & Conditions" %}. {% blocktrans %}Running version {% endblocktrans %}{{ request.tag }}.

From 139e8242754d4ed3357a06564fcd39d767052028 Mon Sep 17 00:00:00 2001 From: BobHarper1 Date: Sat, 4 Nov 2017 16:07:41 +0000 Subject: [PATCH 10/18] if no suggested or possible results, ask use to contribute, link handbk --- prefix_finder/frontend/templates/results.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prefix_finder/frontend/templates/results.html b/prefix_finder/frontend/templates/results.html index 9e938ef..52bd785 100644 --- a/prefix_finder/frontend/templates/results.html +++ b/prefix_finder/frontend/templates/results.html @@ -71,8 +71,10 @@

Sectors

Possible Lists

{% if all_results.recommended %}

It's possible you will find the organization(s) you are looking for in one of the lists below…

- {% else %} + {% elif all_result.suggested %}

No alternative results.

+ {% else %} +

No alternative results. Think there should be a list here? You can make a request, read the contributors handbook for details on how to request or propose a new list.

{% endif %} From 101d78fc14c80f6a7cb781c5093521de94a950ce Mon Sep 17 00:00:00 2001 From: BobHarper1 Date: Sat, 4 Nov 2017 16:08:35 +0000 Subject: [PATCH 11/18] Add link to contributors handbook below list change/pull request pointer --- prefix_finder/frontend/templates/list.html | 1 + 1 file changed, 1 insertion(+) diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index bafcd73..8dbd8b6 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -58,6 +58,7 @@

To find identifiers

You can suggest an edit to our information about this list by posting an issue or submitting a pull request.

+

The contributors handbook details how to propose changes to an existing list, and how you can request or propose a new list.

From dfb2fe67495f0eba157e9f15000b6255794fc586 Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Thu, 7 Dec 2017 12:53:05 +0000 Subject: [PATCH 12/18] need to migrate --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7b5b30f..b63a6cc 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ Steps to installation: * Create a virtual environment (note this application uses python3) * Activate the virtual environment * Install dependencies +* Apply migrations * Run the development server ``` @@ -63,6 +64,7 @@ cd org-ids virtualenv .ve --python=/usr/bin/python3 source .ve/bin/activate pip install -r requirements_dev.txt +python manage.py migrate python manage.py runserver ``` From 9264f5e8eef96871f796d9e4b810bda02be92e2e Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Fri, 8 Dec 2017 17:16:45 +0000 Subject: [PATCH 13/18] use examples identifiers in sidebar --- prefix_finder/frontend/templates/list.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index bafcd73..e6ec86b 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -20,13 +20,25 @@

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

+

How to use

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

 {{ org_list.code }}-[ IDENTIFIER ]
           
-

Or, use it within a two-part identifier, with {{ org_list.code }} as the 'scheme', and the identifier you have located as the 'identifier' field.

+ {% if org_list.access.exampleIdentifiers|length >= 1 %} + {% if org_list.access.exampleIdentifiers|length = 1 %} +

Example

+ {% else %} +

Examples

+ {% endif %} +
+              {% for x in org_list.access.exampleIdentifiers|slice:":3" %}
+{{ org_list.code }}-{{ x }}
+              {% endfor %}
+          
+ {% endif %} +

Alternatively, use it within a two-part identifier, with {{ org_list.code }} as the 'scheme', and the identifier you have located as the 'identifier' field.

From 1865f4ebe34564c2a4bf43876220b62f1915daba Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Wed, 13 Dec 2017 11:50:37 +0000 Subject: [PATCH 14/18] titles for guidancec2 --- prefix_finder/frontend/templates/list.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index 474f360..335bcda 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -51,10 +51,11 @@

Description

-

To find identifiers

+

Search options

{% if org_list.access.onlineAccessDetails %}

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

{% endif %} +

Find and use identifiers

{% if org_list.access.guidanceOnLocatingIds %}

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

{% endif %} From e95e904a56500c8c5137ca33415b2fc1789e7532 Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Thu, 18 Jan 2018 11:29:06 +0000 Subject: [PATCH 15/18] add tag for list example splitting --- prefix_finder/frontend/templates/list.html | 4 +++- prefix_finder/frontend/templatetags/list_filters.py | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 prefix_finder/frontend/templatetags/list_filters.py diff --git a/prefix_finder/frontend/templates/list.html b/prefix_finder/frontend/templates/list.html index e6ec86b..339b394 100644 --- a/prefix_finder/frontend/templates/list.html +++ b/prefix_finder/frontend/templates/list.html @@ -1,6 +1,8 @@ {% extends 'base.html' %} +{% load list_filters %} {% load static %} + {% block main %}
{% include "sidebar.html" %} @@ -33,7 +35,7 @@

Example

Examples

{% endif %}
-              {% for x in org_list.access.exampleIdentifiers|slice:":3" %}
+              {% for x in org_list.access.exampleIdentifiers|split_examples:","|slice:":3" %}
 {{ org_list.code }}-{{ x }}
               {% endfor %}
           
diff --git a/prefix_finder/frontend/templatetags/list_filters.py b/prefix_finder/frontend/templatetags/list_filters.py new file mode 100644 index 0000000..8ae55d0 --- /dev/null +++ b/prefix_finder/frontend/templatetags/list_filters.py @@ -0,0 +1,8 @@ +from django import template + +register = template.Library() + + +@register.filter(name='split_examples') +def split_examples(value, arg): + return value.replace(" ","").split(arg) \ No newline at end of file From 75a2bad2fa5d2680a6809e1c5e672ee45b0e4689 Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Thu, 18 Jan 2018 11:46:08 +0000 Subject: [PATCH 16/18] update IATI link --- prefix_finder/frontend/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prefix_finder/frontend/views.py b/prefix_finder/frontend/views.py index edd99ef..d88d168 100644 --- a/prefix_finder/frontend/views.py +++ b/prefix_finder/frontend/views.py @@ -565,7 +565,7 @@ def make_xml_codelist(use_branch="master"): Organization identifier lists and their code. These can be used as the prefix for an organization identifier. For general guidance about constructing Organization Identifiers, please see - http://iatistandard.org/organization-identifiers/ + http://iatistandard.org/202/guidance/how-to-publish/iati-organisation-identifiers/ This list was formerly maintained by the IATI Secretariat as the Organization Registration Agency codelist. This version is maintained From 72e9ccd03c90895993679d7e0a32286a3143ccee Mon Sep 17 00:00:00 2001 From: Bob Harper Date: Thu, 18 Jan 2018 11:50:40 +0000 Subject: [PATCH 17/18] add title to icons --- prefix_finder/frontend/templates/results.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prefix_finder/frontend/templates/results.html b/prefix_finder/frontend/templates/results.html index d7533ce..566465c 100644 --- a/prefix_finder/frontend/templates/results.html +++ b/prefix_finder/frontend/templates/results.html @@ -115,7 +115,7 @@

Sectors

@@ -174,7 +174,7 @@

Sectors

From ebe9cae2668f2af30d42f035f25bd61a57227704 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 18 Jan 2018 12:57:55 +0000 Subject: [PATCH 18/18] 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 = []