Skip to content

Commit

Permalink
problem with popular concepts #277
Browse files Browse the repository at this point in the history
  • Loading branch information
Maarten Taeymans committed May 3, 2016
1 parent 3ba4400 commit e1cbb2f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions atramhasis/templates/macros.jinja2
Expand Up @@ -55,8 +55,8 @@
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ ga_key }}', 'auto');
Expand Down Expand Up @@ -127,11 +127,13 @@

{% macro popular_concepts(request, scheme_id, max) %}
{% for c in request.data_managers['audit_manager'].get_most_popular_concepts_for_conceptscheme(scheme_id, max) %}
<ul class="no_bullet">
<li class="cube"><a href="{{ request.route_path('atramhasis.get_concept', scheme_id=scheme_id, c_id=c['concept_id']) }}">
{% set conceptLabel = request.skos_registry.get_provider(scheme_id).get_by_id(c['concept_id']) %}
{% if conceptLabel and conceptLabel.label() %}{{ conceptLabel.label().label|capitalize() }}{% else %}{{ '-' }}{% endif %}
</a></li>
</ul>
{% set conceptLabel = request.skos_registry.get_provider(scheme_id).get_by_id(c['concept_id']) %}
{% if conceptLabel and conceptLabel.label() %}
<ul class="no_bullet">
<li class="cube"><a href="{{ request.route_path('atramhasis.get_concept', scheme_id=scheme_id, c_id=c['concept_id']) }}">
{{ conceptLabel.label().label|capitalize() }}
</a></li>
</ul>
{% endif %}
{% endfor %}
{% endmacro %}

0 comments on commit e1cbb2f

Please sign in to comment.