blob: cb55903d4aba9e3591a9efbcda383f4fe8ab88f5 (
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_namespace_project_path(@project.namespace, @project), class: 'btn star-btn toggle-star has_tooltip', method: :post, remote: true, title: "星标项目" do
- if current_user.starred?(@project)
= icon('star fw')
%span.starred 取消星标
- else
= icon('star-o fw')
%span 星标
%div.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: '必须登入后才能给项目加注星标' do
= icon('star fw')
星标
%div.count-with-arrow
%span.arrow
%span.count
= @project.star_count
|