debian-mirror-gitlab/app/views/projects/buttons/_star.html.haml

22 lines
735 B
Text
Raw Normal View History

2015-09-11 14:41:01 +05:30
- 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: current_user.starred?(@project) ? 'Unstar project' : 'Star project' } do
- if current_user.starred?(@project)
= icon('star fw')
%span.starred Unstar
- else
= icon('star-o fw')
%span Star
%div.count-with-arrow
%span.arrow
%span.count.star-count
2015-09-11 14:41:01 +05:30
= @project.star_count
- else
2016-06-02 11:05:42 +05:30
= link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: 'You must sign in to star a project' do
2015-09-11 14:41:01 +05:30
= icon('star fw')
Star
%div.count-with-arrow
%span.arrow
2015-09-11 14:41:01 +05:30
%span.count
= @project.star_count