Skip to content

Commit

Permalink
Merge 25a8764 into cf70714
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickkuypers committed Oct 26, 2020
2 parents cf70714 + 25a8764 commit 34c48b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion atramhasis/templates/search_result.jinja2
Expand Up @@ -15,7 +15,7 @@
</ul>
</div>
{%- for c in concepts %}
<div class="large-3 large-3-pad columns result-grid"><a href="{{ request.route_path('concept', scheme_id= scheme_id, c_id = c.id) }}"><h5>{{ c.label }}</h5> <span> [ ID : {{ c.id }} ]</span><br><small>{{ c.type }}</small></a></div>
<div class="large-3 large-3-pad columns result-grid"><a href="{{ request.route_path('concept', scheme_id= scheme_id, c_id = c.id) }}?ctype={{ctype}}&label={% if label is not none %}{{label}}{% endif %}"><h5>{{ c.label }}</h5> <span> [ ID : {{ c.id }} ]</span><br><small>{{ c.type }}</small></a></div>
{%- endfor %}
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion atramhasis/views/views.py
Expand Up @@ -151,6 +151,9 @@ def concept_view(self):
scheme_id = self.request.matchdict['scheme_id']
c_id = self.request.matchdict['c_id']
provider = self.request.skos_registry.get_provider(scheme_id)
label = self._read_request_param('label')
ctype = self._read_request_param('ctype')

if not provider:
raise ConceptSchemeNotFoundException(scheme_id)
if 'atramhasis.force_display_label_language' in provider.metadata:
Expand All @@ -169,7 +172,7 @@ def concept_view(self):
update_last_visited_concepts(self.request, {'label': c.label(self.request.locale_name).label, 'url': url})
return {'concept': c, 'conceptType': concept_type, 'scheme_id': scheme_id,
'conceptschemes': conceptschemes, 'provider': provider,
'locale': locale}
'locale': locale, 'ctype': ctype, 'label': label}
except NoResultFound:
raise ConceptNotFoundException(c_id)

Expand Down

0 comments on commit 34c48b5

Please sign in to comment.