summaryrefslogtreecommitdiff
path: root/app/views/projects/buttons/_star.html.haml
blob: e248676be0d2a3533be47a525509e5af52ee83c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- if current_user
  = link_to toggle_star_project_path(@project), { class: 'btn star-btn toggle-star', method: :post, remote: true } do
    - if current_user.starred?(@project)
      = icon('star')
      %span.starred=  _('Unstar')
    - else
      = icon('star-o')
      %span= s_('StarProject|Star')
  .count-with-arrow
    %span.arrow
    %span.count.star-count
      = @project.star_count

- else
  = link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: _('You must sign in to star a project') do
    = icon('star')
    #{ s_('StarProject|Star') }
  .count-with-arrow
    %span.arrow
    %span.count
      = @project.star_count