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

22 lines
630 B
Text
Raw Normal View History

2015-09-11 14:41:01 +05:30
- if current_user
2017-08-17 22:00:37 +05:30
= 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-09-29 09:46:39 +05:30
= icon('star')
%span.starred Unstar
- else
2016-09-29 09:46:39 +05:30
= icon('star-o')
%span Star
2017-08-17 22:00:37 +05:30
.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
2016-09-29 09:46:39 +05:30
= icon('star')
Star
2017-08-17 22:00:37 +05:30
.count-with-arrow
%span.arrow
2015-09-11 14:41:01 +05:30
%span.count
= @project.star_count