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

22 lines
682 B
Text
Raw Normal View History

- if current_user
2018-02-20 17:20:48 -05:00
%button.btn.btn-default.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } }
- if current_user.starred?(@project)
= sprite_icon('star')
%span.starred= _('Unstar')
- else
= sprite_icon('star-o')
2017-06-07 16:13:44 -04:00
%span= s_('StarProject|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
2017-06-07 16:13:44 -04:00
= link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: _('You must sign in to star a project') do
= sprite_icon('star')
2017-06-07 16:13:44 -04:00
#{ s_('StarProject|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