debian-mirror-gitlab/app/views/projects/buttons/_star.html.haml

22 lines
1.4 KiB
Text
Raw Normal View History

2015-09-11 14:41:01 +05:30
- if current_user
2020-06-23 00:09:42 +05:30
.count-badge.d-inline-flex.align-item-stretch.gl-mr-3
2019-02-15 15:39:39 +05:30
%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-11-20 20:47:30 +05:30
- 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')
2019-02-15 15:39:39 +05:30
%span.star-count.count-badge-count.d-flex.align-items-center
2019-10-12 21:52:04 +05:30
= link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do
= @project.star_count
2015-09-11 14:41:01 +05:30
- else
2020-06-23 00:09:42 +05:30
.count-badge.d-inline-flex.align-item-stretch.gl-mr-3
2019-02-15 15:39:39 +05:30
= 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
2019-01-03 12:48:30 +05:30
= sprite_icon('star-o', { css_class: 'icon' })
%span= s_('ProjectOverview|Star')
2019-02-15 15:39:39 +05:30
%span.star-count.count-badge-count.d-flex.align-items-center
2019-10-12 21:52:04 +05:30
= link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do
= @project.star_count