Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #158 from salsadigitalauorg/develop
Browse files Browse the repository at this point in the history
Theme enhancements and UAT feedback items
  • Loading branch information
duttonw authored Aug 4, 2020
2 parents c8d70b9 + 5624058 commit 987b11e
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 6,336 deletions.
5 changes: 5 additions & 0 deletions ckanext/data_qld_theme/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def get_comment_notification_recipients_enabled():
return config.get('ckan.comments.follow_mute_enabled', False)


def is_reporting_enabled():
return 'data_qld_reporting' in config.get('ckan.plugins', '')


def is_request_for_resource():
"""
Searching for a url path for /dataset/ and /resource/
Expand Down Expand Up @@ -147,4 +151,5 @@ def get_helpers(self):
'comment_notification_recipients_enabled': get_comment_notification_recipients_enabled,
'populate_revision': populate_revision,
'unreplied_comments_x_days': unreplied_comments_x_days,
'is_reporting_enabled': is_reporting_enabled
}
4,080 changes: 37 additions & 4,043 deletions ckanext/data_qld_theme/public/tick_green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,273 changes: 23 additions & 2,250 deletions ckanext/data_qld_theme/public/tick_grey.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions ckanext/data_qld_theme/templates/package/comment_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ <h3>Reply to comment:</h3>
{% endmacro %}

{% macro comment_thread(thread, content_type, depth=0) %}

{% if thread.comments | length > 0 and notification_actions_enabled %}
{% snippet "snippets/content_item_notification_actions.html", following=following_content_item, content_type=content_type, thread_id=thread.id %}
{% endif %}

{% for comment in thread.comments %}
<div id="comment_{{ comment.id }}" class="comment-wrapper">
{% set user_can_manage = h.user_can_manage_comments(content_type, pkg_id) %}
Expand Down Expand Up @@ -150,10 +155,6 @@ <h3>{{ comment.subject }}</h3>

<h3 id="comments">{{ _('Comments') }}</h3>

{% if notification_actions_enabled %}
{% snippet "snippets/content_item_notification_actions.html", following=following_content_item, content_type=content_type, thread_id=thread.id %}
{% endif %}

<div class="comment-container">
{{ comment_thread(thread, content_type) }}
</div>
Expand Down
11 changes: 1 addition & 10 deletions ckanext/data_qld_theme/templates/qa/openness_stars.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,4 @@
"updated": "2015-11-19T16:54:49.480393",

#}
<div class="qa openness-{{ openness_score }}">
{% if openness_score != None %}
<span title="{{ _('Reason') }} : {{ openness_score_reason }} {{ _('Checked') }}: {{ h.render_datetime(updated) }}">
<a href="https://www.data.qld.gov.au/article/standards-and-guidance/data-usability-rating" target="_blank">{{ _('Data usability rating') }}</a>
: {% snippet "qa/stars.html", stars=openness_score %} <br>
{% snippet "qa/stars_explained.html", openness_score=openness_score %} <br>
{% else %}
{{ _('No data usability rating information yet.') }}
{% endif %}
</div>
{% snippet 'qa/snippets/data_usability_rating.html', openness_score=openness_score, openness_score_reason=openness_score_reason, updated=updated %}
11 changes: 1 addition & 10 deletions ckanext/data_qld_theme/templates/qa/openness_stars_brief.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,4 @@
"updated": "2015-11-19T16:54:49.480393",

#}
<div class="qa openness-{{ openness_score }}">
{% if openness_score != None %}
<span title="{{ _('Reason') }} : {{ openness_score_reason }} {{ _('Checked') }}: {{ h.render_datetime(updated) }}">
<a href="https://www.data.qld.gov.au/article/standards-and-guidance/data-usability-rating" target="_blank">{{ _('Data usability rating') }}</a>
: {% snippet "qa/stars.html", stars=openness_score %} <br>
{% snippet "qa/stars_explained.html", openness_score=openness_score %} <br>
{% else %}
{{ _('No data usability rating information yet.') }}
{% endif %}
</div>
{% snippet 'qa/snippets/data_usability_rating.html', openness_score=openness_score, openness_score_reason=openness_score_reason, updated=updated %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="qa openness-{{ openness_score }}">
{% if openness_score != None %}
<span title="{{ _('Reason') }} : {{ openness_score_reason }} {{ _('Checked') }}: {{ h.render_datetime(updated) }}">
<a href="https://www.data.qld.gov.au/article/standards-and-guidance/data-usability-rating" target="_blank">{{ _('Data usability rating') }}</a>
: {% snippet "qa/snippets/stars.html", stars=openness_score %} <br>
{% snippet "qa/snippets/stars_explained.html", openness_score=openness_score %} <br>
{% else %}
{{ _('No data usability rating information yet.') }}
{% endif %}
</div>
33 changes: 15 additions & 18 deletions ckanext/data_qld_theme/templates/report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,24 @@
<div class="dataset">
<div class="row">
{% for report in reports %}
<!-- We do not want to display the default qa 'openness' report as we have created a new modified 'data_usability_report for dataqld' -->
{% if report.name != 'openness' %}
{% if loop.index0%4==0 %}<div class="clearfix visible-lg"></div>{% endif %}
{% if loop.index0%3==0 %}<div class="clearfix visible-md clearfix-ie7"></div>{% endif %}
{% if loop.index0%2==0 %}<div class="clearfix visible-sm"></div>{% endif %}
<div class="col-lg-3 col-md-4 col-sm-6">
{% set report_url=h.url_for('report', report_name=report.name, **h.report__explicit_default_options(report.name)) %}
<div class="report-summary">
<a href="{{ report_url }}" class="report-header">
<div class="report-title">{{ report.title }}</div>
{% if loop.index0%4==0 %}<div class="clearfix visible-lg"></div>{% endif %}
{% if loop.index0%3==0 %}<div class="clearfix visible-md clearfix-ie7"></div>{% endif %}
{% if loop.index0%2==0 %}<div class="clearfix visible-sm"></div>{% endif %}
<div class="col-lg-3 col-md-4 col-sm-6">
{% set report_url=h.url_for('report', report_name=report.name, **h.report__explicit_default_options(report.name)) %}
<div class="report-summary">
<a href="{{ report_url }}" class="report-header">
<div class="report-title">{{ report.title }}</div>
</a>
<div class="report-body">
<div class="report-description">{{ report.description }}</div>
<div class="clearfix clearfix-ie7"> &nbsp;</div>
<a class="view-report-link" href="{{ report_url }}">
{{ _('View Report') }}
</a>
<div class="report-body">
<div class="report-description">{{ report.description }}</div>
<div class="clearfix clearfix-ie7"> &nbsp;</div>
<a class="view-report-link" href="{{ report_url }}">
{{ _('View Report') }}
</a>
</div>
</div>
</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ckanext/data_qld_theme/templates/user/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ h.build_nav_icon('dashboard.datasets', _('My Datasets')) }}
{{ h.build_nav_icon('dashboard.organizations', _('My Organizations')) }}
{{ h.build_nav_icon('dashboard.groups', _('My Groups')) }}
{% if h.check_access('has_user_permission_for_some_org', {'permission': 'create_dataset'}) %}
{% if h.is_reporting_enabled() and h.check_access('has_user_permission_for_some_org', {'permission': 'create_dataset'}) %}
{{ h.build_nav_icon('dashboard.reports', _('My Reports')) }}
{% endif %}
</ul>
Expand Down

0 comments on commit 987b11e

Please sign in to comment.