2015-09-11 14:41:01 +05:30
|
|
|
- if current_user
|
2018-03-27 19:54:05 +05:30
|
|
|
%button.btn.btn-default.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } }
|
2016-01-14 18:37:52 +05:30
|
|
|
- if current_user.starred?(@project)
|
2018-03-17 18:26:18 +05:30
|
|
|
= sprite_icon('star')
|
2017-09-10 17:25:29 +05:30
|
|
|
%span.starred= _('Unstar')
|
2016-01-14 18:37:52 +05:30
|
|
|
- else
|
2018-03-17 18:26:18 +05:30
|
|
|
= sprite_icon('star-o')
|
2017-09-10 17:25:29 +05:30
|
|
|
%span= s_('StarProject|Star')
|
2017-08-17 22:00:37 +05:30
|
|
|
.count-with-arrow
|
2016-01-14 18:37:52 +05:30
|
|
|
%span.arrow
|
|
|
|
%span.count.star-count
|
2015-09-11 14:41:01 +05:30
|
|
|
= @project.star_count
|
|
|
|
|
|
|
|
- else
|
2017-09-10 17:25:29 +05:30
|
|
|
= link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: _('You must sign in to star a project') do
|
2018-03-17 18:26:18 +05:30
|
|
|
= sprite_icon('star')
|
2017-09-10 17:25:29 +05:30
|
|
|
#{ s_('StarProject|Star') }
|
2017-08-17 22:00:37 +05:30
|
|
|
.count-with-arrow
|
2016-01-14 18:37:52 +05:30
|
|
|
%span.arrow
|
2015-09-11 14:41:01 +05:30
|
|
|
%span.count
|
|
|
|
= @project.star_count
|