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
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)
- 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)
- 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
- Revert "Add IP check against DNSBLs at account sign-up"
- 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
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
def
builds_enabled
...
...
app/controllers/projects/commit_controller.rb
View file @
cf1349ad
...
...
@@ -13,6 +13,8 @@ class Projects::CommitController < Projects::ApplicationController
def
show
return
git_not_found!
unless
@commit
apply_diff_view_cookie!
@line_notes
=
commit
.
notes
.
inline
@note
=
@project
.
build_commit_note
(
commit
)
@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
end
def
diffs
apply_diff_view_cookie!
@commit
=
@merge_request
.
last_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