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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
0a4222fb
Commit
0a4222fb
authored
Jan 28, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bootstrap: Activities
parent
15b06b01
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
318 additions
and
359 deletions
+318
-359
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+17
-2
app/assets/stylesheets/reset_bootstrap.scss
app/assets/stylesheets/reset_bootstrap.scss
+9
-1
app/assets/stylesheets/top_panel.scss
app/assets/stylesheets/top_panel.scss
+53
-55
app/controllers/merge_requests_controller.rb
app/controllers/merge_requests_controller.rb
+2
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+2
-1
app/helpers/dashboard_helper.rb
app/helpers/dashboard_helper.rb
+2
-0
app/models/commit.rb
app/models/commit.rb
+6
-0
app/views/commits/_commits.html.haml
app/views/commits/_commits.html.haml
+5
-4
app/views/dashboard/_issues_feed.html.haml
app/views/dashboard/_issues_feed.html.haml
+10
-26
app/views/dashboard/_merge_requests_feed.html.haml
app/views/dashboard/_merge_requests_feed.html.haml
+10
-24
app/views/dashboard/_projects_feed.html.haml
app/views/dashboard/_projects_feed.html.haml
+16
-18
app/views/dashboard/issues.html.haml
app/views/dashboard/issues.html.haml
+2
-2
app/views/dashboard/merge_requests.html.haml
app/views/dashboard/merge_requests.html.haml
+5
-2
app/views/layouts/_app_side.html.haml
app/views/layouts/_app_side.html.haml
+1
-1
app/views/merge_requests/show.html.haml
app/views/merge_requests/show.html.haml
+18
-17
app/views/projects/_feed.html.haml
app/views/projects/_feed.html.haml
+28
-78
app/views/projects/_form.html.haml
app/views/projects/_form.html.haml
+7
-7
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+19
-59
app/views/projects/empty.html.haml
app/views/projects/empty.html.haml
+9
-8
app/views/projects/index.html.haml
app/views/projects/index.html.haml
+3
-1
app/views/projects/info.html.haml
app/views/projects/info.html.haml
+40
-9
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+20
-12
app/views/repositories/_feed.html.haml
app/views/repositories/_feed.html.haml
+13
-15
app/views/repositories/branches.html.haml
app/views/repositories/branches.html.haml
+17
-10
app/views/repositories/show.html.haml
app/views/repositories/show.html.haml
+3
-6
config/routes.rb
config/routes.rb
+1
-1
No files found.
app/assets/stylesheets/common.scss
View file @
0a4222fb
...
@@ -133,9 +133,12 @@ aside.project-side
...
@@ -133,9 +133,12 @@ aside.project-side
}
}
img
.avatar
{
img
.avatar
{
width
:
32px
;
float
:left
;
float
:left
;
padding-right
:
5px
;
margin-right
:
15px
;
width
:
40px
;
-webkit-border-radius
:
4px
;
-moz-border-radius
:
4px
;
border-radius
:
4px
;
}
}
.media-grid
{
.media-grid
{
...
@@ -147,6 +150,18 @@ img.avatar {
...
@@ -147,6 +150,18 @@ img.avatar {
}
}
}
}
.wll
{
background-color
:
#FFF
;
margin-bottom
:
10px
;
padding
:
5px
;
min-height
:
20px
;
border-bottom
:
1px
solid
#eee
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.05
);
.author
{
color
:
#999
;
}
&
:last-child
{
border
:none
}
p
{
padding-top
:
5px
;}
}
@import
"reset_bootstrap.scss"
;
@import
"reset_bootstrap.scss"
;
@import
"top_panel.scss"
;
@import
"top_panel.scss"
;
@import
"projects.css.scss"
;
@import
"projects.css.scss"
;
...
...
app/assets/stylesheets/reset_bootstrap.scss
View file @
0a4222fb
a
{
a
{
color
:
$link_color
;
color
:
$link_color
;
&
:hover
{
text-decoration
:none
;
}
&
:hover
{
text-decoration
:none
;
color
:
$active_link_color
;
}
}
.alert-message.entry
{
background
:
#F1F1F1
;
border-color
:
#ccc
;
}
}
app/assets/stylesheets/top_panel.scss
View file @
0a4222fb
.main_links
{
width
:
155px
;
float
:left
;
a
{
float
:left
;
}
}
.dashboard_links
{
padding
:
7px
;
float
:left
;
a
{
margin
:
0
14px
;
float
:
left
;
font-size
:
14px
;
&
.active
{
color
:
$active_link_color
;
}
&
:hover
{
color
:
$active_link_color
;
}
}
}
.top-tabs
{
margin
:
0
;
padding
:
5px
;
font-size
:
14px
;
padding-bottom
:
10px
;
margin-bottom
:
20px
;
height
:
26px
;
border-bottom
:
1px
solid
#ccc
;
.tab
{
font-weight
:
bold
;
background
:none
;
padding
:
10px
;
float
:left
;
padding-left
:
0px
;
padding-right
:
40px
;
&
.active
{
color
:
$active_link_color
;
}
}
}
body
header
{
body
header
{
position
:absolute
;
position
:absolute
;
width
:
100%
;
width
:
100%
;
...
@@ -54,12 +5,11 @@ body header {
...
@@ -54,12 +5,11 @@ body header {
margin
:
0
;
margin
:
0
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
background
:
#999
;
/* for non-css3 browsers */
background
:
#F1F1F1
;
/* for non-css3 browsers */
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#FFFFFF'
,
endColorstr
=
'#EAEAEA'
);
/* for IE */
background
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#FFFFFF
)
,
to
(
#EAEAEA
));
/* for webkit browsers */
background
:
-moz-linear-gradient
(
top
,
#FFFFFF
,
#EAEAEA
);
/* for firefox 3.6+ */
background
:
-o-linear-gradient
(
top
,
#FFFFFF
,
#EAEAEA
);
/* for firefox 3.6+ */
border-bottom
:
1px
solid
#ccc
;
border-bottom
:
1px
solid
#ccc
;
box-shadow
:
0
-1px
0
white
inset
;
-moz-box-shadow
:
0
-1px
0
white
inset
;
-webkit-box-shadow
:
0
-1px
0
white
inset
;
height
:
50px
;
height
:
50px
;
...
@@ -105,6 +55,55 @@ body header {
...
@@ -105,6 +55,55 @@ body header {
}
}
}
}
}
}
.main_links
{
width
:
155px
;
float
:left
;
a
{
float
:left
;
}
}
.dashboard_links
{
padding
:
7px
;
float
:left
;
a
{
margin
:
0
14px
;
float
:
left
;
font-size
:
14px
;
&
.active
{
color
:
$active_link_color
;
}
&
:hover
{
color
:
$active_link_color
;
}
}
}
.top-tabs
{
margin
:
0
;
padding
:
5px
;
font-size
:
14px
;
padding-bottom
:
10px
;
margin-bottom
:
20px
;
height
:
26px
;
border-bottom
:
1px
solid
#ccc
;
.tab
{
font-weight
:
bold
;
background
:none
;
padding
:
10px
;
float
:left
;
padding-left
:
0px
;
padding-right
:
40px
;
&
.active
{
color
:
$active_link_color
;
}
}
}
.top_panel_holder
.chzn-container
{
.top_panel_holder
.chzn-container
{
position
:relative
;
position
:relative
;
...
@@ -138,7 +137,6 @@ body header {
...
@@ -138,7 +137,6 @@ body header {
.rss-icon
{
.rss-icon
{
margin
:
0
15px
;
margin
:
0
15px
;
padding
:
3px
;
padding
:
3px
;
border
:
1px
solid
#AAA
;
border-radius
:
3px
;
border-radius
:
3px
;
float
:left
;
float
:left
;
}
}
...
...
app/controllers/merge_requests_controller.rb
View file @
0a4222fb
...
@@ -39,6 +39,8 @@ class MergeRequestsController < ApplicationController
...
@@ -39,6 +39,8 @@ class MergeRequestsController < ApplicationController
@notes
=
@merge_request
.
notes
.
inc_author
.
order
(
"created_at DESC"
).
limit
(
20
)
@notes
=
@merge_request
.
notes
.
inc_author
.
order
(
"created_at DESC"
).
limit
(
20
)
@note
=
@project
.
notes
.
new
(
:noteable
=>
@merge_request
)
@note
=
@project
.
notes
.
new
(
:noteable
=>
@merge_request
)
render_full_content
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
js
{
respond_with_notes
}
format
.
js
{
respond_with_notes
}
...
...
app/controllers/projects_controller.rb
View file @
0a4222fb
...
@@ -68,7 +68,8 @@ class ProjectsController < ApplicationController
...
@@ -68,7 +68,8 @@ class ProjectsController < ApplicationController
def
show
def
show
return
render
"projects/empty"
unless
@project
.
repo_exists?
&&
@project
.
has_commits?
return
render
"projects/empty"
unless
@project
.
repo_exists?
&&
@project
.
has_commits?
limit
=
(
params
[
:limit
]
||
20
).
to_i
limit
=
(
params
[
:limit
]
||
10
).
to_i
@activities
=
@project
.
activities
(
limit
)
#updates_wo_repo(limit)
@activities
=
@project
.
activities
(
limit
)
#updates_wo_repo(limit)
end
end
...
...
app/helpers/dashboard_helper.rb
View file @
0a4222fb
...
@@ -3,6 +3,7 @@ module DashboardHelper
...
@@ -3,6 +3,7 @@ module DashboardHelper
case
object
.
class
.
name
.
to_s
case
object
.
class
.
name
.
to_s
when
"Issue"
then
project_issue_path
(
project
,
project
.
issues
.
find
(
object
.
id
))
when
"Issue"
then
project_issue_path
(
project
,
project
.
issues
.
find
(
object
.
id
))
when
"Commit"
then
project_commit_path
(
project
,
project
.
repo
.
commits
(
object
.
id
).
first
)
when
"Commit"
then
project_commit_path
(
project
,
project
.
repo
.
commits
(
object
.
id
).
first
)
when
"MergeRequest"
then
project_merge_request_path
(
project
,
object
.
id
)
when
"Note"
when
"Note"
then
then
note
=
object
note
=
object
...
@@ -26,6 +27,7 @@ module DashboardHelper
...
@@ -26,6 +27,7 @@ module DashboardHelper
when
"Note"
then
markdown
(
object
.
note
)
when
"Note"
then
markdown
(
object
.
note
)
when
"Issue"
then
object
.
title
when
"Issue"
then
object
.
title
when
"Commit"
then
object
.
safe_message
when
"Commit"
then
object
.
safe_message
when
"MergeRequest"
then
object
.
title
else
return
"Project Wall"
else
return
"Project Wall"
end
end
...
...
app/models/commit.rb
View file @
0a4222fb
class
Commit
class
Commit
include
ActiveModel
::
Conversion
extend
ActiveModel
::
Naming
attr_accessor
:commit
attr_accessor
:commit
attr_accessor
:head
attr_accessor
:head
...
@@ -16,6 +18,10 @@ class Commit
...
@@ -16,6 +18,10 @@ class Commit
:id
,
:id
,
:to
=>
:commit
:to
=>
:commit
def
persisted?
false
end
def
initialize
(
raw_commit
,
head
=
nil
)
def
initialize
(
raw_commit
,
head
=
nil
)
@commit
=
raw_commit
@commit
=
raw_commit
@head
=
head
@head
=
head
...
...
app/views/commits/_commits.html.haml
View file @
0a4222fb
...
@@ -4,16 +4,17 @@
...
@@ -4,16 +4,17 @@
%h5
.underlined
=
day
.
stamp
(
"28 Aug, 2010"
)
%h5
.underlined
=
day
.
stamp
(
"28 Aug, 2010"
)
%ul
.unstyled
%ul
.unstyled
-
commits
.
each
do
|
commit
|
-
commits
.
each
do
|
commit
|
%li
%li
.wll
%a
{
:class
=>
"update-item"
,
:href
=>
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
}
%a
{
:class
=>
"update-item"
,
:href
=>
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
}
.right.btn
.right.btn
=
truncate
(
commit
.
id
.
to_s
,
:length
=>
10
)
=
truncate
(
commit
.
id
.
to_s
,
:length
=>
10
)
»
»
=
image_tag
gravatar_icon
(
commit
.
author_email
),
:class
=>
"avatar"
,
:width
=>
32
=
image_tag
gravatar_icon
(
commit
.
author_email
),
:class
=>
"avatar"
,
:width
=>
32
%div
%strong
=
truncate
(
commit
.
safe_message
,
:length
=>
50
)
%span
.update-author
%span
.update-author
%strong
=
commit
.
author_name
%strong
=
commit
.
author_name
–
=
time_ago_in_words
(
commit
.
committed_date
)
=
time_ago_in_words
(
commit
.
committed_date
)
ago
ago
%p
%strong
=
truncate
(
commit
.
safe_message
,
:length
=>
50
)
app/views/dashboard/_issues_feed.html.haml
View file @
0a4222fb
#feeds_content_holder
-
@issues
.
each
do
|
issue
|
-
unless
@issues
.
empty?
.alert-message.entry
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
=
link_to
[
issue
.
project
,
issue
]
do
.data
%p
-
@issues
.
each
do
|
update
|
%strong
%a
.project-update
{
:href
=>
dashboard_feed_path
(
update
.
project
,
update
)}
=
issue
.
project
.
name
.avatar
=
image_tag
gravatar_icon
(
update
.
assignee_email
),
:class
=>
"avatar"
,
:width
=>
32
–
%div
Issue
#
=
truncate
update
.
title
,
:length
=>
35
=
issue
.
id
.right
=
truncate
update
.
project
.
name
=
truncate
issue
.
title
,
:length
=>
50
%span
.update-author
%strong
=
update
.
author_name
authored
=
time_ago_in_words
(
update
.
created_at
)
ago
.right
-
if
update
.
critical
%span
.label.important
critical
-
if
update
.
today?
%span
.label.new
today
-
else
%h2
No assigned
%span
.tag.open
open
issues
app/views/dashboard/_merge_requests_feed.html.haml
View file @
0a4222fb
#feeds_content_holder
-
@merge_requests
.
each
do
|
merge_request
|
-
unless
@merge_requests
.
empty?
.alert-message.entry
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
=
link_to
[
merge_request
.
project
,
merge_request
]
do
.data
%p
-
@merge_requests
.
each
do
|
update
|
%strong
%a
.project-update
{
:href
=>
project_merge_request_path
(
update
.
project
,
update
)}
=
merge_request
.
project
.
name
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
–
%span
.update-title
Issue
#
=
truncate
update
.
title
,
:length
=>
35
=
merge_request
.
id
.right
=
truncate
update
.
project
.
name
=
truncate
merge_request
.
title
,
:length
=>
50
%span
.update-author
%strong
=
update
.
author_name
authored
=
time_ago_in_words
(
update
.
created_at
)
ago
.right
%span
.tag.commit
=
update
.
source_branch
→
%span
.tag.commit
=
update
.
target_branch
-
else
%h2
No authored or assigned
%span
.tag.open
open
merge requests
app/views/dashboard/_projects_feed.html.haml
View file @
0a4222fb
#feeds_content_holder
-
@active_projects
.
first
(
3
).
each
do
|
project
|
-
@active_projects
.
first
(
3
).
each
do
|
project
|
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
=
link_to
project
do
=
link_to
project
do
%h4
=
project
.
name
%h4
=
project
.
name
-
project
.
updates
(
3
).
each
do
|
update
|
-
project
.
updates
(
3
).
each
do
|
update
|
...
...
app/views/dashboard/issues.html.haml
View file @
0a4222fb
%h3
%h3
Issues
Issues
%small
( a
uthored or a
ssigned to you )
%small
( assigned to you )
%hr
%hr
.news-feed
=
render
"dashboard/issues_feed"
=
render
"dashboard/issues_feed"
app/views/dashboard/merge_requests.html.haml
View file @
0a4222fb
%h3
Merge Requests
%h3
Merge Requests
%small
( authored or assigned to you )
%hr
%hr
.news-feed
=
render
"dashboard/merge_requests_feed"
=
render
"dashboard/merge_requests_feed"
app/views/layouts/_app_side.html.haml
View file @
0a4222fb
.fixed
.fixed
%aside
%aside
=
link_to
"Activities"
,
dashboard_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_path
)
||
current_page?
(
root_path
)
}
"
-#
= link_to "Activities", dashboard_path, :class => "#{"active" if current_page?(dashboard_path) || current_page?(root_path) }"
=
link_to
"Projects"
,
projects_path
,
:class
=>
"
#{
"active"
if
current_page?
(
projects_path
)
}
"
=
link_to
"Projects"
,
projects_path
,
:class
=>
"
#{
"active"
if
current_page?
(
projects_path
)
}
"
=
link_to
"Issues"
,
dashboard_issues_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Issues"
,
dashboard_issues_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Requests"
,
dashboard_merge_requests_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
=
link_to
"Requests"
,
dashboard_merge_requests_path
,
:class
=>
"
#{
"active"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
...
...
app/views/merge_requests/show.html.haml
View file @
0a4222fb
%div
%h3
%span
.entity-info
=
"Merge Request #
#{
@merge_request
.
id
}
:"
%span
.label
=
@merge_request
.
source_branch
→
%span
.label
=
@merge_request
.
target_branch
%span
.right
-
if
can?
(
current_user
,
:admin_project
,
@project
)
||
@merge_request
.
author
==
current_user
-
if
can?
(
current_user
,
:admin_project
,
@project
)
||
@merge_request
.
author
==
current_user
=
link_to
edit_project_merge_request_path
(
@project
,
@merge_request
)
do
=
link_to
edit_project_merge_request_path
(
@project
,
@merge_request
),
:class
=>
"btn small"
do
.entity-button
Edit Merge Request
Edit Merge Request
%i
%hr
%div
%span
.entity-info
=
image_tag
gravatar_icon
(
@merge_request
.
author_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
=
image_tag
gravatar_icon
(
@merge_request
.
author_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%span
.commit-title
%span
.commit-title
%strong
%strong
=
"Merge Request #
#{
@merge_request
.
id
}
:"
.tag.commit.inline
=
@merge_request
.
source_branch
→
.tag.commit.inline
=
@merge_request
.
target_branch
%span
.commit-author
%span
.commit-author
%strong
%strong
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@merge_request
.
author
.
id
))
do
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@merge_request
.
author
.
id
))
do
...
@@ -20,13 +23,11 @@
...
@@ -20,13 +23,11 @@
→
→
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@merge_request
.
assignee
.
id
))
do
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@merge_request
.
assignee
.
id
))
do
%span
.author
=
@merge_request
.
assignee_name
%span
.author
=
@merge_request
.
assignee_name
%br
=
@merge_request
.
created_at
.
stamp
(
"Aug 21, 2011 9:23pm"
)
=
@merge_request
.
created_at
.
stamp
(
"Aug 21, 2011 9:23pm"
)
%hr
%hr
.clearfix
%div
.well
=
simple_format
@merge_request
.
title
%div
.well
=
simple_format
@merge_request
.
title
.tabs
.tabs
...
...
app/views/projects/_feed.html.haml
View file @
0a4222fb
-
if
update
.
kind_of?
(
Note
)
%li
.wll
%a
.project-update.titled
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
.row
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"avatar"
,
:width
=>
32
.span9
%div
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"avatar thumb"
=
dashboard_feed_title
(
update
)
%p
%span
.update-author
%strong
.author
=
update
.
author_name
%strong
=
update
.
author_name
%span
–
authored
=
time_ago_in_words
(
update
.
created_at
)
=
time_ago_in_words
(
update
.
created_at
)
ago
ago
-
noteable
=
update
.
target
-
if
update
.
kind_of?
MergeRequest
-
if
noteable
.
kind_of?
(
MergeRequest
)
=
link_to
project_merge_request_path
(
@project
,
update
)
do
.title-block
=
"Opened merge request #
#{
update
.
id
}
."
%div
%span
.label
=
update
.
source_branch
%span
.commit.tag
Merge Request
#
=
noteable
.
id
%span
.update-author
%span
=
noteable
.
source_branch
→
→
%span
=
noteable
.
target_branch
%span
.label
=
update
.
target_branch
-
elsif
update
.
kind_of?
Issue
-
elsif
noteable
.
kind_of?
(
Issue
)
=
link_to
project_issue_path
(
@project
,
update
)
do
.title-block
Opened new
%div
%span
.label.important
=
"issue #
#{
update
.
id
}
"
%span
.commit.tag
=
truncate
update
.
title
Issue
#
=
noteable
.
id
%span
.update-author
.left
=
truncate
noteable
.
title
-
elsif
noteable
.
kind_of?
(
Commit
)
.title-block
%div
%span
.commit.tag
commit
%span
.update-author
.left
=
truncate
noteable
.
id
-
else
-
else
.title-block
=
link_to
[
@project
,
update
.
target
]
do
%div
%p
%span
.commit.tag
=
update
.
target
.
class
.
name
.
titleize
Project Wall
=
truncate
(
update
.
target
.
id
.
to_s
,
:length
=>
10
)
=
dashboard_feed_title
(
update
)
-
elsif
update
.
kind_of?
(
MergeRequest
)
%a
.project-update.titled
{
:href
=>
project_merge_request_path
(
project
,
update
)}
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"avatar"
,
:width
=>
32
%div
Opened merge request
%span
.update-author
%strong
=
update
.
author_name
=
time_ago_in_words
(
update
.
created_at
)
ago
.title-block
%div
%span
.commit.tag
Merge Request
#
=
update
.
id
%span
.update-author
%span
=
update
.
source_branch
→
%span
=
update
.
target_branch
-
elsif
update
.
kind_of?
(
Issue
)
%a
.project-update.titled
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"avatar"
,
:width
=>
32
%div
Created new Issue
%span
.update-author
%strong
=
update
.
author_name
=
time_ago_in_words
(
update
.
created_at
)
ago
.title-block
%div
%span
.commit.tag
Issue
#
=
update
.
id
%span
.update-author
.left
=
truncate
update
.
title
app/views/projects/_form.html.haml
View file @
0a4222fb
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
-
unless
@project
.
new_record?
||
@project
.
heads
.
empty?
-
unless
@project
.
new_record?
||
@project
.
heads
.
empty?
.clearfix
.clearfix
=
f
.
label
:default_branch
,
"Default Branch"
=
f
.
label
:default_branch
,
"Default Branch"
.input
=
f
.
select
(
:default_branch
,
@project
.
heads
.
map
(
&
:name
),
{},
:style
=>
"width:30
0px;"
)
.input
=
f
.
select
(
:default_branch
,
@project
.
heads
.
map
(
&
:name
),
{},
:style
=>
"width:21
0px;"
)
.clearfix
.clearfix
...
@@ -30,9 +30,9 @@
...
@@ -30,9 +30,9 @@
%br
%br
.
merge-tab
s
.
action
s
=
f
.
submit
'Save'
,
:class
=>
"btn primary"
=
f
.
submit
'Save'
,
:class
=>
"btn primary"
=
link_to
'Cancel'
,
@project
,
:class
=>
"btn"
-
unless
@project
.
new_record?
-
unless
@project
.
new_record?
.right
.right
=
link_to
'Remove'
,
@project
,
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"btn"
=
link_to
'Remove'
,
@project
,
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"btn
danger
"
app/views/projects/edit.html.haml
View file @
0a4222fb
=
render
"project_head"
=
render
"project_head"
%h3
Edit Project
=
form_for
(
@project
,
:remote
=>
true
)
do
|
f
|
%hr
%div
=
render
"projects/form"
%span
.entity-info
=
link_to
info_project_path
(
@project
)
do
.entity-button
Info
%i
%h2
=
@project
.
name
%hr
%table
.no-borders
-
if
@project
.
errors
.
any?
%tr
%td
{
:colspan
=>
2
}
#error_explanation
-
@project
.
errors
.
full_messages
.
each
do
|
msg
|
%span
=
msg
%br
%tr
%td
=
f
.
label
:name
%td
=
f
.
text_field
:name
,
:placeholder
=>
"Example Project"
%tr
%td
.left
=
f
.
label
:path
%cite
.right
=
"git@
#{
GIT_HOST
[
"host"
]
}
:"
%td
=
f
.
text_field
:path
,
:placeholder
=>
"example_project"
,
:disabled
=>
!
@project
.
new_record?
%tr
%td
.left
=
f
.
label
:code
%cite
.right
=
"http://
#{
GIT_HOST
[
"host"
]
}
/"
%td
=
f
.
text_field
:code
,
:placeholder
=>
"example"
-
unless
@project
.
new_record?
||
@project
.
heads
.
empty?
%tr
%td
=
f
.
label
:default_branch
,
"Default Branch"
%td
=
f
.
select
(
:default_branch
,
@project
.
heads
.
map
(
&
:name
),
{},
:style
=>
"width:300px;"
)
%tr
%td
=
f
.
label
:description
%td
=
f
.
text_area
:description
,
:placeholder
=>
"project description"
,
:style
=>
"height:50px"
%br
.merge-tabs
=
f
.
submit
'Save'
,
:class
=>
"grey-button"
-
unless
@project
.
new_record?
.right
=
link_to
'Remove'
,
@project
,
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"red-button"
%div
{
:class
=>
"ajax_loader"
,
:style
=>
"display:none;height:200px;"
}
%div
{
:class
=>
"ajax_loader"
,
:style
=>
"display:none;height:200px;"
}
%center
%center
=
image_tag
"ajax-loader.gif"
,
:class
=>
"append-bottom"
=
image_tag
"ajax-loader.gif"
,
:class
=>
"append-bottom"
%h3
.prepend-top
Updating project
&
repository. Please wait for few minutes
%h3
.prepend-top
Saving project
&
repository. Please wait...
:javascript
:javascript
$
(
'
.edit_project
'
).
bind
(
'
ajax:before
'
,
function
()
{
$
(
function
(){
$
(
"
.edit_project
"
).
hide
();
$
(
"
#project_name
"
).
live
(
"
change
"
,
function
(){
$
(
'
.ajax_loader
'
).
show
();
var
slug
=
slugify
(
$
(
this
).
val
());
$
(
"
#project_code
"
).
val
(
slug
);
$
(
"
#project_path
"
).
val
(
slug
);
});
});
});
:javascript
function
slugify
(
text
)
{
return
text
.
replace
(
/
[^
-a-zA-Z0-9
]
+/g
,
'
_
'
).
toLowerCase
();
}
$
(
function
(){
$
(
function
(){
$
(
'
#project_default_branch
'
).
chosen
();
$
(
'
.edit_project
'
).
live
(
'
ajax:before
'
,
function
()
{
$
(
this
).
hide
();
$
(
'
.ajax_loader
'
).
show
();
});
$
(
'
form #project_default_branch
'
).
chosen
();
})
})
app/views/projects/empty.html.haml
View file @
0a4222fb
-
if
current_user
.
require_ssh_key?
-
if
current_user
.
require_ssh_key?
%ul
.errors_holder
.alert-message.block-message.error
%ul
%li
You have no ssh keys added yo tour profile.
%li
You have no ssh keys added yo tour profile.
%li
You wont be able to pull/push repository.
%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.
%li
Visit profile
→
keys and add public key of every machine you want to use for work with gitlabhq.
.alert-message.block-message.error
%ul
.alert_holder
%ul
.alert_holder
%li
You should push repository to proceed.
%li
You should push repository to proceed.
%li
After push you will be able to browse code, commits etc.
%li
After push you will be able to browse code, commits etc.
...
...
app/views/projects/index.html.haml
View file @
0a4222fb
%h3
Projects
%h3
Projects
%small
=
"(
#{
current_user
.
projects
.
count
}
)"
%hr
%hr
-
unless
@projects
.
empty?
-
unless
@projects
.
empty?
%div
.tile
=
render
"tile"
%div
.tile
=
render
"tile"
...
...
app/views/projects/info.html.haml
View file @
0a4222fb
=
render
"project_head"
=
render
"project_head"
%h3
=
@project
.
name
%br
%div
%span
.entity-info
=
link_to
edit_project_path
(
@project
)
do
.entity-button
Edit
%i
%h2
=
@project
.
name
%hr
%table
.no-borders
%pre
=
"git clone
#{
@project
.
url_to_repo
}
"
%table
%tr
%tr
%td
Name
%td
Name
%td
=
@project
.
name
%td
=
@project
.
name
...
@@ -18,6 +17,36 @@
...
@@ -18,6 +17,36 @@
%td
Slug
%td
Slug
%td
=
@project
.
code
%td
=
@project
.
code
%tr
%td
Path
%td
=
@project
.
path
%tr
%td
Owner
%td
=
link_to
@project
.
owner
.
name
,
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@project
.
owner
))
%tr
%td
Last commit
%td
=
time_ago_in_words
(
@project
.
commit
.
committed_date
)
ago
%tr
%td
Team
%td
=
@project
.
users_projects
.
count
users
%tr
%td
Open Issues
%td
=
@project
.
issues
.
opened
.
count
%tr
%td
Merge Requests
%td
=
@project
.
merge_requests
.
opened
.
count
%tr
%tr
%td
Created
%td
Created
%td
=
@project
.
created_at
.
stamp
(
"Aug 21, 2011"
)
%td
=
@project
.
created_at
.
stamp
(
"Aug 21, 2011"
)
...
@@ -25,4 +54,6 @@
...
@@ -25,4 +54,6 @@
%tr
%tr
%td
{
:colspan
=>
2
}=
simple_format
@project
.
description
%td
{
:colspan
=>
2
}=
simple_format
@project
.
description
.actions
=
link_to
"Edit"
,
edit_project_path
(
@project
),
:class
=>
"btn"
app/views/projects/show.html.haml
View file @
0a4222fb
-
content_for
(
:body_class
,
"project-page dashboard"
)
=
render
"project_head"
=
render
"project_head"
#news-feed
.news-feed
-
@activities
.
each
do
|
update
|
.project-box.project-updates
.alert-message.entry
-
@activities
.
each
do
|
update
|
=
link_to
dashboard_feed_path
(
@project
,
update
)
do
=
render
"projects/feed"
,
:update
=>
update
,
:project
=>
@project
-
if
update
.
kind_of?
Note
%p
:javascript
%strong
function
updateDashboard
(){
=
update
.
target
.
class
.
name
.
titleize
$
(
'
.project-content
'
).
load
(
"
#{
escape_javascript
(
project_path
(
@project
))
}
.project-content>*
"
);
=
truncate
update
.
target
.
id
.
to_s
,
:length
=>
10
}
commented
setInterval
(
"
updateDashboard()
"
,
300000
);
–
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
""
,
:width
=>
16
=
truncate
dashboard_feed_title
(
update
),
:length
=>
50
-
else
%p
%strong
=
update
.
class
.
name
.
titleize
=
truncate
update
.
id
.
to_s
–
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
""
,
:width
=>
16
=
truncate
dashboard_feed_title
(
update
),
:length
=>
50
app/views/repositories/_feed.html.haml
View file @
0a4222fb
%a
.project-update.titled
{
:href
=>
project_commits_path
(
project
,
:ref
=>
update
.
head
.
name
)}
-
commit
=
update
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
.alert-message.entry
%span
.update-title
=
link_to
project_commits_path
(
@project
,
:ref
=>
commit
.
head
.
name
)
do
=
dashboard_feed_title
(
update
)
%p
%span
.update-author
%strong
%strong
=
update
.
author_name
=
commit
.
head
.
name
authored
–
=
time_ago_in_words
(
update
.
created_at
)
=
truncate
(
commit
.
id
.
to_s
,
:length
=>
10
)
=
image_tag
gravatar_icon
(
commit
.
author_email
),
:class
=>
""
,
:width
=>
16
=
truncate
(
commit
.
safe_message
,
:length
=>
40
)
%span
.right
=
time_ago_in_words
(
commit
.
committed_date
)
ago
ago
.title-block
%span
.update-title
%span
.commit.tag
=
update
.
head
.
name
%span
.update-author
.left
=
truncate
update
.
commit
.
id
app/views/repositories/branches.html.haml
View file @
0a4222fb
=
render
"head"
=
render
"head"
-
unless
@branches
.
empty?
-
unless
@branches
.
empty?
%div
.update-data.ui-box.ui-box-small
%table
.data
%thead
%tr
%th
Name
%th
Last commit
%tbody
-
@branches
.
each
do
|
branch
|
-
@branches
.
each
do
|
branch
|
%a
.update-item
{
:href
=>
project_commits_path
(
@project
,
:ref
=>
branch
.
name
)}
%tr
%span
.update-title
{
:style
=>
"margin-bottom:0px;"
}
%td
=
branch
.
name
=
link_to
project_commits_path
(
@project
,
:ref
=>
branch
.
name
)
do
%span
.update-author.right
%strong
=
branch
.
name
-
if
branch
.
name
==
@project
.
root_ref
%span
.label
default
%td
=
link_to
project_commits_path
(
@project
,
branch
.
commit
.
id
)
do
=
truncate
branch
.
commit
.
id
.
to_s
,
:length
=>
10
=
time_ago_in_words
(
branch
.
commit
.
committed_date
)
=
time_ago_in_words
(
branch
.
commit
.
committed_date
)
ago
ago
-
else
%h3
No brances
app/views/repositories/show.html.haml
View file @
0a4222fb
-
content_for
(
:body_class
,
"project-page dashboard"
)
=
render
"head"
=
render
"head"
%ul
.unstyled
#news-feed
.news-feed
.project-box.project-updates
-
@activities
.
each
do
|
update
|
-
@activities
.
each
do
|
update
|
=
render
"repositories/feed"
,
:update
=>
update
,
:project
=>
@project
=
render
"repositories/feed"
,
:update
=>
update
,
:project
=>
@project
config/routes.rb
View file @
0a4222fb
...
@@ -106,5 +106,5 @@ Gitlab::Application.routes.draw do
...
@@ -106,5 +106,5 @@ Gitlab::Application.routes.draw do
end
end
resources
:notes
,
:only
=>
[
:create
,
:destroy
]
resources
:notes
,
:only
=>
[
:create
,
:destroy
]
end
end
root
:to
=>
"
dashboard
#index"
root
:to
=>
"
projects
#index"
end
end
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