feature/share-libs
erb 39 lines 1.38 KB
Raw
1 <div class="row mb-4">
2 <div class="col-md-12 text-center mb-3">
3 <% if user_signed_in? && users.include?(current_user) %>
4 <%= link_to(
5 '<i class="bi bi-heart-fill"></i>'.html_safe,
6 album_unvote_path(id: id),
7 remote: true,
8 method: :delete,
9 :id => "ajax_trigger"
10 )
11 %>
12 <% else %>
13 <%= link_to(
14 '<i class="bi bi-heart"></i>'.html_safe,
15 album_vote_path(id: id),
16 remote: true,
17 method: :post,
18 :id => "ajax_trigger"
19 )
20 %>
21 <% end %>
22 <span class="badge rounded-pill bg-warning text-dark"><%= users.count %></span>
23 </div>
24 <div class="col-md-12 text-center">
25 <i class="bi bi-graph-up-arrow"></i>
26 <span class="badge rounded-pill bg-warning text-dark"><%= counter %></span>
27 </div>
28 </div>
29 <div class="row">
30 <div class="col-md-12">
31 <div class="text-center">
32 <% if author == nil %>
33 <%= link_to(t('signup_to_claim'), login_path(redirect_to: request.path), class: 'more-link more-link-author') %>
34 <% else %>
35 <%= link_to("#{name_or_username(author)}".html_safe, profile_path_enhanced(author), class: 'more-link more-link-author') %>
36 <% end %>
37 </div>
38 </div>
39 </div>