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
67b9fa51
Commit
67b9fa51
authored
Nov 07, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tests
parent
60f083ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
1 deletion
+4
-1
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+1
-0
app/views/issues/_show.html.haml
app/views/issues/_show.html.haml
+1
-1
app/views/issues/create.js.haml
app/views/issues/create.js.haml
+1
-0
spec/requests/issues_spec.rb
spec/requests/issues_spec.rb
+1
-0
No files found.
app/controllers/issues_controller.rb
View file @
67b9fa51
...
...
@@ -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/_show.html.haml
View file @
67b9fa51
...
...
@@ -24,6 +24,6 @@
-
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"
,
:remote
=>
true
=
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
}
"
app/views/issues/create.js.haml
View file @
67b9fa51
-
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
...
...
spec/requests/issues_spec.rb
View file @
67b9fa51
...
...
@@ -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