Skip to content
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

Merged
merged 1 commit into from Apr 6, 2017
Merged

Display badge label on dataset and org page #849

merged 1 commit into from Apr 6, 2017

Conversation

noirbizarre
Copy link
Contributor

No description provided.

@@ -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 %}
Copy link
Member

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?

Copy link
Contributor Author

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 :/

Copy link
Member

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 :(

@noirbizarre
Copy link
Contributor Author

Changed to hide the private __badges__ access.

@@ -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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

@davidbgk
Copy link
Member

davidbgk commented Apr 5, 2017

I really prefer that way, thanks!

@noirbizarre noirbizarre merged commit 698d040 into opendatateam:master Apr 6, 2017
@noirbizarre noirbizarre deleted the fix-badges-display branch April 6, 2017 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants