2015-07-08 10:25:34 +00:00
|
|
|
- if current_user
|
2018-07-20 17:16:52 +00:00
|
|
|
%button.btn.btn-default.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } }>
|
2015-12-18 21:06:48 +00:00
|
|
|
- if current_user.starred?(@project)
|
2017-11-23 07:52:15 +00:00
|
|
|
= sprite_icon('star')
|
2017-07-21 10:43:04 +00:00
|
|
|
%span.starred= _('Unstar')
|
2015-12-18 21:06:48 +00:00
|
|
|
- else
|
2017-11-23 07:52:15 +00:00
|
|
|
= sprite_icon('star-o')
|
2017-06-07 20:13:44 +00:00
|
|
|
%span= s_('StarProject|Star')
|
2016-12-23 09:37:12 +00:00
|
|
|
.count-with-arrow
|
2015-12-18 19:17:19 +00:00
|
|
|
%span.arrow
|
2015-12-23 17:26:41 +00:00
|
|
|
%span.count.star-count
|
2015-07-08 10:25:34 +00:00
|
|
|
= @project.star_count
|
2015-07-08 14:55:04 +00:00
|
|
|
|
2015-07-08 10:25:34 +00:00
|
|
|
- else
|
2017-06-07 20:13:44 +00:00
|
|
|
= link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: _('You must sign in to star a project') do
|
2017-11-23 07:52:15 +00:00
|
|
|
= sprite_icon('star')
|
2017-06-07 20:13:44 +00:00
|
|
|
#{ s_('StarProject|Star') }
|
2016-12-23 09:37:12 +00:00
|
|
|
.count-with-arrow
|
2015-12-18 19:17:19 +00:00
|
|
|
%span.arrow
|
2015-07-08 10:25:34 +00:00
|
|
|
%span.count
|
|
|
|
= @project.star_count
|