empty.html.haml 1.6 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

D
Drew Blessing 已提交
7
.gray-content-block.center
D
Dmitriy Zaporozhets 已提交
8
  %h3.page-title
9
    The repository for this project is empty
D
Dmitriy Zaporozhets 已提交
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
D
Dmitriy Zaporozhets 已提交
18 19
%h3.page-title
  Command line instructions
20 21
%div.git-empty
  %fieldset
D
Dmitriy Zaporozhets 已提交
22 23
    %h5 Git global setup
    %pre.light-well
24
      :preserve
25 26
        git config --global user.name "#{h git_user_name}"
        git config --global user.email "#{h git_user_email}"
27

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

39
  %fieldset
D
Dmitriy Zaporozhets 已提交
40 41
    %h5 Existing folder or Git repository
    %pre.light-well
42
      :preserve
B
Ben Bodenmiller 已提交
43 44
        cd existing_folder
        git init
45
        git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
46 47
        git add .
        git commit
48
        git push -u origin master
49

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