2013-11-06 15:13:21 +00:00
|
|
|
= render "home_panel"
|
2012-09-04 16:05:08 +00:00
|
|
|
|
2013-08-12 15:21:47 +00:00
|
|
|
- if @project.import? && !@project.imported
|
|
|
|
.save-project-loader
|
|
|
|
%center
|
2014-02-05 18:30:57 +00:00
|
|
|
%h2
|
|
|
|
%i.icon-spinner.icon-spin
|
|
|
|
Importing repository.
|
2013-08-12 15:21:47 +00:00
|
|
|
%p.monospace git clone --bare #{@project.import_url}
|
2013-10-15 04:58:05 +00:00
|
|
|
%p Please wait while we import the repository for you. Refresh at will.
|
2013-08-12 16:28:10 +00:00
|
|
|
:javascript
|
|
|
|
new ProjectImport();
|
2012-01-17 23:19:57 +00:00
|
|
|
|
2013-08-12 15:21:47 +00:00
|
|
|
- else
|
|
|
|
%div.git-empty
|
|
|
|
%fieldset
|
|
|
|
%legend Git global setup:
|
|
|
|
%pre.dark
|
|
|
|
:preserve
|
2013-09-24 19:14:28 +00:00
|
|
|
git config --global user.name "#{git_user_name}"
|
|
|
|
git config --global user.email "#{git_user_email}"
|
2012-01-17 23:19:57 +00:00
|
|
|
|
2013-08-12 15:21:47 +00:00
|
|
|
%fieldset
|
|
|
|
%legend Create Repository
|
|
|
|
%pre.dark
|
|
|
|
:preserve
|
|
|
|
mkdir #{@project.path}
|
|
|
|
cd #{@project.path}
|
|
|
|
git init
|
|
|
|
touch README
|
|
|
|
git add README
|
|
|
|
git commit -m 'first commit'
|
2014-01-08 03:03:27 +00:00
|
|
|
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
|
2013-08-12 15:21:47 +00:00
|
|
|
git push -u origin master
|
|
|
|
|
|
|
|
%fieldset
|
|
|
|
%legend Existing Git Repo?
|
|
|
|
%pre.dark
|
|
|
|
:preserve
|
|
|
|
cd existing_git_repo
|
2014-01-08 03:03:27 +00:00
|
|
|
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
|
2013-08-12 15:21:47 +00:00
|
|
|
git push -u origin master
|
2012-03-22 20:28:02 +00:00
|
|
|
|
2012-12-07 13:53:04 +00:00
|
|
|
- if can? current_user, :remove_project, @project
|
2012-08-22 00:56:53 +00:00
|
|
|
.prepend-top-20
|
2013-12-10 19:33:21 +00:00
|
|
|
= link_to 'Remove project', @project, data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right"
|