[Git][noosfero/noosfero][master] 5 commits: layout-helper: fix body css classes

Rodrigo Souto gitlab at mg.gitlab.com
Fri Mar 24 11:29:21 BRT 2017


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
2260332c by Rodrigo Souto at 2017-03-24T09:53:17-03:00
layout-helper: fix body css classes

Conflicts:
	app/helpers/layout_helper.rb

- - - - -
3a9c6cd3 by Rodrigo Souto at 2017-03-24T09:56:15-03:00
person-form: display schooling

- - - - -
d41ca609 by Rodrigo Souto at 2017-03-24T09:56:34-03:00
html-safe: article source

- - - - -
0c8d271b by Rodrigo Souto at 2017-03-24T09:57:07-03:00
profile-image: allow theme to define image size

- - - - -
86b9c071 by Rodrigo Souto at 2017-03-24T09:58:43-03:00
chat: history min-width to avoid blank history

- - - - -


6 changed files:

- app/helpers/application_helper.rb
- app/helpers/layout_helper.rb
- app/helpers/profile_image_helper.rb
- app/views/profile_editor/_person_form.html.erb
- app/views/search/_compact_profile.html.erb
- public/stylesheets/chat/conversation.scss


Changes:

=====================================
app/helpers/application_helper.rb
=====================================
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -958,7 +958,7 @@ module ApplicationHelper
     elsif page.reference_article
       source_url = link_to(page.reference_article.profile.name, page.reference_article.url)
     end
-    content_tag(:div, _('Source: %s') % source_url.html_safe, :id => 'article-source') unless source_url.nil?
+    content_tag(:div, _('Source: %s').html_safe % source_url.html_safe, :id => 'article-source') unless source_url.nil?
   end
 
   def task_information(task, params = {})


=====================================
app/helpers/layout_helper.rb
=====================================
--- a/app/helpers/layout_helper.rb
+++ b/app/helpers/layout_helper.rb
@@ -1,13 +1,12 @@
 module LayoutHelper
 
   def body_classes
-    # Identify the current controller and action for the CSS:
     [
-      (logged_in? ? 'logged-in' : nil),
-      "controller-#{controller.controller_name}",
-      "action-#{controller.controller_name}-#{controller.action_name}",
-      "template-#{@layout_template || if profile.blank? then 'default' else profile.layout_template end}",
-      !profile.nil? && profile.is_on_homepage?(request.path, at page) ? 'profile-homepage' : nil,
+      (logged_in? ? " logged-in" : nil),
+      " controller-#{controller.controller_name}",
+      " action-#{controller.controller_name}-#{controller.action_name}",
+      " template-#{@layout_template || layout_template}",
+      (!profile.nil? && profile.is_on_homepage?(request.path, at page) ? " profile-homepage" : nil),
       profile.present? ? profile.kinds_style_classes : nil,
     ].compact.join(' ')
   end


=====================================
app/helpers/profile_image_helper.rb
=====================================
--- a/app/helpers/profile_image_helper.rb
+++ b/app/helpers/profile_image_helper.rb
@@ -37,7 +37,7 @@ module ProfileImageHelper
             '/images/icons-app/enterprise-'+ size.to_s() +'.png'
           end
         else
-          pixels = Image.attachment_options[:thumbnails][size].split('x').first
+          pixels = Image.attachment_options[:thumbnails][size.to_sym].split('x').first
           gravatar_profile_image_url(
             profile.email,
             :size => pixels,


=====================================
app/views/profile_editor/_person_form.html.erb
=====================================
--- a/app/views/profile_editor/_person_form.html.erb
+++ b/app/views/profile_editor/_person_form.html.erb
@@ -31,7 +31,7 @@
   <%= optional_field(@person, field[:name], labelled_form_field(field[:label], text_field(field[:object_name], field[:method], :rel => field[:label], :value => field[:value]))) %>
 <% end %>
 
-<% optional_field(@person, 'schooling') do %>
+<%= optional_field(@person, 'schooling') do %>
   <div class="formfieldline">
     <label class='formlabel' for='profile_data_schooling'><%= _('Schooling') %></label>
     <div class="formfield type-select">


=====================================
app/views/search/_compact_profile.html.erb
=====================================
--- a/app/views/search/_compact_profile.html.erb
+++ b/app/views/search/_compact_profile.html.erb
@@ -1,5 +1,5 @@
 <% filter_label = profile.send(@order + '_label') %>
 <% filter_label += show_date(profile.created_at) if @order == 'more_recent' %>
 <li class="search-profile-item">
-  <%= profile_image_link profile, :portrait, 'div', filter_label %>
+  <%= profile_image_link profile, theme_option(:profile_list_imgs_size) || :portrait, 'div', filter_label %>
 </li>


=====================================
public/stylesheets/chat/conversation.scss
=====================================
--- a/public/stylesheets/chat/conversation.scss
+++ b/public/stylesheets/chat/conversation.scss
@@ -106,6 +106,7 @@
   left: 0;
   top: 45px;
   bottom: 100px;
+  min-width: 284px;
 }
 
 .history.room {



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/1d56278dcdd0e01304f3d2747bc738cf679fb4d6...86b9c0718f5db68bda19737acac648eafc1e277e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170324/7feee75b/attachment-0001.html>


More information about the Noosfero-dev mailing list