New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display badge label on dataset and org page #849
Display badge label on dataset and org page #849
Conversation
udata/templates/dataset/display.html
Outdated
@@ -190,7 +190,7 @@ <h3 class="text-left">{{ _('Producer') }}</h3> | |||
</a> | |||
{% for badge in dataset.badges %} | |||
<a href="{{ url_for('front.search', badge=badge) }}"> | |||
{{ badge }}</a>{% if not loop.last %}, {% endif %} | |||
{{ dataset.__badges__[badge.kind] }}</a>{% if not loop.last %}, {% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to expose __private__
in templates? Why iterating over badges is not enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the way it's done, right now badge object doesn't has access to the label :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I get it, too bad :(
Changed to hide the private |
@@ -44,7 +44,7 @@ | |||
<a href="{{ url_for('front.search', badge=badge) }}" | |||
title="{{ _('See all organizations with that badge.') }}"> | |||
<span class="glyphicon glyphicon-bookmark"></span> | |||
{{ badge }}</a> | |||
{{ org.badge_laebl(badge) }}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
I really prefer that way, thanks! |
No description provided.