2015-07-08 06:25:34 -04:00
|
|
|
- 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) } }
|
2015-12-18 16:06:48 -05:00
|
|
|
- if current_user.starred?(@project)
|
2017-11-23 02:52:15 -05:00
|
|
|
= sprite_icon('star')
|
2017-07-21 06:43:04 -04:00
|
|
|
%span.starred= _('Unstar')
|
2015-12-18 16:06:48 -05:00
|
|
|
- else
|
2017-11-23 02:52:15 -05:00
|
|
|
= 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
|
2015-07-08 06:25:34 -04:00
|
|
|
= @project.star_count
|
2015-07-08 10:55:04 -04:00
|
|
|
|
2015-07-08 06:25:34 -04:00
|
|
|
- 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
|
2017-11-23 02:52:15 -05:00
|
|
|
= 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
|
2015-07-08 06:25:34 -04:00
|
|
|
%span.count
|
|
|
|
= @project.star_count
|