Skip to content

Commit

Permalink
Improve UI
Browse files Browse the repository at this point in the history
  • Loading branch information
dalepotter committed Jul 17, 2015
1 parent 77373ab commit 1658e6a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion comprehensiveness.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
('activity-website', 'Activity Website', 1),
('title_recipient_language', 'Recipient Language (TBC)', 0),
('conditions_attached', 'Conditions Attached', 1),
('result_indicator', 'Result/Indicator', 1),
('result_indicator', 'Result/ Indicator', 1),
('valueadded_average', 'Average', 0), # don't include the average in the average
]}
column_headers = {tabname:[x[1] for x in values] for tabname, values in columns.items()}
Expand Down
2 changes: 1 addition & 1 deletion templates/comprehensiveness.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set tab='summary' %}
{% extends 'comprehensiveness_base.html' %}

{% block table_header_detail %}
{% block heading_detail %}
<p>Averages of comprehensiveness calculations of core, financial and value-added elements as defined in associated tabs.</p>
{% endblock %}

Expand Down
20 changes: 13 additions & 7 deletions templates/comprehensiveness_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,30 @@
<div class="panel panel-default" id="h_table">
<div class="panel-heading">
<span class="pull-right"><a href="{{url('comprehensiveness_'+tab+'.csv')}}">(This table as CSV)</a></span>
<h3 class="panel-title">Table of Comprehensiveness values</h3>
{% block table_header_detail %}{% endblock %}
<h3 class="panel-title">Table of Comprehensiveness values</h3>
</div>

{% if self.heading_detail() %}
<div class="panel-body">
<p>{% block heading_detail %}{% endblock %}</p>
</div>
{% endif %}

<table class="table table-striped" id="main_table">
<thead>
<tr>
<th>Publisher Name</th>
<th style="vertical-align:middle; border: 1px solid gray;">Publisher Name</th>
{% for column_header in comprehensiveness.column_headers[tab] %}
<th>{{column_header}}</th>
<th style="vertical-align:middle; border: 1px solid gray;">{{column_header}}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in comprehensiveness.table() %}
<tr>
<td><a href="publisher/{{row.publisher}}.html">{{row.publisher_title}}</a></td>
<tr {% if loop.last %} style="border-bottom: 1px solid gray;"{% endif %}>
<td style="border-right: 1px solid gray; border-left: 1px solid gray;"><a href="publisher/{{row.publisher}}.html">{{row.publisher_title}}</a></td>
{% for column_slug in comprehensiveness.column_slugs[tab] %}
<td>{% if column_slug in row %}
<td style="border-right: 1px solid gray; border-left: 1px solid gray;">{% if column_slug in row %}
{{row[column_slug+'_valid']}}
{% if row[column_slug+'_valid'] != row[column_slug] %}
<span class="text-muted">({{row[column_slug]}})</td>
Expand Down
2 changes: 1 addition & 1 deletion templates/comprehensiveness_core.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set tab='core' %}
{% extends 'comprehensiveness_base.html' %}

{% block table_header_detail %}
{% block heading_detail %}
<p>Percentage of activities where elements are populated with valid data. (Values in parentheses indicate percentage of activities where lements are populated with any data.)</p>
{% endblock %}

Expand Down

0 comments on commit 1658e6a

Please sign in to comment.