Commit 291e1fa9 authored by Peter Göbel's avatar Peter Göbel

improved code style and layout option naming

parent e2c5d08e
......@@ -26,7 +26,7 @@ module PageLayoutHelper
def fluid_layout(enabled = false)
if @fluid_layout.nil?
@fluid_layout = (current_user && current_user.layout == "wide") || enabled
@fluid_layout = (current_user && current_user.layout == "fluid") || enabled
else
@fluid_layout
end
......
......@@ -2,8 +2,8 @@
module PreferencesHelper
def layout_choices
[
['Small', :small],
['Wide', :wide]
['Fixed', :fixed],
['Fluid', :fluid]
]
end
......
......@@ -173,7 +173,7 @@ class User < ActiveRecord::Base
after_destroy :post_destroy_hook
# User's Layout preference
enum layout: [:small, :wide]
enum layout: [:fixed, :fluid]
# User's Dashboard preference
# Note: When adding an option, it MUST go on the end of the array.
......
......@@ -38,7 +38,7 @@
.col-sm-10
= f.select :layout, layout_choices, {}, class: 'form-control'
.help-block
Choose between small (max. 1200px) and wide (100%) application layout
Choose between fixed (max. 1200px) and fluid (100%) application layout
.form-group
= f.label :dashboard, class: 'control-label' do
Default Dashboard
......
......@@ -3,7 +3,7 @@ $('body').removeClass('<%= Gitlab::Themes.body_classes %>')
$('body').addClass('<%= user_application_theme %>')
// Toggle container-fluid class
if ('<%= current_user.layout %>' === 'wide') {
if ('<%= current_user.layout %>' === 'fluid') {
$('.content-wrapper').find('.container-fluid').removeClass('container-limited')
} else {
$('.content-wrapper').find('.container-fluid').addClass('container-limited')
......
class AddLayoutOptionForUsers < ActiveRecord::Migration
def change
add_column :users, :layout, :integer, :default => 0
add_column :users, :layout, :integer, default: 0
end
end
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment