Skip to content
Snippets Groups Projects
Unverified Commit e7f1ddad authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix #2281

parent 1ccd44ef
No related branches found
No related tags found
No related merge requests found
<h2 class="category"><%= User::Favorite.model_name.human(count: 2) %></h2>
<% if current_user.favorites.none? %>
<p><%= t 'user.favorites.none' %></p>
<%
if current_user.favorites.none?
if current_university.is_really_a_university?
no_favorites_locale_key = 'user.favorites.none.in_university'
else
no_favorites_locale_key = 'user.favorites.none.not_in_university'
end
%>
<p><%= t(no_favorites_locale_key) %></p>
<% else %>
<% websites = current_user.favorites.websites.collect(&:about) %>
<%= render 'admin/communication/websites/list', websites: websites %>
<% other = current_user.favorites.except_websites %>
<% if other.any? %>
<div class="row">
<% current_user.favorites.except_websites.each do |favorite|
about = favorite.about
<% current_user.favorites.except_websites.each do |favorite|
about = favorite.about
next unless can?(:read, about) %>
<div class="col-md-6 col-lg-3 d-flex">
<%= osuny_panel about.to_s_in(current_language) do %>
<p class="small mt-n2 mb-1"><%= about.class.model_name.human %></p>
<%= link_to t('show'),
[:admin, about],
<%= link_to t('show'),
[:admin, about],
class: 'stretched-link' %>
<% end %>
</div>
......
......@@ -387,7 +387,9 @@ en:
favorites:
add: Add to favorites
remove: Remove from favorites
none: You have no favorites yet. Feel free to add the websites, extranets or journals you often work on!
none:
in_university: You have no favorites yet. Feel free to add the websites, extranets or journals you often work on!
not_in_university: You have no favorites yet. Feel free to add the websites or extranets you often work on!
photo_import:
next: Next image
nothing: No results for this search
......
......@@ -388,7 +388,9 @@ fr:
favorites:
add: Ajouter aux favoris
remove: Enlever des favoris
none: Vous n'avez pas encore de favoris, n'hésitez pas à ajouter les sites Web, extranets ou revues scientifiques auxquels vous accédez fréquemment !
none:
in_university: Vous n'avez pas encore de favoris, n'hésitez pas à ajouter les sites Web, extranets ou revues scientifiques auxquels vous accédez fréquemment !
not_in_university: Vous n'avez pas encore de favoris, n'hésitez pas à ajouter les sites Web ou extranets auxquels vous accédez fréquemment !
photo_import:
next: Images suivantes
nothing: Aucun résultat pour cette recherche
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment