[Git][noosfero/noosfero][master] 2 commits: Fixes html_safe in delivery and shopping cart plugins

Leandro Nunes gitlab at mg.gitlab.com
Thu Feb 23 14:37:57 BRT 2017


Leandro Nunes pushed to branch master at Noosfero / noosfero


Commits:
e3b45f2d by Gabriel Silva at 2017-02-17T12:54:11+00:00
Fixes html_safe in delivery and shopping cart plugins

Signed-off-by: Gabriel Silva <gabriel93.silva at gmail.com>

- - - - -
f20fa186 by Leandro Nunes at 2017-02-23T17:37:50+00:00
Merge branch 'html_safe' into 'master'

Fixes html_safe in Delivery and ShoppingCart plugins

Closes #235

See merge request !1121
- - - - -


2 changed files:

- plugins/delivery/views/delivery_plugin/admin_method/_edit.html.slim
- plugins/shopping_cart/views/shopping_cart_plugin/_items.html.erb


Changes:

=====================================
plugins/delivery/views/delivery_plugin/admin_method/_edit.html.slim
=====================================
--- a/plugins/delivery/views/delivery_plugin/admin_method/_edit.html.slim
+++ b/plugins/delivery/views/delivery_plugin/admin_method/_edit.html.slim
@@ -7,12 +7,12 @@
   = labelled_field f, :delivery_type, t('delivery_plugin.models.method.delivery_type'),
     f.select(:delivery_type, DeliveryPlugin::Method::Types.map{ |t| [t("delivery_plugin.models.method.#{t}"), t] },
       onchange: 'delivery.method.changeType(this)', onkeyup: 'this.onchange()'),
-    help: t('delivery_plugin.models.method.delivery_type_help')
+    help: t('delivery_plugin.models.method.delivery_type_help').html_safe
 
   = labelled_field f, :name, t('delivery_plugin.models.method.name'), f.text_field(:name),
-    help: t('delivery_plugin.models.method.name_help')
+    help: t('delivery_plugin.models.method.name_help').html_safe
   = labelled_field f, :description, t('delivery_plugin.models.method.instructions'),
-    f.text_area(:description, rows: 5, class: current_editor('simple')), help: t('delivery_plugin.models.method.instructions_help')
+    f.text_area(:description, rows: 5, class: current_editor('simple')), help: t('delivery_plugin.models.method.instructions_help').html_safe
 
   fieldset
     legend= t'delivery_plugin.models.method.costs_legend'


=====================================
plugins/shopping_cart/views/shopping_cart_plugin/_items.html.erb
=====================================
--- a/plugins/shopping_cart/views/shopping_cart_plugin/_items.html.erb
+++ b/plugins/shopping_cart/views/shopping_cart_plugin/_items.html.erb
@@ -7,7 +7,7 @@
       <%= _('Item') %>
     </th>
     <th class='cart-table-quantity' <%= "align='center'" if by_mail %>>
-      <%= if by_mail then ' '+_('Qtty')+' ' else _('Qtty') end %>
+      <%= if by_mail then (' '+_('Qtty')+' ').html_safe else _('Qtty') end %>
     </th>
     <th class='cart-table-price' <%= "align='center'" if by_mail %>>
       <%= _('Unit price') + " (#{@environment.currency_unit})" %>



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/d09daaf47adebd5c31787690874dbb9effcbebd2...f20fa186346d2c36ab9218ff31d28c794607c271
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170223/c209edb7/attachment-0001.html>


More information about the Noosfero-dev mailing list