2015-09-11 14:41:01 +05:30
- if current_user
2021-04-17 20:07:23 +05:30
.count-badge.d-inline-flex.align-item-stretch.gl-mr-3.btn-group
%button.gl-button.btn.btn-default.btn-sm.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } }
2018-11-20 20:47:30 +05:30
- if current_user.starred?(@project)
2021-01-03 14:25:43 +05:30
= sprite_icon('star', css_class: 'icon')
2018-11-20 20:47:30 +05:30
%span.starred= s_('ProjectOverview|Unstar')
- else
2021-01-03 14:25:43 +05:30
= sprite_icon('star-o', css_class: 'icon')
2018-11-20 20:47:30 +05:30
%span= s_('ProjectOverview|Star')
2021-04-17 20:07:23 +05:30
= link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'gl-button btn btn-default btn-sm star-count count' do
= @project.star_count
2015-09-11 14:41:01 +05:30
- else
2021-04-17 20:07:23 +05:30
.count-badge.d-inline-flex.align-item-stretch.gl-mr-3.btn-group
= link_to new_user_session_path, class: 'gl-button btn btn-default btn-sm has-tooltip star-btn', title: s_('ProjectOverview|You must sign in to star a project') do
2021-01-03 14:25:43 +05:30
= sprite_icon('star-o', css_class: 'icon')
2019-01-03 12:48:30 +05:30
%span= s_('ProjectOverview|Star')
2021-04-17 20:07:23 +05:30
= link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'gl-button btn btn-default btn-sm star-count count' do
= @project.star_count