2015-07-08 06:25:34 -04:00
|
|
|
- if current_user
|
2016-10-31 17:59:06 -04:00
|
|
|
= link_to toggle_star_namespace_project_path(@project.namespace, @project), { class: 'btn star-btn toggle-star', method: :post, remote: true } do
|
2015-12-18 16:06:48 -05:00
|
|
|
- if current_user.starred?(@project)
|
2016-07-23 19:13:13 -04:00
|
|
|
= icon('star')
|
2015-12-18 16:06:48 -05:00
|
|
|
%span.starred Unstar
|
|
|
|
- else
|
2016-07-23 19:13:13 -04:00
|
|
|
= icon('star-o')
|
2015-12-18 16:06:48 -05:00
|
|
|
%span 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
|
2016-03-20 15:01:46 -04:00
|
|
|
= link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: 'You must sign in to star a project' do
|
2016-07-23 19:13:13 -04:00
|
|
|
= icon('star')
|
2015-12-18 14:17:19 -05:00
|
|
|
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
|