Skip to content

Commit 9e4c0ff

Browse files
authored
Merge branch 'master' into 177-xml-metadata
2 parents 75a2bad + 40b40c1 commit 9e4c0ff

File tree

4 files changed

+36
-12
lines changed

4 files changed

+36
-12
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Steps to installation:
5555
* Create a virtual environment (note this application uses python3)
5656
* Activate the virtual environment
5757
* Install dependencies
58+
* Apply migrations
5859
* Run the development server
5960

6061
```
@@ -63,6 +64,7 @@ cd org-ids
6364
virtualenv .ve --python=/usr/bin/python3
6465
source .ve/bin/activate
6566
pip install -r requirements_dev.txt
67+
python manage.py migrate
6668
python manage.py runserver
6769
```
6870

prefix_finder/frontend/templates/footer.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{% trans "The code for this site is available on Github" %}: <a href="https://github.com/OpenDataServices/org-ids/">{%trans "org-ids" %}</a>.
77
{% trans "Licence" %}: <a href="https://www.gnu.org/licenses/agpl-3.0.html">{% trans "AGPLv3" %}</a>.
88
{% trans "Report/View issues" %}: <a href="https://github.com/OpenDataServices/org-ids/issues">{% trans "org-id issues" %}</a>.
9+
{% trans "To contribute lists" %}: <a href="http://docs.org-id.guide/en/latest">{% trans "contributors handbook" %}</a>.
910
<a href="{% url 'terms' %}">{% trans "Terms &amp; Conditions" %}</a>.
1011
{% blocktrans %}Running version {% endblocktrans %}<a href="https://github.com/OpenDataServices/org-ids/tree/{{ request.tag }}">{{ request.tag }}</a>.
1112
</p>

prefix_finder/frontend/templates/list.html

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<div class="main-content single-content">
99
<header class="single-content__header">
10-
<a href="{{ org_list.url }}" class="button" target="_blank"><i class="material-icons">link</i></a>
10+
<a href="{{ org_list.url }}" class="button" target="_blank"><i class="material-icons" title="Visit website for this list">launch</i></a>
1111
<h1>{{ org_list.name.en }} <span>({{ org_list.code }})</span></h1>
1212
</header>
1313

@@ -20,13 +20,25 @@ <h1>{{ org_list.name.en }} <span>({{ org_list.code }})</span></h1>
2020
</div>
2121

2222
<div class="single-sidebar__block single-sidebar--dark">
23+
<h2>How to use</h2>
2324
<p>The code for this list is <br/><code>{{ org_list.code }}</code>. When you have located the organization you wish to identify in this list, you should either:</p>
2425
<p>Enter it in an identifier database field prefixed with <code>{{ org_list.code }}</code>.</p>
25-
<h2>Example</h2>
2626
<pre>
2727
<code>{{ org_list.code }}-[ IDENTIFIER ]</code>
2828
</pre>
29-
<p>Or, use it within a two-part identifier, with <code>{{ org_list.code }}</code> as the 'scheme', and the identifier you have located as the 'identifier' field. </p>
29+
{% if org_list.access.exampleIdentifiers|length >= 1 %}
30+
{% if org_list.access.exampleIdentifiers|length = 1 %}
31+
<h2>Example</h2>
32+
{% else %}
33+
<h2>Examples</h2>
34+
{% endif %}
35+
<pre>
36+
{% for x in org_list.access.exampleIdentifiers|slice:":3" %}
37+
<code>{{ org_list.code }}-{{ x }}</code>
38+
{% endfor %}
39+
</pre>
40+
{% endif %}
41+
<p>Alternatively, use it within a two-part identifier, with <code>{{ org_list.code }}</code> as the 'scheme', and the identifier you have located as the 'identifier' field. </p>
3042
</div>
3143
</div>
3244

@@ -51,13 +63,20 @@ <h2>Description</h2>
5163
</ul>
5264

5365
<div class="single-meta-info__instructions">
54-
<h3>To find identifiers</h3>
55-
<p>{{ org_list.access.guidanceOnLocatingIds|urlize|linebreaks}}</p>
66+
<h3>Search options</h3>
67+
{% if org_list.access.onlineAccessDetails %}
68+
<p>{{ org_list.access.onlineAccessDetails|urlize|linebreaks }}</p>
69+
{% endif %}
70+
<h3>Find and use identifiers</h3>
71+
{% if org_list.access.guidanceOnLocatingIds %}
72+
<p>{{ org_list.access.guidanceOnLocatingIds|urlize|linebreaks }}</p>
73+
{% endif %}
5674
</div>
5775
</div>
5876

5977
<div class="single-content__block single-suggest">
6078
<p>You can suggest an edit to our information about this list by <a href="https://github.com/org-id/register/issues/new">posting an issue</a> or <a href="https://github.com/org-id/register">submitting a pull request</a>.</p>
79+
<p>The <a href="http://docs.org-id.guide/en/latest/contribute/#proposing-a-correction-or-update" target="_blank">contributors handbook</a> details how to propose changes to an existing list, and how you can request or propose a new list.</p>
6180
</div>
6281
</div>
6382
</div>

prefix_finder/frontend/templates/results.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ <h4>Sectors</h4>
5656
</div>
5757

5858
<footer class="card__controls">
59-
<a href="{{ result.url }}" class="button" target="_blank"><i class="material-icons">link</i></a>
59+
<a href="{{ result.url }}" class="button" target="_blank"><i class="material-icons" title="Visit the website for this list">launch</i></a>
6060
<div class="card__list-code"><p>List Code <code>{{ result.code }}</code></p></div>
61-
<a href="{% url "list" result.code %}" class="button"><i class="material-icons">zoom_out_map</i></a>
61+
<a href="{% url "list" result.code %}" class="button"><i class="material-icons" title="More information about this list">info_outline</i></a>
6262
</footer>
6363
</article>
6464
</div>
@@ -71,8 +71,10 @@ <h4>Sectors</h4>
7171
<h1>Possible Lists</h1>
7272
{% if all_results.recommended %}
7373
<p>It's possible you will find the organization(s) you are looking for in one of the lists below…</p>
74-
{% else %}
74+
{% elif all_result.suggested %}
7575
<p>No alternative results.</p>
76+
{% else %}
77+
<p>No alternative results. Think there should be a list here? You can make a request, read the <a href="http://docs.org-id.guide/en/latest/contribute/" target="_blank">contributors handbook</a> for details on how to request or propose a new list.</p>
7678
{% endif %}
7779
</header>
7880

@@ -115,9 +117,9 @@ <h4>Sectors</h4>
115117
</div>
116118

117119
<footer class="card__controls">
118-
<a href="{{ result.url }}" class="button" target="_blank"><i class="material-icons">link</i></a>
120+
<a href="{{ result.url }}" class="button" target="_blank"><i class="material-icons" title="Visit the website for this list">launch</i></a>
119121
<div class="card__list-code"><p>List Code <code>{{ result.code }}</code></p></div>
120-
<a href="{% url "list" result.code %}" class="button"><i class="material-icons">zoom_out_map</i></a>
122+
<a href="{% url "list" result.code %}" class="button"><i class="material-icons" title="More information about this list">info_outline</i></a>
121123
</footer>
122124
</article>
123125
</div>
@@ -174,9 +176,9 @@ <h4>Sectors</h4>
174176
</div>
175177

176178
<footer class="card__controls">
177-
<a href="{{ result.url }}" class="button" target="_blank"><i class="material-icons">link</i></a>
179+
<a href="{{ result.url }}" class="button" target="_blank"><i class="material-icons" title="Visit the website for this list">launch</i></a>
178180
<div class="card__list-code"><p>List Code <code>{{ result.code }}</code></p></div>
179-
<a href="{% url "list" result.code %}" class="button"><i class="material-icons">zoom_out_map</i></a>
181+
<a href="{% url "list" result.code %}" class="button"><i class="material-icons" title="More information about this list">info_outline</i></a>
180182
</footer>
181183
</article>
182184
</div>

0 commit comments

Comments
 (0)