debian-mirror-gitlab/app/views/projects/buttons/_star.html.haml
2016-09-29 09:46:39 +05:30

21 lines
726 B
Text

- 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')
%span.starred Unstar
- else
= icon('star-o')
%span Star
%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: 'You must sign in to star a project' do
= icon('star')
Star
%div.count-with-arrow
%span.arrow
%span.count
= @project.star_count