-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from codeforIATI/org-ids
Add org ids stats tables, including to publisher page
- Loading branch information
Showing
8 changed files
with
142 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<td>{{ '{:,}'.format(transaction_stats.total_orgs or 0) }}</th> | ||
<td>{{ '{:,}'.format(transaction_stats.total_refs or 0) }}</th> | ||
<td>{{ '{:,}'.format(transaction_stats.total_full_refs or 0) }}</th> | ||
{% set self_refs = (transaction_stats.total_full_refs or 0) - (transaction_stats.total_notself_refs or 0) %} | ||
<td style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;">{{ '{:,}'.format(self_refs) }}</th> | ||
{% set total_org_elements_excluding_self_refs = (transaction_stats.total_orgs or 0) - self_refs %} | ||
<td>{{ '{:,}'.format(total_org_elements_excluding_self_refs) }}</th> | ||
{% set total_refs_excluding_self_refs = (transaction_stats.total_refs or 0) - self_refs %} | ||
<td>{{ '{:,}'.format(total_refs_excluding_self_refs) }}</th> | ||
<td>{{ '{:,}'.format(transaction_stats.total_notself_refs or 0) }}</th> | ||
<td>{{ '{:,}'.format(transaction_stats.total_valid_refs or 0) }}</th> | ||
<td>{{ (((transaction_stats.total_valid_refs or 0) / total_org_elements_excluding_self_refs * 100) if total_org_elements_excluding_self_refs else 0) | round_nicely }}</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<th style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;" colspan="3">Total</th> | ||
<th style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;" rowspan="2">Self Refs</th> | ||
<th style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;" colspan="5">Excluding Self Refs</th> | ||
{% if extra_column %} | ||
<th style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;" rowspan="2"></th> | ||
{% endif %} | ||
</tr> | ||
<tr> | ||
<th>Org Elements</th> | ||
<th>Refs</th> | ||
<th>Non-Empty Refs</th> | ||
<th>Org Elements</th> | ||
<th>Refs</th> | ||
<th>Non-Empty Refs</th> | ||
<th>Valid Refs</th> | ||
<th>Percentage of Org Elements with Valid Refs</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{% extends 'base.html' %} | ||
{% block content %} | ||
<div class="row"> | ||
<div class="col-xs-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
{% include '_partials/tablesorter_instructions.html' %} | ||
</div> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;" rowspan="2">Org Type</th> | ||
{% include 'org_id_table_header.html' %} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for slug in slugs.org_type.by_slug %} | ||
{% set transaction_stats = current_stats.aggregated[slug + '_transaction_stats'] %} | ||
<tr> | ||
<td style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;"><a href="{{ url_for('org_type', slug=slug) }}" >{{ slug.replace('_org', '') | capitalize }}</a></td> | ||
{% include 'org_id_table_cells.html' %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block title %} | ||
Organisation Identifiers: {{ slug.replace('_org', '') | capitalize }} Orgs | ||
{% endblock %} | ||
|
||
{% block page_header %} | ||
<h1>Organisation Identifiers: {{ slug.replace('_org', '') | capitalize }} Orgs</h1> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="row"> | ||
<div class="col-xs-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
{% include '_partials/tablesorter_instructions.html' %} | ||
</div> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;" rowspan="2">Publisher Name</th> | ||
<th style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;" rowspan="2">Publisher Registry Id</th> | ||
{% include 'org_id_table_header.html' %} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for publisher_title, publisher in publishers_ordered_by_title %} | ||
{% set publisher_stats = get_publisher_stats(publisher) %} | ||
{% set transaction_stats = publisher_stats[slug + '_transaction_stats'] %} | ||
<tr> | ||
<td style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;"><a href="{{ url_for('publisher', publisher=publisher) }}#p_org_ids">{{ publisher_name[publisher] }}</a></td> | ||
<td style="border-left: 1px solid #ddd; border-right: 1px solid #ddd;"><a href="{{ url_for('publisher', publisher=publisher) }}#p_org_ids">{{ publisher }}</a></td> | ||
{% include 'org_id_table_cells.html' %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters