gitlab-org--gitlab-foss/app/views/projects/buttons/_star.html.haml

22 lines
630 B
Text
Raw Normal View History

- if current_user
2016-10-31 17:59:06 -04:00
= link_to toggle_star_namespace_project_path(@project.namespace, @project), { class: 'btn star-btn toggle-star', method: :post, remote: true } do
- if current_user.starred?(@project)
2016-07-23 19:13:13 -04:00
= icon('star')
%span.starred Unstar
- else
2016-07-23 19:13:13 -04:00
= icon('star-o')
%span Star
2016-12-23 04:37:12 -05:00
.count-with-arrow
2015-12-18 14:17:19 -05:00
%span.arrow
2015-12-23 12:26:41 -05:00
%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
2016-07-23 19:13:13 -04:00
= icon('star')
2015-12-18 14:17:19 -05:00
Star
2016-12-23 04:37:12 -05:00
.count-with-arrow
2015-12-18 14:17:19 -05:00
%span.arrow
%span.count
= @project.star_count