From 9d63bdd02a1b24fa9a1b354dc76df01e4d9786ff Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Sun, 8 May 2016 10:47:25 -0600 Subject: [PATCH] Updates to settings layout and formatting --- app/assets/stylesheets/admin.scss | 4 ++++ app/helpers/admin_helper.rb | 8 +++---- app/views/admin/settings.html.erb | 39 ++++++++++++++----------------- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 16c434eba..78baf1c09 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -358,6 +358,10 @@ ul.settings-menu { padding-bottom: 20px; padding-top: 10px; } + .settings-grid-block { + min-height: 70px; + margin-bottom: 10px; + } .settings-grid-row { margin-bottom: 20px; } diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index 086df247a..c68b7570b 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -70,9 +70,9 @@ def select_default_locale end def settings_item(icon, title, description) - content_tag(:div, class: 'col-md-5 col-sm-6') do - content_tag(:div, class: 'media settings-grid-block') do - concat content_tag(:div, content_tag(:span, '', class: "glyphicon glyphicon-#{icon} settings-icon"), class: 'pull-left') + content_tag(:div, class: 'col-md-6 col-sm-6 settings-grid-block') do + content_tag(:div, class: 'media') do + concat content_tag(:div, content_tag(:span, '', class: "#{icon} settings-icon"), class: 'pull-left') concat settings_blurb(title, description) end end @@ -92,7 +92,7 @@ def settings_title_link(title) def settings_menu_item(icon, title) content_tag(:li, class: 'settings-menu-item') do link_to('#', class: 'settings-link active-settings-link', "data-target" => title) do - concat content_tag(:span, '', class: "glyphicon glyphicon-#{icon} settings-menu-icon") + concat content_tag(:span, '', class: "#{icon} settings-menu-icon") concat content_tag(:span, t(title, default: title.capitalize), class: 'hidden-xs') end end diff --git a/app/views/admin/settings.html.erb b/app/views/admin/settings.html.erb index 6bb9561d4..09f0fb539 100644 --- a/app/views/admin/settings.html.erb +++ b/app/views/admin/settings.html.erb @@ -4,32 +4,30 @@ -
+
<%= content_tag :div, nil, class: 'col-md-2 hidden-xs hidden-sm' %> - <%= settings_item('cog', "general", "Manage general system settings like your Helpy name, what company to link back to and more.") %> - <%= settings_item('pencil', "design", "Control the logos and colors and other design aspects of your Helpy") %> -
-
- <%= content_tag :div, nil, class: 'col-md-2 hidden-xs hidden-sm' %> - <%= settings_item('globe', "i18n", "Select what languages your Helpy will speak be able to speak.") %> - <%= settings_item('modal-window', "widget", "Find out how to deploy the Helpy widget on your site.") %> -
-
- <%= content_tag :div, nil, class: 'col-md-2 hidden-xs hidden-sm' %> - <%= settings_item('envelope', "email", "Set up SMTP and Inbound email for your Helpy.") %> - <%= settings_item('cloud', "cloudinary", "Set up Cloudinary to enable your Helpy to accept image attachments.") %> +
+
+ <%= settings_item('glyphicon glyphicon-cog', "general", "Manage general system settings like your Helpy name, what company to link back to.") %> + <%= settings_item('glyphicon glyphicon-pencil', "design", "Control the logos and colors and other design aspects of your Helpy") %> + <%= settings_item('glyphicon glyphicon-globe', "i18n", "Select what languages your Helpy will speak be able to speak.") %> + <%= settings_item('glyphicon glyphicon-modal-window', "widget", "Find out how to deploy the Helpy widget on your site.") %> + <%= settings_item('glyphicon glyphicon-envelope', "email", "Set up SMTP and Inbound email for your Helpy.") %> + <%= settings_item('glyphicon glyphicon-cloud', "cloudinary", "Set up Cloudinary to enable your Helpy to accept image attachments.") %> +
+