BigW Consortium Gitlab

empty.html.haml 1.51 KB
Newer Older
1 2
- if current_user && can?(current_user, :download_code, @project)
  = render 'shared/no_ssh'
3
  = render 'shared/no_password'
4

5
= render "home_panel"
6

7 8
.center.light-well
  %h3.page-title
9
    The repository for this project is empty
10
  %p
11 12 13 14 15
    If you already have files you can push them using command line instructions below.
    %br
    Otherwise you can start with
    = link_to "adding README", new_readme_path, class: 'underlined-link'
    file to this project.
16

17
.prepend-top-20
18 19
%h3.page-title
  Command line instructions
20 21
%div.git-empty
  %fieldset
22 23
    %h5 Git global setup
    %pre.light-well
24 25 26
      :preserve
        git config --global user.name "#{git_user_name}"
        git config --global user.email "#{git_user_email}"
27

28
  %fieldset
29 30
    %h5 Create a new repository
    %pre.light-well
31
      :preserve
32
        git clone #{ content_tag(:span, default_url_to_repo, class: 'clone')}
33
        cd #{@project.path}
34 35
        touch README.md
        git add README.md
36
        git commit -m "add README"
37
        git push -u origin master
38

39
  %fieldset
40 41
    %h5 Existing folder or Git repository
    %pre.light-well
42
      :preserve
43 44
        cd existing_folder
        git init
45 46
        git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
        git push -u origin master
47

48 49
- if can? current_user, :remove_project, @project
  .prepend-top-20
Vinnie Okada committed
50
    = link_to 'Remove project', [@project.namespace.becomes(Namespace), @project], data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right"