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
32abaa33
Commit
32abaa33
authored
Nov 07, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issues_restyle' into dev
parents
9054f64c
67b9fa51
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
82 additions
and
69 deletions
+82
-69
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+24
-0
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+1
-0
app/views/issues/_issues.html.haml
app/views/issues/_issues.html.haml
+4
-13
app/views/issues/_show.html.haml
app/views/issues/_show.html.haml
+23
-31
app/views/issues/create.js.haml
app/views/issues/create.js.haml
+1
-0
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+27
-24
app/views/issues/index.js.haml
app/views/issues/index.js.haml
+1
-1
spec/requests/issues_spec.rb
spec/requests/issues_spec.rb
+1
-0
No files found.
app/assets/stylesheets/projects.css.scss
View file @
32abaa33
...
...
@@ -679,6 +679,30 @@ body.project-page table .commit {
}
}
#notes-list
.note
.delete-note
{
display
:none
;
}
#notes-list
.note
:hover
.delete-note
{
display
:block
;
}
#issues-table-holder
.issue
.action-links
{
display
:none
;
a
{
margin-left
:
10px
;
}
}
.issue-number
{
float
:
left
;
border-radius
:
5px
;
text-shadow
:
none
;
background
:
rgba
(
0
,
0
,
0
,
0
.12
);
text-align
:
center
;
padding
:
14px
8px
;
width
:
40px
;
margin-right
:
10px
;
color
:
#444
;
}
#issues-table-holder
.issue
:hover
.action-links
{
display
:block
;
}
body
.project-page
#notes-list
.note
{
padding
:
10px
;
border-bottom
:
1px
solid
#eee
;
overflow
:
hidden
;
display
:
block
;}
body
.project-page
#notes-list
.note
{
padding
:
10px
;
border-bottom
:
1px
solid
#eee
;
overflow
:
hidden
;
display
:
block
;}
body
.project-page
#notes-list
.note
img
{
float
:
left
;
margin-right
:
10px
;}
...
...
app/controllers/issues_controller.rb
View file @
32abaa33
...
...
@@ -47,6 +47,7 @@ class IssuesController < ApplicationController
def
create
@issue
=
@project
.
issues
.
new
(
params
[
:issue
])
@issue
.
author
=
current_user
if
@issue
.
save
&&
@issue
.
assignee
!=
current_user
Notify
.
new_issue_email
(
@issue
).
deliver
end
...
...
app/views/issues/_issues.html.haml
View file @
32abaa33
%table
.round-borders
#issues-table
%thead
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
&&
!
params
[
:f
]
||
params
[
:f
]
==
"0"
%th
%th
Assignee
%th
ID
%th
Title
%th
Closed?
-
@issues
.
critical
.
each
do
|
issue
|
-
@issues
.
critical
.
each
do
|
issue
|
=
render
(
:partial
=>
'show'
,
:locals
=>
{
:issue
=>
issue
})
-
@issues
.
non_critical
.
each
do
|
issue
|
-
@issues
.
non_critical
.
each
do
|
issue
|
=
render
(
:partial
=>
'show'
,
:locals
=>
{
:issue
=>
issue
})
app/views/issues/_show.html.haml
View file @
32abaa33
%tr
{
:id
=>
dom_id
(
issue
),
:class
=>
"issue #{issue.critical ? "
critical
" : ""}"
,
:url
=>
project_issue_path
(
@project
,
issue
)
}
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
&&
(
!
params
[
:f
]
||
params
[
:f
]
==
"0"
)
-
#-
if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0")
%td
= image_tag "move.png" , :class => [:handle, :left]
%td
=
image_tag
gravatar_icon
(
issue
.
assignee
.
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding:0 5px;"
=
issue
.
assignee
.
name
%td
##{issue.id}
%td
=
truncate
(
html_escape
(
issue
.
title
),
:length
=>
200
)
%strong
.issue-number
=
"#
#{
issue
.
id
}
"
%span
=
truncate
(
html_escape
(
issue
.
title
),
:length
=>
fixed_mode?
?
100
:
200
)
%br
%br
%div
.note-author
%strong
=
issue
.
assignee
.
name
%cite
.cgray
=
time_ago_in_words
(
issue
.
updated_at
)
ago
-
if
issue
.
critical
%span
.tag.high
critical
-
if
issue
.
today?
%span
.tag.today
today
.right
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
||
issue
.
author
==
current_user
=
link_to
'Edit'
,
edit_project_issue_path
(
@project
,
issue
),
:class
=>
"cgray"
,
:remote
=>
true
.right.action-links
-
if
can?
current_user
,
:write_issue
,
issue
-
if
issue
.
closed
=
link_to
'Reopen'
,
project_issue_path
(
@project
,
issue
,
:issue
=>
{
:closed
=>
false
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"cgray"
,
:remote
=>
true
-
else
=
link_to
'Resolve'
,
project_issue_path
(
@project
,
issue
,
:issue
=>
{
:closed
=>
true
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"cgray"
,
:remote
=>
true
-
if
can?
current_user
,
:write_issue
,
issue
=
link_to
'Edit'
,
edit_project_issue_path
(
@project
,
issue
),
:class
=>
"cgray edit-issue-link"
,
:remote
=>
true
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
||
issue
.
author
==
current_user
=
link_to
'Destroy'
,
[
@project
,
issue
],
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:remote
=>
true
,
:class
=>
"cred delete-issue negative"
,
:id
=>
"destroy_issue_
#{
issue
.
id
}
"
-#- if issue.author == current_user
-#%span.tag.yours yours
-#- if issue.notes.count > 0
-#%span.tag.notes
-#= issue.notes.count
-#notes
%td
-
if
can?
current_user
,
:write_issue
,
@project
=
form_for
([
@project
,
issue
],
:remote
=>
true
)
do
|
f
|
=
f
.
check_box
:closed
,
:onclick
=>
"$(this).parent().submit();"
=
hidden_field_tag
:status_only
,
true
-
else
=
check_box_tag
"closed"
,
1
,
issue
.
closed
,
:disabled
=>
true
app/views/issues/create.js.haml
View file @
32abaa33
-
if
@issue
.
valid?
:plain
$("#new_issue_dialog").dialog("close");
$("#issues-table").prepend("
#{
escape_javascript
(
render
(
:partial
=>
'show'
,
:locals
=>
{
:issue
=>
@issue
}
))
}
");
$.ajax({type: "GET", url: location.href, dataType: "script"});
-
else
:plain
...
...
app/views/issues/index.html.haml
View file @
32abaa33
%div
%div
#issues-table-holder
%table
.round-borders
#issues-table
%thead
%th
.top_panel_issues
-
if
can?
current_user
,
:write_issue
,
@project
%div
{
:class
=>
"left"
,
:style
=>
"margin-right: 10px;"
}
...
...
@@ -22,7 +25,7 @@
=
radio_button_tag
:f
,
1
,
params
[
:f
]
==
"1"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"all_issues"
,
:class
=>
"status"
=
label_tag
"all_issues"
,
"All"
#issues-table-holder
=
render
"issues"
=
render
"issues"
%br
:javascript
var
href
=
$
(
'
.issue_search
'
).
parent
().
attr
(
'
action
'
);
...
...
@@ -37,7 +40,7 @@
if
(
terms
.
length
>=
2
||
terms
.
length
==
0
)
{
$
.
get
(
href
,
{
'
status
'
:
status
,
'
terms
'
:
terms
,
project
:
project_id
},
function
(
response
)
{
$
(
'
#issues-table
'
).
html
(
response
);
$
(
'
#issues-table
tbody
'
).
html
(
response
);
setSortable
();
});
}
...
...
app/views/issues/index.js.haml
View file @
32abaa33
:plain
$('#issues-table
-holder
').html("
#{
escape_javascript
(
render
(
'issues'
))
}
");
$('#issues-table
tbody
').html("
#{
escape_javascript
(
render
(
'issues'
))
}
");
setSortable();
spec/requests/issues_spec.rb
View file @
32abaa33
...
...
@@ -169,6 +169,7 @@ describe "Issues" do
:assignee
=>
@user
,
:project
=>
project
visit
project_issues_path
(
project
)
page
.
execute_script
(
"$('.action-links').css('display', 'block');"
)
click_link
"Edit"
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