Skip to content

Commit

Permalink
Use followers accross all searches
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre committed Jan 31, 2019
1 parent 7c724af commit 48fc165
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@
- Major form fixes [#2000](https://github.com/opendatateam/udata/pull/2000)
- Improved admin errors handling: visual feedback on all errors, `Sentry-ID` header if present, hide organization unauthorized actions [#2005](https://github.com/opendatateam/udata/pull/2005)
- Expose and import licenses `alternate_urls` and `alternate_titles` fields [#2006](https://github.com/opendatateam/udata/pull/2006)
- Be consistent on search results wording and picto (Stars vs Followers)

## 1.6.2 (2018-11-05)

Expand Down
10 changes: 5 additions & 5 deletions udata/templates/dataset/list.html
Expand Up @@ -15,7 +15,7 @@

{% block breadcrumb %}
<li class="active">

{{ _('Datasets') }}

{% if datasets.total > 0 %}
Expand All @@ -24,7 +24,7 @@
end=datasets.page_end,
total=datasets.total) }}</small>
{% endif %}

{% include "dataset/search-labels.html" %}
</li>
{% endblock %}
Expand All @@ -41,15 +41,15 @@
created=(_('Creation date'), 'desc'),
last_modified=(_('Last modification date'), 'desc'),
reuses=(_('Reuses'), 'desc'),
followers=(_('Stars'), 'desc')
followers=(_('Followers'), 'desc')
) }}
</div>
{% endblock %}

{% block main_content %}
<div class="row">

{% if datasets %}
{% if datasets %}
<div class="col-md-8 col-lg-9 smaller">

<ul class="search-results">
Expand All @@ -67,7 +67,7 @@
<aside class="col-md-4 col-lg-3">
{% include theme('dataset/search-panel.html') %}
</aside>
{% else %}
{% else %}
<p class="text-center">
<strong>
{{ _('No results found, try to be less specific.') }}
Expand Down
2 changes: 1 addition & 1 deletion udata/templates/dataset/search-result.html
Expand Up @@ -103,7 +103,7 @@ <h4 class="result-title ellipsis">{{ dataset.full_title }}</h4>

<li>
<a class="btn btn-xs" v-tooltip tooltip-placement="top"
title="{{ _('Followers') }}">
title="{{ _('Number of followers') }}">
<span class="{{ ficon('fa-star') }} fa-fw"></span>
{{ dataset.metrics.followers or 0 }}
</a>
Expand Down
11 changes: 1 addition & 10 deletions udata/templates/organization/search-result.html
Expand Up @@ -42,20 +42,11 @@ <h4 class="result-title ellipsis">{{ organization.name }}</h4>
</a>
</li>
{% endif %}
{% if organization.metrics.stars %}
<li>
<a class="btn btn-xs" v-tooltip tooltip-placement="top"
title="{{ _('Number of stars') }}">
<span class="{{ ficon('fa-star') }} fa-fw"></span>
{{ ngettext('%(num)d star', '%(num)d stars', organization.metrics.stars or 0) }}
</a>
</li>
{% endif %}
{% if organization.metrics.followers %}
<li>
<a class="btn btn-xs" v-tooltip tooltip-placement="top"
title="{{ _('Number of followers') }}">
<span class="{{ ficon('fa-eye') }} fa-fw"></span>
<span class="{{ ficon('fa-followers') }} fa-fw"></span>
{{ ngettext('%(num)d follower', '%(num)d followers', organization.metrics.followers or 0) }}
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions udata/templates/reuse/search-result.html
Expand Up @@ -29,9 +29,9 @@ <h4 class="result-title ellipsis">{{ reuse.title }}</h4>
</li>
<li>
<a class="btn btn-xs" v-tooltip tooltip-placement="top"
title="{{ _('Number of stars') }}">
title="{{ _('Number of followers') }}">
<span class="fa fa-star fa-fw"></span>
{{ ngettext('%(num)d star', '%(num)d stars', reuse.metrics.followers or 0) }}
{{ ngettext('%(num)d follower', '%(num)d followers', reuse.metrics.followers or 0) }}
</a>
</li>
</ul>
Expand Down

0 comments on commit 48fc165

Please sign in to comment.