2015-07-08 10:25:34 +00:00
- if current_user
2020-06-01 15:08:16 +00:00
.count-badge.d-inline-flex.align-item-stretch.gl-mr-3
2018-12-07 14:11:42 +00:00
%button.count-badge-button.btn.btn-default.btn-xs.d-flex.align-items-center.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } }
2018-09-06 07:27:39 +00:00
- if current_user.starred?(@project)
= sprite_icon('star', { css_class: 'icon' })
%span.starred= s_('ProjectOverview|Unstar')
- else
= sprite_icon('star-o', { css_class: 'icon' })
%span= s_('ProjectOverview|Star')
2018-12-07 14:11:42 +00:00
%span.star-count.count-badge-count.d-flex.align-items-center
2019-01-25 20:53:00 +00:00
= link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do
= @project.star_count
2015-07-08 14:55:04 +00:00
2015-07-08 10:25:34 +00:00
- else
2020-06-01 15:08:16 +00:00
.count-badge.d-inline-flex.align-item-stretch.gl-mr-3
2018-12-07 14:11:42 +00:00
= link_to new_user_session_path, class: 'btn btn-default btn-xs has-tooltip count-badge-button d-flex align-items-center star-btn', title: s_('ProjectOverview|You must sign in to star a project') do
2018-09-06 07:27:39 +00:00
= sprite_icon('star-o', { css_class: 'icon' })
%span= s_('ProjectOverview|Star')
2018-12-07 14:11:42 +00:00
%span.star-count.count-badge-count.d-flex.align-items-center
2019-01-25 20:53:00 +00:00
= link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do
= @project.star_count