project alert/error messages
This commit is contained in:
parent
b7614c714e
commit
ccfae82723
10 changed files with 101 additions and 63 deletions
39
app/views/projects/empty.html.haml
Normal file
39
app/views/projects/empty.html.haml
Normal file
|
@ -0,0 +1,39 @@
|
|||
- if current_user.require_ssh_key?
|
||||
%ul.errors_holder
|
||||
%li You have no ssh keys added yo tour profile.
|
||||
%li You wont be able to pull/push repository.
|
||||
%li Visit profile → keys and add public key of every machine you want to use for work with gitlabhq.
|
||||
|
||||
|
||||
%ul.alert_holder
|
||||
%li You should push repository to proceed.
|
||||
%li After push you will be able to browse code, commits etc.
|
||||
|
||||
- bash_lexer = Pygments::Lexer[:bash]
|
||||
%div.git-empty
|
||||
%h3 Git global setup:
|
||||
- setup_str = ["git config --global user.name \"#{current_user.name}\"",
|
||||
"git config --global user.email \"#{current_user.email}\""].join("\n")
|
||||
= raw bash_lexer.highlight(setup_str)
|
||||
|
||||
%br
|
||||
%br
|
||||
%h3 Create Repository
|
||||
- repo_setup_str = ["mkdir #{@project.path}",
|
||||
"cd #{@project.path}",
|
||||
"git init",
|
||||
"touch README",
|
||||
"git add README",
|
||||
"git commit -m 'first commit'",
|
||||
"git remote add origin #{@project.url_to_repo}",
|
||||
"git push -u origin master"].join("\n")
|
||||
|
||||
= raw bash_lexer.highlight(repo_setup_str)
|
||||
|
||||
%br
|
||||
%br
|
||||
%h3 Existing Git Repo?
|
||||
- exist_repo_setup_str = ["cd existing_git_repo",
|
||||
"git remote add origin #{@project.url_to_repo}",
|
||||
"git push -u origin master"].join("\n")
|
||||
= raw bash_lexer.highlight(exist_repo_setup_str)
|
Loading…
Add table
Add a link
Reference in a new issue