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
Tatuya Kamada
gitlab-ce
Commits
cf1349ad
Commit
cf1349ad
authored
Oct 22, 2015
by
kkm
Committed by
Rémy Coutable
Feb 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remember user's inline/tabular diff view preference in a cookie
parent
9afcacb3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
0 deletions
+12
-0
CHANGELOG
CHANGELOG
+1
-0
app/controllers/projects/application_controller.rb
app/controllers/projects/application_controller.rb
+7
-0
app/controllers/projects/commit_controller.rb
app/controllers/projects/commit_controller.rb
+2
-0
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-0
No files found.
CHANGELOG
View file @
cf1349ad
...
@@ -22,6 +22,7 @@ v 8.5.0 (unreleased)
...
@@ -22,6 +22,7 @@ v 8.5.0 (unreleased)
- Fix visibility level text in admin area (Zeger-Jan van de Weg)
- Fix visibility level text in admin area (Zeger-Jan van de Weg)
- Warn admin during OAuth of granting admin rights (Zeger-Jan van de Weg)
- Warn admin during OAuth of granting admin rights (Zeger-Jan van de Weg)
- Update the ExternalIssue regex pattern (Blake Hitchcock)
- Update the ExternalIssue regex pattern (Blake Hitchcock)
- Remember user's inline/tabular diff view preference in a cookie (Kirill Katsnelson)
- Optimized performance of finding issues to be closed by a merge request
- Optimized performance of finding issues to be closed by a merge request
- Revert "Add IP check against DNSBLs at account sign-up"
- Revert "Add IP check against DNSBLs at account sign-up"
- Fix API to keep request parameters in Link header (Michael Potthoff)
- Fix API to keep request parameters in Link header (Michael Potthoff)
...
...
app/controllers/projects/application_controller.rb
View file @
cf1349ad
...
@@ -26,6 +26,13 @@ class Projects::ApplicationController < ApplicationController
...
@@ -26,6 +26,13 @@ class Projects::ApplicationController < ApplicationController
end
end
end
end
protected
def
apply_diff_view_cookie!
view
=
params
[
:view
]
||
cookies
[
:diff_view
]
cookies
.
permanent
[
:diff_view
]
=
params
[
:view
]
=
view
if
view
end
private
private
def
builds_enabled
def
builds_enabled
...
...
app/controllers/projects/commit_controller.rb
View file @
cf1349ad
...
@@ -13,6 +13,8 @@ class Projects::CommitController < Projects::ApplicationController
...
@@ -13,6 +13,8 @@ class Projects::CommitController < Projects::ApplicationController
def
show
def
show
return
git_not_found!
unless
@commit
return
git_not_found!
unless
@commit
apply_diff_view_cookie!
@line_notes
=
commit
.
notes
.
inline
@line_notes
=
commit
.
notes
.
inline
@note
=
@project
.
build_commit_note
(
commit
)
@note
=
@project
.
build_commit_note
(
commit
)
@notes
=
commit
.
notes
.
not_inline
.
fresh
@notes
=
commit
.
notes
.
not_inline
.
fresh
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
cf1349ad
...
@@ -57,6 +57,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -57,6 +57,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
end
def
diffs
def
diffs
apply_diff_view_cookie!
@commit
=
@merge_request
.
last_commit
@commit
=
@merge_request
.
last_commit
@base_commit
=
@merge_request
.
diff_base_commit
@base_commit
=
@merge_request
.
diff_base_commit
...
...
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