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
128012db
Commit
128012db
authored
Feb 25, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More use of shortcut routes
parent
0a4dec24
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
10 deletions
+6
-10
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+3
-5
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-3
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+1
-1
app/views/projects/merge_requests/show/_diffs.html.haml
app/views/projects/merge_requests/show/_diffs.html.haml
+1
-1
No files found.
app/controllers/projects/issues_controller.rb
View file @
128012db
...
...
@@ -60,8 +60,7 @@ class Projects::IssuesController < Projects::ApplicationController
respond_to
do
|
format
|
format
.
html
do
if
@issue
.
valid?
redirect_to
namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
)
redirect_to
issue_path
(
@issue
)
else
render
:new
end
...
...
@@ -79,7 +78,7 @@ class Projects::IssuesController < Projects::ApplicationController
format
.
js
format
.
html
do
if
@issue
.
valid?
redirect_to
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@issue
]
redirect_to
issue_path
(
@issue
)
else
render
:edit
end
...
...
@@ -129,8 +128,7 @@ class Projects::IssuesController < Projects::ApplicationController
issue
=
@project
.
issues
.
find_by
(
id:
params
[
:id
])
if
issue
redirect_to
namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issue
)
redirect_to
issue_path
(
issue
)
return
else
raise
ActiveRecord
::
RecordNotFound
.
new
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
128012db
...
...
@@ -79,9 +79,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
if
@merge_request
.
valid?
redirect_to
(
namespace_project_merge_request_path
(
@merge_request
.
target_project
.
namespace
,
@merge_request
.
target_project
,
@merge_request
),
merge_request_path
(
@merge_request
)
notice:
'Merge request was successfully created.'
)
else
...
...
app/views/projects/merge_requests/_merge_request.html.haml
View file @
128012db
%li
{
class:
mr_css_classes
(
merge_request
)
}
.merge-request-title
%span
.str-truncated
=
link_to_gfm
merge_request
.
title
,
namespace_project_merge_request_path
(
merge_request
.
target_project
.
namespace
,
merge_request
.
target_project
,
merge_request
),
class:
"row_title"
=
link_to_gfm
merge_request
.
title
,
merge_request_path
(
merge_request
),
class:
"row_title"
.pull-right.light
-
if
merge_request
.
merged?
%span
...
...
app/views/projects/merge_requests/show/_diffs.html.haml
View file @
128012db
...
...
@@ -8,5 +8,5 @@
Changes view for this comparison is extremely large.
%p
You can
=
link_to
"download it"
,
namespace_project_merge_request_path
(
@merge_request
.
target_project
.
namespace
,
@merge_request
.
target_project
,
@merge_request
,
format: :diff
),
class:
"vlink"
=
link_to
"download it"
,
merge_request_path
(
@merge_request
,
format: :diff
),
class:
"vlink"
instead.
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