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
Léo-Paul Géneau
gitlab-ce
Commits
eb7bbedb
Commit
eb7bbedb
authored
Mar 06, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polishin & fixed tree switch
parent
cb59aade
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
82 additions
and
50 deletions
+82
-50
app/models/event.rb
app/models/event.rb
+8
-0
app/views/dashboard/index.html.haml
app/views/dashboard/index.html.haml
+4
-4
app/views/dashboard/issues.html.haml
app/views/dashboard/issues.html.haml
+2
-1
app/views/dashboard/merge_requests.html.haml
app/views/dashboard/merge_requests.html.haml
+2
-1
app/views/deploy_keys/index.html.haml
app/views/deploy_keys/index.html.haml
+4
-3
app/views/events/_event_push.html.haml
app/views/events/_event_push.html.haml
+10
-4
app/views/hooks/_data_ex.html.erb
app/views/hooks/_data_ex.html.erb
+2
-0
app/views/hooks/index.html.haml
app/views/hooks/index.html.haml
+12
-13
app/views/projects/files.html.haml
app/views/projects/files.html.haml
+2
-2
app/views/projects/index.html.haml
app/views/projects/index.html.haml
+33
-18
app/views/refs/tree.js.haml
app/views/refs/tree.js.haml
+3
-4
No files found.
app/models/event.rb
View file @
eb7bbedb
...
@@ -33,6 +33,10 @@ class Event < ActiveRecord::Base
...
@@ -33,6 +33,10 @@ class Event < ActiveRecord::Base
action
==
self
.
class
::
Pushed
action
==
self
.
class
::
Pushed
end
end
def
new_tag?
data
[
:ref
][
"refs/tags"
]
end
def
new_branch?
def
new_branch?
data
[
:before
]
=~
/^00000/
data
[
:before
]
=~
/^00000/
end
end
...
@@ -49,6 +53,10 @@ class Event < ActiveRecord::Base
...
@@ -49,6 +53,10 @@ class Event < ActiveRecord::Base
@branch_name
||=
data
[
:ref
].
gsub
(
"refs/heads/"
,
""
)
@branch_name
||=
data
[
:ref
].
gsub
(
"refs/heads/"
,
""
)
end
end
def
tag_name
@tag_name
||=
data
[
:ref
].
gsub
(
"refs/tags/"
,
""
)
end
def
pusher
def
pusher
User
.
find_by_id
(
data
[
:user_id
])
User
.
find_by_id
(
data
[
:user_id
])
end
end
...
...
app/views/dashboard/index.html.haml
View file @
eb7bbedb
-
if
current_user
.
require_ssh_key?
-
if
current_user
.
require_ssh_key?
.alert-message.
warning
.alert-message.
block-message.error
%p
%p
You wont be able to pull/push project code unless you
You wont be able to pull/push project code unless you
=
link_to
new_key_path
,
:class
=>
"vlink"
do
=
link_to
new_key_path
,
:class
=>
"vlink"
do
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
New Project »
New Project »
-
unless
@merge_requests
.
blank
?
-
if
@merge_requests
.
any
?
%div
.dashboard_category
%div
.dashboard_category
%h3
%h3
=
link_to
"Merge Requests"
,
"#merge_requests"
,
:id
=>
"merge_requests"
=
link_to
"Merge Requests"
,
"#merge_requests"
,
:id
=>
"merge_requests"
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
.row
.row
.dashboard_block
=
render
"dashboard/merge_requests_feed"
.dashboard_block
=
render
"dashboard/merge_requests_feed"
-
unless
@issues
.
blank
?
-
if
@issues
.
any
?
%div
.dashboard_category
%div
.dashboard_category
%h3
%h3
=
link_to
"Issues"
,
"#issues"
,
:id
=>
"issues"
=
link_to
"Issues"
,
"#issues"
,
:id
=>
"issues"
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
.row
.row
.dashboard_block
=
render
"dashboard/issues_feed"
.dashboard_block
=
render
"dashboard/issues_feed"
-
unless
@events
.
blank
?
-
if
@events
.
any
?
%div
.dashboard_category
%div
.dashboard_category
%h3
%h3
%span
.ico.activities
%span
.ico.activities
...
...
app/views/dashboard/issues.html.haml
View file @
eb7bbedb
...
@@ -3,4 +3,5 @@
...
@@ -3,4 +3,5 @@
%small
( assigned to you )
%small
( assigned to you )
%br
%br
.ui-box
=
render
"dashboard/issues_feed"
-
if
@issues
.
any?
.ui-box
=
render
"dashboard/issues_feed"
app/views/dashboard/merge_requests.html.haml
View file @
eb7bbedb
...
@@ -3,4 +3,5 @@
...
@@ -3,4 +3,5 @@
%small
( authored or assigned to you )
%small
( authored or assigned to you )
%br
%br
.ui-box
=
render
"dashboard/merge_requests_feed"
-
if
@merge_requests
.
any?
.ui-box
=
render
"dashboard/merge_requests_feed"
app/views/deploy_keys/index.html.haml
View file @
eb7bbedb
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
=
link_to
new_project_deploy_key_path
(
@project
),
:class
=>
"btn small"
,
:title
=>
"New Deploy Key"
do
=
link_to
new_project_deploy_key_path
(
@project
),
:class
=>
"btn small"
,
:title
=>
"New Deploy Key"
do
Add Deploy Key
Add Deploy Key
%table
.zebra-striped.borders
-
if
@keys
.
any?
%table
.zebra-striped.borders
-
@keys
.
each
do
|
key
|
-
@keys
.
each
do
|
key
|
=
render
(
:partial
=>
'show'
,
:locals
=>
{
:key
=>
key
})
=
render
(
:partial
=>
'show'
,
:locals
=>
{
:key
=>
key
})
app/views/events/_event_push.html.haml
View file @
eb7bbedb
-
if
event
.
new_branch?
-
if
event
.
new_branch?
||
event
.
new_tag?
=
image_tag
gravatar_icon
(
event
.
pusher_email
),
:class
=>
"avatar"
=
image_tag
gravatar_icon
(
event
.
pusher_email
),
:class
=>
"avatar"
%strong
#{
event
.
pusher_name
}
%strong
#{
event
.
pusher_name
}
pushed new branch
pushed new
-
if
event
.
new_tag?
tag
=
link_to
project_commits_path
(
event
.
project
,
:ref
=>
event
.
tag_name
)
do
%strong
=
event
.
tag_name
-
else
branch
=
link_to
project_commits_path
(
event
.
project
,
:ref
=>
event
.
branch_name
)
do
=
link_to
project_commits_path
(
event
.
project
,
:ref
=>
event
.
branch_name
)
do
%strong
=
event
.
branch_name
%strong
=
event
.
branch_name
at
at
...
...
app/views/hooks/_data_ex.html.erb
View file @
eb7bbedb
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
:before => "95790bf891e76fee5e1747ab589903a6a1f80f22",
:before => "95790bf891e76fee5e1747ab589903a6a1f80f22",
:after => "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
:after => "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
:ref => "refs/heads/master",
:ref => "refs/heads/master",
:user_id => 4,
:user_name => "John Smith",
:repository => {
:repository => {
:name => "Diaspora",
:name => "Diaspora",
:url => "localhost/diaspora",
:url => "localhost/diaspora",
...
...
app/views/hooks/index.html.haml
View file @
eb7bbedb
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
=
link_to
new_project_hook_path
(
@project
),
:class
=>
"btn small"
,
:title
=>
"New Web Hook"
do
=
link_to
new_project_hook_path
(
@project
),
:class
=>
"btn small"
,
:title
=>
"New Web Hook"
do
Add Post Receive Hook
Add Post Receive Hook
%table
.zebra-striped.borders
-
if
@hooks
.
any?
%table
.zebra-striped.borders
-
@hooks
.
each
do
|
hook
|
-
@hooks
.
each
do
|
hook
|
%tr
%tr
%td
%td
...
@@ -15,8 +16,6 @@
...
@@ -15,8 +16,6 @@
%td
%td
=
link_to
'Remove'
,
project_hook_path
(
@project
,
hook
),
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"danger btn small"
=
link_to
'Remove'
,
project_hook_path
(
@project
,
hook
),
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"danger btn small"
.ui-box
.alert-message.block-message
%h5
Hooks request example
We send some data with POST request when someone makes git push
.data
=
render
"data_ex"
.well
=
render
"data_ex"
app/views/projects/files.html.haml
View file @
eb7bbedb
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
=
time_ago_in_words
(
note
.
created_at
)
=
time_ago_in_words
(
note
.
created_at
)
ago
ago
-
else
-
else
.
notice_holder
.
alert-message.block-message
%
li
All files attached to project wall, issues etc will be displayed here
%
p
All files attached to project wall, issues etc will be displayed here
app/views/projects/index.html.haml
View file @
eb7bbedb
.row
-
if
@projects
.
any?
.row
.span4
.span4
%div
.leftbar.ui-box
%div
.leftbar.ui-box
%h5
%h5
...
@@ -17,6 +18,20 @@
...
@@ -17,6 +18,20 @@
.show_holder.ui-box.padded
.show_holder.ui-box.padded
.loading
.loading
-
else
%h3
Nothing here
%br
-
if
current_user
.
can_create_project?
.alert-message.block-message.warning
You can create up to
=
current_user
.
projects_limit
projects. Click on link below to add a new one
.link_holder
=
link_to
new_project_path
,
:class
=>
""
do
New Project »
-
else
If you will be added to project - it will be displayed here
:javascript
:javascript
$
(
function
(){
$
(
function
(){
...
...
app/views/refs/tree.js.haml
View file @
eb7bbedb
:plain
:plain
//$("#tree-content-holder").hide("slide", { direction: "left" }, 150, function(){
$("#tree-holder").html("
#{
escape_javascript
(
render
(
:partial
=>
"tree"
,
:locals
=>
{
:repo
=>
@repo
,
:commit
=>
@commit
,
:tree
=>
@tree
}))
}
");
$("#tree-holder").html("
#{
escape_javascript
(
render
(
:partial
=>
"tree"
,
:locals
=>
{
:repo
=>
@repo
,
:commit
=>
@commit
,
:tree
=>
@tree
}))
}
");
$("#tree-content-holder").show("slide", { direction: "right" }, 150);
$("#tree-content-holder").show("slide", { direction: "right" }, 150);
//}
);
$('.project-refs-form #path').val("
#{
params
[
:path
]
}
"
);
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