BigW Consortium Gitlab

_star.html.haml 735 Bytes
Newer Older
1
- if current_user
2
  = link_to toggle_star_namespace_project_path(@project.namespace, @project), { class: 'btn star-btn toggle-star has-tooltip', method: :post, remote: true, title: current_user.starred?(@project) ? 'Unstar project' : 'Star project' } do
3
    - if current_user.starred?(@project)
4
      = icon('star fw')
5 6
      %span.starred Unstar
    - else
7
      = icon('star-o fw')
8
      %span Star
Jacob Schatz committed
9 10
  %div.count-with-arrow
    %span.arrow
11
    %span.count.star-count
12
      = @project.star_count
13

14
- else
15
  = link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: 'You must sign in to star a project' do
16
    = icon('star fw')
Jacob Schatz committed
17 18 19
    Star
  %div.count-with-arrow
    %span.arrow
20 21
    %span.count
      = @project.star_count