Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
ccfae827
Commit
ccfae827
authored
Jan 18, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project alert/error messages
parent
b7614c71
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
101 additions
and
63 deletions
+101
-63
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+4
-0
app/assets/stylesheets/style.scss
app/assets/stylesheets/style.scss
+31
-1
app/models/repository.rb
app/models/repository.rb
+2
-2
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+13
-12
app/views/projects/_form.html.haml
app/views/projects/_form.html.haml
+3
-7
app/views/projects/empty.html.erb
app/views/projects/empty.html.erb
+0
-39
app/views/projects/empty.html.haml
app/views/projects/empty.html.haml
+39
-0
app/views/projects/files.html.haml
app/views/projects/files.html.haml
+2
-1
app/views/snippets/index.html.haml
app/views/snippets/index.html.haml
+6
-0
config/database.yml
config/database.yml
+1
-1
No files found.
app/assets/stylesheets/projects.css.scss
View file @
ccfae827
...
...
@@ -588,3 +588,7 @@ tr.line_notes_row {
}
}
}
.new-project-hodler
{
padding
:
20px
;
}
app/assets/stylesheets/style.scss
View file @
ccfae827
...
...
@@ -712,8 +712,8 @@ body, button, input, select, textarea {
.errors_holder
{
background
:
#D30
;
color
:
#fff
;
border
:
1px
solid
$lite_border_color
;
@include
round-borders-all
(
4px
);
border
:
1px
solid
#a30
;
padding
:
5px
;
list-style
:none
;
font-weight
:
bold
;
...
...
@@ -723,3 +723,33 @@ body, button, input, select, textarea {
padding
:
10px
;
}
}
.notice_holder
{
background
:
#DDF4FB
;
color
:
#444
;
border
:
1px
solid
#C6EDF9
;
@include
round-borders-all
(
4px
);
padding
:
5px
;
list-style
:none
;
font-weight
:
bold
;
text-shadow
:
0
-1px
0
rgba
(
255
,
255
,
255
,
0
.25
);
li
{
padding
:
10px
;
}
}
.alert_holder
{
background
:
#FDF5D9
;
color
:
#444
;
border
:
1px
solid
#FCEEC1
;
@include
round-borders-all
(
4px
);
padding
:
5px
;
list-style
:none
;
font-weight
:
bold
;
text-shadow
:
0
-1px
0
rgba
(
255
,
255
,
255
,
0
.25
);
li
{
padding
:
10px
;
}
}
app/models/repository.rb
View file @
ccfae827
...
...
@@ -74,9 +74,9 @@ class Repository
end
def
repo_exists?
repo
&&
!
repo
.
branches
.
empty?
@repo_exists
||=
(
repo
&&
!
repo
.
branches
.
empty?
)
rescue
false
@repo_exists
=
false
end
def
tags
...
...
app/views/layouts/project.html.haml
View file @
ccfae827
...
...
@@ -26,18 +26,19 @@
=
link_to
project_path
(
@project
),
:class
=>
project_tab_class
do
Project
=
link_to
"Repository"
,
project_repository_path
(
@project
),
:class
=>
repository_tab_class
=
link_to
"Tree"
,
tree_project_ref_path
(
@project
,
@project
.
root_ref
),
:class
=>
tree_tab_class
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"commits"
)
?
"current"
:
nil
=
link_to
"Network"
,
graph_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"graph"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
project_issues_filter_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"issues"
)
?
"current"
:
nil
do
Issues
=
link_to
wall_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"wall"
,
:id
=>
@project
)
?
"current"
:
nil
do
Wall
-
if
@project
.
common_notes
.
today
.
count
>
0
%span
{
:class
=>
"number"
}=
@project
.
common_notes
.
today
.
count
=
link_to
project_merge_requests_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"merge_requests"
)
?
"current"
:
nil
do
Requests
-
if
@project
.
repo_exists?
=
link_to
"Repository"
,
project_repository_path
(
@project
),
:class
=>
repository_tab_class
=
link_to
"Tree"
,
tree_project_ref_path
(
@project
,
@project
.
root_ref
),
:class
=>
tree_tab_class
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"commits"
)
?
"current"
:
nil
=
link_to
"Network"
,
graph_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"graph"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
project_issues_filter_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"issues"
)
?
"current"
:
nil
do
Issues
=
link_to
wall_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"wall"
,
:id
=>
@project
)
?
"current"
:
nil
do
Wall
-
if
@project
.
common_notes
.
today
.
count
>
0
%span
{
:class
=>
"number"
}=
@project
.
common_notes
.
today
.
count
=
link_to
project_merge_requests_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"merge_requests"
)
?
"current"
:
nil
do
Requests
...
...
app/views/projects/_form.html.haml
View file @
ccfae827
...
...
@@ -6,13 +6,9 @@
=
@project
.
name
.clear
-
if
@project
.
errors
.
any?
#error_explanation
%h2
=
pluralize
(
@project
.
errors
.
count
,
"error"
)
prohibited this project from being saved:
%ul
-
@project
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
%ul
.errors_holder
-
@project
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
%table
%tr
%td
=
f
.
label
:name
...
...
app/views/projects/empty.html.erb
deleted
100644 → 0
View file @
b7614c71
<%
bash_lexer
=
Pygments
::
Lexer
[
:bash
]
%>
<div
class=
""
>
<div
class=
"git-empty"
>
<h2>
Git global setup:
</h2>
<%
setup_str
=
<<
eos
git config --global user.name "
#{
current_user
.
name
}
"
git config --global user.email "
#{
current_user
.
email
}
"
eos
%>
<%=
raw
bash_lexer
.
highlight
(
setup_str
)
%>
<br
/>
<br
/>
<h2>
Next steps:
</h2>
<%
repo_setup_str
=
<<
eos
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
eos
%>
<%=
raw
bash_lexer
.
highlight
(
repo_setup_str
)
%>
<br
/><br
/>
<h2>
Existing Git Repo?
</h2>
<%
exist_repo_setup_str
=
<<
eos
cd existing_git_repo
git remote add origin
#{
@project
.
url_to_repo
}
git push -u origin master
eos
%>
<%=
raw
bash_lexer
.
highlight
(
exist_repo_setup_str
)
%>
<br/>
</div>
</div>
app/views/projects/empty.html.haml
0 → 100644
View file @
ccfae827
-
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
)
app/views/projects/files.html.haml
View file @
ccfae827
...
...
@@ -12,6 +12,7 @@
=
time_ago_in_words
(
note
.
created_at
)
ago
-
else
%h3
All files attached to project wall, issues etc will be displayed here
.notice_holder
%li
All files attached to project wall, issues etc will be displayed here
app/views/snippets/index.html.haml
View file @
ccfae827
...
...
@@ -4,3 +4,9 @@
%div
{
:class
=>
"update-data ui-box ui-box-small ui-box-big"
}
.data
=
render
@snippets
.
fresh
-
else
.notice_holder
%li
Snippets do not exist yet.
-
if
can?
current_user
,
:write_snippet
,
@project
%li
You can add a new one by clicking on plus icon
config/database.yml
View file @
ccfae827
...
...
@@ -20,6 +20,6 @@ test:
production
:
adapter
:
sqlite3
database
:
db/
production
.sqlite3
database
:
db/
development
.sqlite3
pool
:
5
timeout
:
5000
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment