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
Kazuhiko Shiozaki
gitlab-ce
Commits
a77c8bf9
Commit
a77c8bf9
authored
Jan 29, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bootstrap: Issues & MR
parent
d81f0b78
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
171 additions
and
140 deletions
+171
-140
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+4
-0
app/assets/stylesheets/reset_bootstrap.scss
app/assets/stylesheets/reset_bootstrap.scss
+27
-1
app/assets/stylesheets/tree.scss
app/assets/stylesheets/tree.scss
+4
-0
app/models/commit.rb
app/models/commit.rb
+1
-1
app/views/issues/_form.html.haml
app/views/issues/_form.html.haml
+3
-3
app/views/issues/_show.html.haml
app/views/issues/_show.html.haml
+34
-24
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+25
-21
app/views/issues/show.html.haml
app/views/issues/show.html.haml
+37
-44
app/views/merge_requests/_commits.html.haml
app/views/merge_requests/_commits.html.haml
+10
-14
app/views/merge_requests/_merge_request.html.haml
app/views/merge_requests/_merge_request.html.haml
+11
-8
app/views/merge_requests/index.html.haml
app/views/merge_requests/index.html.haml
+15
-24
No files found.
app/assets/stylesheets/common.scss
View file @
a77c8bf9
...
...
@@ -162,6 +162,10 @@ img.avatar {
p
{
padding-top
:
5px
;}
}
.author_link
{
color
:
$active_link_color
;
}
@import
"reset_bootstrap.scss"
;
@import
"top_panel.scss"
;
@import
"projects.css.scss"
;
...
...
app/assets/stylesheets/reset_bootstrap.scss
View file @
a77c8bf9
...
...
@@ -6,7 +6,33 @@ a {
}
}
.alert-message.entry
{
.entry
{
position
:
relative
;
padding
:
7px
15px
;
margin-bottom
:
18px
;
color
:
#404040
;
background-color
:
#eedc94
;
background-repeat
:
repeat-x
;
background-image
:
-khtml-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#fceec1
)
,
to
(
#eedc94
));
background-image
:
-moz-linear-gradient
(
top
,
#fceec1
,
#eedc94
);
background-image
:
-ms-linear-gradient
(
top
,
#fceec1
,
#eedc94
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
color-stop
(
0%
,
#fceec1
)
,
color-stop
(
100%
,
#eedc94
));
background-image
:
-webkit-linear-gradient
(
top
,
#fceec1
,
#eedc94
);
background-image
:
-o-linear-gradient
(
top
,
#fceec1
,
#eedc94
);
background-image
:
linear-gradient
(
top
,
#fceec1
,
#eedc94
);
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#FFFCEEC1'
,
endColorstr
=
'#FFEEDC94'
,
GradientType
=
0
);
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0
.25
);
border-color
:
#eedc94
#eedc94
#e4c652
;
border-color
:
rgba
(
0
,
0
,
0
,
0
.1
)
rgba
(
0
,
0
,
0
,
0
.1
)
fadein
(
rgba
(
0
,
0
,
0
,
0
.1
)
,
15%
);
text-shadow
:
0
1px
0
rgba
(
255
,
255
,
255
,
0
.5
);
border-width
:
1px
;
border-style
:
solid
;
-webkit-border-radius
:
4px
;
-moz-border-radius
:
4px
;
border-radius
:
4px
;
-webkit-box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0
.25
);
-moz-box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0
.25
);
box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0
.25
);
background
:
#F1F1F1
;
border-color
:
#ccc
;
}
app/assets/stylesheets/tree.scss
View file @
a77c8bf9
...
...
@@ -119,4 +119,8 @@ table.highlighttable .linenodiv pre {
background
:
#FFFFCF
;
cursor
:pointer
;
}
.tree-item-file-name
{
font-weight
:bold
;
}
}
app/models/commit.rb
View file @
a77c8bf9
...
...
@@ -27,7 +27,7 @@ class Commit
@head
=
head
end
def
safe_message
()
def
safe_message
message
end
...
...
app/views/issues/_form.html.haml
View file @
a77c8bf9
...
...
@@ -24,7 +24,7 @@
.clearfix
=
f
.
label
:title
.input
=
f
.
text_area
:title
,
:maxlength
=>
255
,
:class
=>
"xlarge"
.
clearfix
.
actions
=
f
.
submit
'Save'
,
:class
=>
"primary btn"
-
if
request
.
xhr?
...
...
@@ -36,6 +36,6 @@
=
link_to
"Cancel"
,
project_issue_path
(
@project
,
@issue
),
:class
=>
"btn"
-
#-
unless @issue.new_record?
-
unless
@issue
.
new_record?
.right
= link_to 'Remove', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "
red-butto
n"
=
link_to
'Remove'
,
[
@project
,
@issue
],
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"
danger bt
n"
app/views/issues/_show.html.haml
View file @
a77c8bf9
%tr
{
:id
=>
dom_id
(
issue
),
:class
=>
"issue #{issue.critical ? "
critical
" : ""}"
,
:url
=>
project_issue_path
(
issue
.
project
,
issue
)
}
%td
=
image_tag
gravatar_icon
(
issue
.
assignee_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%span
=
truncate
(
html_escape
(
issue
.
title
),
:length
=>
50
)
%div
.note-author
%strong
=
issue
.
assignee
.
name
%cite
.cgray
=
time_ago_in_words
(
issue
.
created_at
)
ago
-
if
issue
.
critical
%span
.tag.high
critical
-
if
issue
.
today?
%span
.tag.today
today
.right.action-links
-
if
can?
current_user
,
:write_issue
,
issue
-
if
issue
.
closed
=
link_to
'Reopen'
,
project_issue_path
(
issue
.
project
,
issue
,
:issue
=>
{
:closed
=>
false
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"btn small"
,
:remote
=>
true
-
else
=
link_to
'Resolve'
,
project_issue_path
(
issue
.
project
,
issue
,
:issue
=>
{
:closed
=>
true
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"success btn small"
,
:remote
=>
true
-
if
can?
current_user
,
:write_issue
,
issue
=
link_to
'Edit'
,
edit_project_issue_path
(
issue
.
project
,
issue
),
:class
=>
"btn small edit-issue-link"
,
:remote
=>
true
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
||
issue
.
author
==
current_user
=
link_to
'Remove'
,
[
issue
.
project
,
issue
],
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:remote
=>
true
,
:class
=>
"danger btn small delete-issue"
,
:id
=>
"destroy_issue_
#{
issue
.
id
}
"
%li
.wll
{
:id
=>
dom_id
(
issue
),
:class
=>
"issue #{issue.critical ? "
critical
" : ""}"
,
:url
=>
project_issue_path
(
issue
.
project
,
issue
)
}
=
image_tag
gravatar_icon
(
issue
.
author_email
),
:class
=>
"avatar"
%span
.update-author
%strong
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
issue
.
author_id
)),
:class
=>
"author_link"
do
=
issue
.
author_name
authored
=
time_ago_in_words
(
issue
.
created_at
)
ago
-
if
issue
.
critical
%span
.label.important
critical
-
if
issue
.
today?
%span
.label.success
today
.right
-
if
can?
current_user
,
:write_issue
,
issue
-
if
issue
.
closed
=
link_to
'Reopen'
,
project_issue_path
(
issue
.
project
,
issue
,
:issue
=>
{
:closed
=>
false
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"btn small"
,
:remote
=>
true
-
else
=
link_to
'Resolve'
,
project_issue_path
(
issue
.
project
,
issue
,
:issue
=>
{
:closed
=>
true
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"success btn small"
,
:remote
=>
true
-
if
can?
current_user
,
:write_issue
,
issue
=
link_to
'Edit'
,
edit_project_issue_path
(
issue
.
project
,
issue
),
:class
=>
"btn small edit-issue-link"
,
:remote
=>
true
-#- if can?(current_user, :admin_issue, @project) || issue.author == current_user
= link_to 'Remove', [issue.project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "danger btn small delete-issue", :id => "destroy_issue_#{issue.id}"
=
link_to
project_issue_path
(
issue
.
project
,
issue
)
do
%p
Issue ##{issue.id}:
=
truncate
(
issue
.
title
,
:length
=>
50
)
app/views/issues/index.html.haml
View file @
a77c8bf9
...
...
@@ -13,25 +13,29 @@
New Issue
%hr
%div
#issues-table-holder
%ul
.pills.left
%li
{
:class
=>
(
"active"
if
(
params
[
:f
]
==
"0"
||
!
params
[
:f
]))}
=
link_to
project_issues_path
(
@project
,
:f
=>
0
)
do
Open
%li
{
:class
=>
(
"active"
if
params
[
:f
]
==
"2"
)}
=
link_to
project_issues_path
(
@project
,
:f
=>
2
)
do
Closed
%li
{
:class
=>
(
"active"
if
params
[
:f
]
==
"3"
)}
=
link_to
project_issues_path
(
@project
,
:f
=>
3
)
do
To Me
%li
{
:class
=>
(
"active"
if
params
[
:f
]
==
"1"
)}
=
link_to
project_issues_path
(
@project
,
:f
=>
1
)
do
All
.row
.span8
%ul
.pills.left
%li
{
:class
=>
(
"active"
if
(
params
[
:f
]
==
"0"
||
!
params
[
:f
]))}
=
link_to
project_issues_path
(
@project
,
:f
=>
0
)
do
Open
%li
{
:class
=>
(
"active"
if
params
[
:f
]
==
"2"
)}
=
link_to
project_issues_path
(
@project
,
:f
=>
2
)
do
Closed
%li
{
:class
=>
(
"active"
if
params
[
:f
]
==
"3"
)}
=
link_to
project_issues_path
(
@project
,
:f
=>
3
)
do
To Me
%li
{
:class
=>
(
"active"
if
params
[
:f
]
==
"1"
)}
=
link_to
project_issues_path
(
@project
,
:f
=>
1
)
do
All
=
form_tag
search_project_issues_path
(
@project
),
:method
=>
:get
,
:remote
=>
true
,
:id
=>
"issue_search_form"
,
:class
=>
:right
do
=
hidden_field_tag
:project_id
,
@project
.
id
,
{
:id
=>
'project_id'
}
=
search_field_tag
:issue_search
,
nil
,
{
:placeholder
=>
'Search'
,
:class
=>
'issue_search'
}
.span2.right
=
form_tag
search_project_issues_path
(
@project
),
:method
=>
:get
,
:remote
=>
true
,
:id
=>
"issue_search_form"
,
:class
=>
:right
do
=
hidden_field_tag
:project_id
,
@project
.
id
,
{
:id
=>
'project_id'
}
=
search_field_tag
:issue_search
,
nil
,
{
:placeholder
=>
'Search'
,
:class
=>
'issue_search'
}
%table
#issues-table
=
render
"issues"
%hr
%ul
#issues-table
.unstyled
=
render
"issues"
:javascript
var
href
=
$
(
'
.issue_search
'
).
parent
().
attr
(
'
action
'
);
...
...
@@ -46,7 +50,7 @@
if
(
terms
.
length
>=
2
||
terms
.
length
==
0
)
{
$
.
get
(
href
,
{
'
status
'
:
status
,
'
terms
'
:
terms
,
project
:
project_id
},
function
(
response
)
{
$
(
'
#issues-table
tbody
'
).
html
(
response
);
$
(
'
#issues-table
'
).
html
(
response
);
setSortable
();
});
}
...
...
@@ -57,7 +61,7 @@
$
(
this
).
closest
(
'
tr
'
).
fadeOut
();
updatePage
();});
function
setSortable
(){
$
(
'
#issues-table
>tbody
'
).
sortable
({
$
(
'
#issues-table
'
).
sortable
({
axis
:
'
y
'
,
dropOnEmpty
:
false
,
handle
:
'
.handle
'
,
...
...
@@ -68,10 +72,10 @@
update
:
function
(){
$
.
ajax
({
type
:
'
post
'
,
data
:
$
(
'
#issues-table
>tbody
'
).
sortable
(
'
serialize
'
),
data
:
$
(
'
#issues-table
'
).
sortable
(
'
serialize
'
),
dataType
:
'
script
'
,
complete
:
function
(
request
){
$
(
'
#issues-table
>tbody
'
).
effect
(
'
highlight
'
);
$
(
'
#issues-table
'
).
effect
(
'
highlight
'
);
},
url
:
"
#{
sort_project_issues_path
(
@project
)
}
"
})
}
...
...
app/views/issues/show.html.haml
View file @
a77c8bf9
%div
%span
.entity-info
%h3
Issue ##{@issue.id}
%span
.right
-
if
can?
(
current_user
,
:admin_project
,
@project
)
||
@issue
.
author
==
current_user
-
if
@issue
.
closed
=
link_to
'Reopen'
,
project_issue_path
(
@project
,
@issue
,
:issue
=>
{
:closed
=>
false
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"btn"
-
else
=
link_to
'Close'
,
project_issue_path
(
@project
,
@issue
,
:issue
=>
{
:closed
=>
true
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"btn"
,
:title
=>
"Close merge request"
-
if
can?
(
current_user
,
:admin_project
,
@project
)
||
@issue
.
author
==
current_user
=
link_to
edit_project_issue_path
(
@project
,
@issue
)
do
.entity-button
Edit Issue
%i
=
image_tag
gravatar_icon
(
@issue
.
author_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%span
.commit-title
%strong
=
"Issue #
#{
@issue
.
id
}
:"
%span
.commit-author
%strong
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@issue
.
author
.
id
))
do
%span
.author
=
@issue
.
author_name
-
if
@issue
.
author
!=
@issue
.
assignee
=
link_to
edit_project_issue_path
(
@project
,
@issue
),
:class
=>
"btn small"
do
Edit
%hr
-
if
@issue
.
closed
.alert-message.error
Closed
-
else
.alert-message.success
Open
%div
.well
%div
%span
.entity-info
=
image_tag
gravatar_icon
(
@issue
.
author_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%span
.commit-title
%strong
%span
.commit-author
%strong
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@issue
.
author
.
id
))
do
%span
.author
=
@issue
.
author_name
→
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@issue
.
assignee
.
id
))
do
%span
.author
=
@issue
.
assignee_name
=
@issue
.
created_at
.
stamp
(
"Aug 21, 2011 9:23pm"
)
%hr
%br
%h3
=
simple_format
@issue
.
title
.clear
%br
%br
.merge-tabs
=
link_to
"#notes"
,
:class
=>
"merge-notes-tab active tab"
do
%span
Notes
.right
-
if
@issue
.
closed
=
link_to
'Reopen'
,
project_issue_path
(
@project
,
@issue
,
:issue
=>
{
:closed
=>
false
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"red-button"
-
else
=
link_to
'Close'
,
project_issue_path
(
@project
,
@issue
,
:issue
=>
{
:closed
=>
true
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"positive-button"
.merge-request-notes
.issue_notes
=
render
"notes/notes"
.loading
{
:style
=>
"display:none;"
}
%center
=
image_tag
"ajax-loader.gif"
.clear
%br
.cgray
=
@issue
.
created_at
.
stamp
(
"Aug 21, 2011 9:23pm"
)
%div
=
simple_format
@issue
.
title
.issue_notes
=
render
"notes/notes"
app/views/merge_requests/_commits.html.haml
View file @
a77c8bf9
-
if
@commits
.
size
>
0
.merge-request-commits
.ui-box.width-100p
.merge-request-commits
-
@commits
.
each
do
|
commit
|
%a
{
:class
=>
"commit"
,
:href
=>
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
}
-
if
commit
.
author_email
=
image_tag
gravatar_icon
(
commit
.
author_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
-
else
=
image_tag
"no_avatar.png"
,
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%span
.commit-title
=
truncate
commit
.
safe_message
,
:length
=>
60
%span
.commit-author
%strong
=
commit
.
author_name
authored
=
time_ago_in_words
(
commit
.
created_at
)
ago
.clear
.entry
=
link_to
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
do
%strong
=
truncate
(
commit
.
id
.
to_s
,
:length
=>
10
)
=
image_tag
gravatar_icon
(
commit
.
author_email
),
:class
=>
""
,
:width
=>
16
%span
=
truncate
(
commit
.
safe_message
,
:length
=>
40
)
%span
.right
=
time_ago_in_words
(
commit
.
committed_date
)
ago
-
if
@commits
.
empty?
%p
.cgray
Nothing to merge
app/views/merge_requests/_merge_request.html.haml
View file @
a77c8bf9
%a
.update-item
{
:href
=>
project_merge_request_path
(
merge_request
.
project
,
merge_request
)}
=
image_tag
gravatar_icon
(
merge_request
.
author_email
),
:class
=>
"left"
,
:width
=>
40
%span
.update-title
=
truncate
(
merge_request
.
title
,
:length
=>
60
)
%li
.wll
=
image_tag
gravatar_icon
(
merge_request
.
author_email
),
:class
=>
"avatar"
%span
.update-author
%strong
=
merge_request
.
author_name
%strong
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
merge_request
.
author_id
)),
:class
=>
"author_link"
do
=
merge_request
.
author_name
authored
=
time_ago_in_words
(
merge_request
.
created_at
)
ago
.right
%span
.
tag.commit
=
merge_request
.
source_branch
%span
.
label
=
merge_request
.
source_branch
→
%span
.tag.commit
=
merge_request
.
target_branch
%span
.label
=
merge_request
.
target_branch
=
link_to
project_merge_request_path
(
merge_request
.
project
,
merge_request
)
do
%p
Merge Request ##{merge_request.id}:
=
truncate
(
merge_request
.
title
,
:length
=>
50
)
app/views/merge_requests/index.html.haml
View file @
a77c8bf9
.left.issues_filter
=
form_tag
project_merge_requests_path
(
@project
),
:method
=>
:get
do
.left
=
radio_button_tag
:f
,
0
,
(
params
[
:f
]
||
"0"
)
==
"0"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"open_merge_requests"
,
:class
=>
"status"
=
label_tag
"open_merge_requests"
do
%span
.tag.open
Open
.left
=
radio_button_tag
:f
,
2
,
params
[
:f
]
==
"2"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"closed_merge_requests"
,
:class
=>
"status"
=
label_tag
"closed_merge_requests"
do
%span
.tag.closed
Closed
%h3
Merge Requests
-
if
can?
current_user
,
:write_issue
,
@project
=
link_to
new_project_merge_request_path
(
@project
),
:class
=>
"right btn small"
,
:title
=>
"New Merge Request"
do
New Merge Request
.clear
%hr
%ul
.pills
%li
{
:class
=>
(
"active"
if
(
params
[
:f
]
==
"0"
||
!
params
[
:f
]))}
=
link_to
project_merge_requests_path
(
@project
,
:f
=>
0
)
do
Open
%li
{
:class
=>
(
"active"
if
params
[
:f
]
==
"2"
)}
=
link_to
project_merge_requests_path
(
@project
,
:f
=>
2
)
do
Closed
%hr
%ul
.unstyled
=
render
@merge_requests
.row
.span10
-
if
@merge_requests
.
count
>
0
%div
{
:class
=>
"update-data ui-box ui-box-small ui-box-big"
}
.data
=
render
@merge_requests
.span4
-
if
can?
current_user
,
:write_merge_request
,
@project
.alert-message.block-message.info
%p
You can open a new merge request.
-
if
current_page?
(
project_merge_requests_path
(
@project
))
=
link_to
new_project_merge_request_path
(
@project
),
:class
=>
"btn small"
,
:title
=>
"New Merge request"
do
Add new
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