_star.html.haml 652 字节
Newer Older
1
- if current_user
2
  = link_to toggle_star_project_path(@project), { class: 'btn star-btn toggle-star', method: :post, remote: true } do
3
    - if current_user.starred?(@project)
W
winniehell 已提交
4
      = icon('star')
5
      %span.starred=  _('Unstar')
6
    - else
W
winniehell 已提交
7
      = icon('star-o')
8
      %span= s_('StarProject|Star')
9
  .count-with-arrow
J
Jacob Schatz 已提交
10
    %span.arrow
J
Jacob Schatz 已提交
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
W
winniehell 已提交
16
    = icon('star')
17
    #{ s_('StarProject|Star') }
18
  .count-with-arrow
J
Jacob Schatz 已提交
19
    %span.arrow
20 21
    %span.count
      = @project.star_count