Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_fork.html.haml « buttons « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c9dcfaff8c6b8d607756ce0386fff9e7e92fa1c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- unless @project.empty_repo?
  - if current_user
    .count-badge.btn-group
      - if current_user.already_forked?(@project) && current_user.forkable_namespaces.size < 2
        = link_button_to namespace_project_path(current_user, current_user.fork_of(@project)), title: s_('ProjectOverview|Go to your fork'), class: 'has-tooltip fork-btn', icon: 'fork' do
          = s_('ProjectOverview|Fork')
      - else
        - disabled_tooltip = fork_button_disabled_tooltip(@project)
        - count_class = 'disabled' unless can?(current_user, :read_code, @project)
        - button_class = 'disabled' if disabled_tooltip

        %span.btn-group{ class: ('has-tooltip' if disabled_tooltip), title: disabled_tooltip }
          = link_button_to new_project_fork_path(@project), class: "fork-btn #{button_class}", data: { qa_selector: 'fork_button' }, icon: 'fork' do
            = s_('ProjectOverview|Fork')
      = link_button_to project_forks_path(@project), title: n_(s_('ProjectOverview|Forks'), s_('ProjectOverview|Forks'), @project.forks_count), class: "count has-tooltip fork-count #{count_class}" do
        = @project.forks_count