improved code style and layout option naming

This commit is contained in:
Peter Göbel
2015-10-05 18:09:05 +02:00
parent e2c5d08e7e
commit 291e1fa930
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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 -2
View File
@@ -2,8 +2,8 @@
module PreferencesHelper
def layout_choices
[
['Small', :small],
['Wide', :wide]
['Fixed', :fixed],
['Fluid', :fluid]
]
end
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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')
@@ -1,5 +1,5 @@
class AddLayoutOptionForUsers < ActiveRecord::Migration
def change
add_column :users, :layout, :integer, :default => 0
add_column :users, :layout, :integer, default: 0
end
end