Create a list of organisations (#181)

* Remove errant .DS_Store file

* Ignore .DS_Store

* Create a list of organisations

* Add an org list

* Show number of PIDs per org

* Fix HTML issue, sort orgs by title

* Try and fix the PID count

* Try and fix issues

* Try again to fix issues

* Try yet again to fix issues

* Correct the urlpart

* Change to sort_natural, minor code tidy

* Try and fix the sorting

* Try again to fix the sorting

* Remove debugging

* Add a link to orgs page
This commit is contained in:
Peter Newman authored and Nick Johnson committed 2016-09-13 17:18:51 +01:00
1 parent ce052c036e
commit c54c8582ba
3 files changed
+22

No files matched your search

+1
View File
@@ -1,4 +1,5 @@
<a href="{{ site.baseurl }}/about/">About</a>
<a href="{{ site.baseurl }}/pids/">All PIDs</a>
<a href="{{ site.baseurl }}/orgs/">All Orgs</a>
<a href="{{ site.baseurl }}/howto/">Get a PID</a>
<a href="{{ site.baseurl }}/faq/">FAQ</a>
+15
View File
@@ -0,0 +1,15 @@
{% include data.html %}
<table>
<thead>
<tr><th>Organisation</th><th>Number of PIDs</th></tr>
</thead>
{% assign sortedorgs = {{site.pages|where:"layout","org"|sort:"title"}} %}
{% for org in sortedorgs %}
{% assign urlparts = org.url|split:"/" %}
{% assign owner = urlparts[2] %}
<tr>
<th><a href="{{org.url}}">{{org.title}}</a></th>
<td>{{ pids | where:"owner",owner | size }}</td>
</tr>
{% endfor %}
</table>
+6
View File
@@ -0,0 +1,6 @@
---
layout: page
title: Organisation List
permalink: /orgs/
---
{%include orgtable.html %}