empty.html.haml 1.47 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 9
.center.well
  %h3
    The repository for this project is empty
10
  %h4
11
    You can
Vinnie Okada's avatar
Vinnie Okada committed
12
    = link_to namespace_project_new_blob_path(@project.namespace, @project, 'master'), class: 'btn btn-new btn-lg' do
13
      add a file
14
     or do a push via the command line.
15

16 17
.well
  = render "shared/clone_panel"
18 19
%h4
  %strong Command line instructions
20 21
%div.git-empty
  %fieldset
Ben Bodenmiller's avatar
Ben Bodenmiller committed
22
    %legend Git global setup
23 24 25 26
    %pre.dark
      :preserve
        git config --global user.name "#{git_user_name}"
        git config --global user.email "#{git_user_email}"
27

28
  %fieldset
Ben Bodenmiller's avatar
Ben Bodenmiller committed
29
    %legend Create a new repository
30 31
    %pre.dark
      :preserve
32
        git clone #{ content_tag(:span, default_url_to_repo, class: 'clone')}
33
        cd #{@project.path}
Ben Bodenmiller's avatar
Ben Bodenmiller committed
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
    %legend Existing folder or Git repository
41 42
    %pre.dark
      :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's avatar
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"