summaryrefslogtreecommitdiff
path: root/app/views/projects/forks/new.html.haml
blob: 0f36e1a7353be25557b8c2e9389619a723cfb46e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
- page_title "Fork project"

.row.prepend-top-default
  .col-lg-3
    %h4.prepend-top-0
      Fork project
    %p
      A fork is a copy of a project.
      %br
      Forking a repository allows you to make changes without affecting the original project.
  .col-lg-9
    .fork-namespaces
      - if @namespaces.present?
        %label.label-light
          %span
            Click to fork the project to a user or group
          - @namespaces.in_groups_of(6, false) do |group|
            .row
              - group.each do |namespace|
                - avatar = namespace_icon(namespace, 100)
                - if fork = namespace.find_fork_of(@project)
                  .fork-thumbnail.forked
                    = link_to project_path(fork) do
                      - if /no_((\w*)_)*avatar/.match(avatar)
                        .no-avatar
                          = icon 'question'
                      - else
                        = image_tag avatar
                      .caption
                        = namespace.human_name
                - else
                  .fork-thumbnail
                    = link_to project_forks_path(@project, namespace_key: namespace.id), method: "POST" do
                      - if /no_((\w*)_)*avatar/.match(avatar)
                        .no-avatar
                          = icon 'question'
                      - else
                        = image_tag avatar
                      .caption
                        = namespace.human_name
      - else
        %label.label-light
          %span
            No available namespaces to fork the project.
            %br
            %small
              You must have permission to create a project in a namespace before forking.

    .save-project-loader.hide
      .center
        %h2
          %i.fa.fa-spinner.fa-spin
          Forking repository
        %p Please wait a moment, this page will automatically refresh when ready.