[Git][noosfero/noosfero][stable-1.7] Merge branch 'orders_page' into 'master'
Rodrigo Souto
gitlab at mg.gitlab.com
Mon Mar 6 15:08:27 BRT 2017
Rodrigo Souto pushed to branch stable-1.7 at Noosfero / noosfero
Commits:
72e86d60 by Rodrigo Souto at 2017-03-06T18:08:23+00:00
Merge branch 'orders_page' into 'master'
Orders Plugin: fixes orders page layout
Closes #239
See merge request !1111
- - - - -
8 changed files:
- plugins/orders/lib/orders_plugin/admin_helper.rb
- plugins/orders/locales/en-US.yml
- plugins/orders/public/stylesheets/_actions.scss
- plugins/orders/public/stylesheets/_base.scss
- plugins/orders/public/stylesheets/orders.scss
- plugins/orders/views/orders_plugin_admin/_actions.html.slim
- plugins/orders/views/orders_plugin_admin/_header.html.erb
- plugins/orders/views/orders_plugin_admin/_with_selection_actions.html.slim
Changes:
=====================================
plugins/orders/lib/orders_plugin/admin_helper.rb
=====================================
--- a/plugins/orders/lib/orders_plugin/admin_helper.rb
+++ b/plugins/orders/lib/orders_plugin/admin_helper.rb
@@ -15,7 +15,7 @@ module OrdersPlugin::AdminHelper
text += ' '
content_tag 'span', text, :class => classes
- end.join ' '
+ end.join(' ').html_safe
end
end
=====================================
plugins/orders/locales/en-US.yml
=====================================
--- a/plugins/orders/locales/en-US.yml
+++ b/plugins/orders/locales/en-US.yml
@@ -189,7 +189,7 @@ en-US: &en-US
placeholder: "Type to find and add products"
_index:
- header: "Purchase %{profile.code} - %{profile} / Sale - %{consumer}"
+ header: "Purchase %{profile_code} - %{profile} / Sale - %{consumer}"
empty_order: "Empty order"
supplier: "%{terms.supplier.singular}"
product: "product"
@@ -235,7 +235,7 @@ en-US: &en-US
supplier_heading: "Data %{terms.supplier.from_article.singular}"
admin:
reports:
- generate_spreadsheets: "Generate spreadsheets"
+ generate: "Generate spreadsheets"
products_spreadsheet: "Products"
orders_spreadsheet: "Orders"
index:
=====================================
plugins/orders/public/stylesheets/_actions.scss
=====================================
--- a/plugins/orders/public/stylesheets/_actions.scss
+++ b/plugins/orders/public/stylesheets/_actions.scss
@@ -11,9 +11,6 @@ $actions-bg: #D7FFB9;
padding: $padding ($wireframe-padding + $padding);
}
- .labels, .buttons {
- }
-
.labels {
font-weight: bold;
@@ -21,5 +18,22 @@ $actions-bg: #D7FFB9;
height: $height;
}
}
+
+ .buttons {
+ padding-top: $padding;
+
+ .select, .with-selection {
+ display: inline-block;
+ width: $module06;
+
+ .select-actions a, .generate-report-actions a {
+ padding: 0 $padding;
+
+ &:first-child {
+ border-right: 1px solid #aaa;
+ }
+ }
+ }
+ }
}
=====================================
plugins/orders/public/stylesheets/_base.scss
=====================================
--- a/plugins/orders/public/stylesheets/_base.scss
+++ b/plugins/orders/public/stylesheets/_base.scss
@@ -11,7 +11,7 @@
/* layout base parameters */
$modules: 12;
$base: 8px;
-$wireframe: 1040px;
+$wireframe: 880px;
/* heights should only use multiples of this */
$height: $base;
=====================================
plugins/orders/public/stylesheets/orders.scss
=====================================
--- a/plugins/orders/public/stylesheets/orders.scss
+++ b/plugins/orders/public/stylesheets/orders.scss
@@ -45,6 +45,24 @@
width: $module02;
}
}
+
+ .table-content > .value-row {
+ width: $wireframe + 2*$base;
+ margin-left: 0;
+
+ .box-field {
+ text-overflow: ellipsis;
+ overflow: hidden;
+
+ &.code {
+ width: $module01 - ($sortable-table-negative-area + $base);
+ }
+
+ &.situation {
+ width: $module02 - ($sortable-table-negative-area + $base);
+ }
+ }
+ }
}
.order {
=====================================
plugins/orders/views/orders_plugin_admin/_actions.html.slim
=====================================
--- a/plugins/orders/views/orders_plugin_admin/_actions.html.slim
+++ b/plugins/orders/views/orders_plugin_admin/_actions.html.slim
@@ -2,21 +2,19 @@
#actions-box class=("#{"wireframe-size" if wireframe_size}")
.labels
- .select.col-lg-4.col-md-4.col-sm-4
- span.with-selection.col-lg-4.col-md-4.col-sm-4
+ .select
+ span.with-selection
= t('views.actions.with_selection')
.clean
.buttons
- .select.btn-group.col-lg-4.col-md-4.col-sm-4
- button.btn.btn-default.btn-xs.dropdown-toggle aria-expanded="false" data-toggle="dropdown" type="button"
- = t('views.actions.select')
- span.caret
- ul.dropdown-menu role="menu"
- li= link_to_function t('views.actions.all'), 'orders.admin.select.all()'
- li= link_to_function t('views.actions.none'), 'orders.admin.select.none()'
- .with-selection.col-lg-4.col-md-4.col-sm-4
+ .select
+ span.select-label= t('views.actions.select')+':'
+ span.select-actions
+ = link_to_function t('views.actions.all'), 'orders.admin.select.all()'
+ = link_to_function t('views.actions.none'), 'orders.admin.select.none()'
+ .with-selection
= render 'with_selection_actions', orders_method: orders_method
- .other.col-lg-4.col-md-4.col-sm-4
+ .other
.clean
=====================================
plugins/orders/views/orders_plugin_admin/_header.html.erb
=====================================
--- a/plugins/orders/views/orders_plugin_admin/_header.html.erb
+++ b/plugins/orders/views/orders_plugin_admin/_header.html.erb
@@ -1,8 +1,8 @@
<div class="order-header">
- <%= t('orders_plugin.views.item._index.header') % {
+ <%= (t('orders_plugin.views.item._index.header') % {
:profile_code => order.code,
:profile => content_tag('strong', order.profile_data[:name]),
:consumer => content_tag('strong', order.consumer_data[:name]),
- } %>
+ }).html_safe %>
</div>
=====================================
plugins/orders/views/orders_plugin_admin/_with_selection_actions.html.slim
=====================================
--- a/plugins/orders/views/orders_plugin_admin/_with_selection_actions.html.slim
+++ b/plugins/orders/views/orders_plugin_admin/_with_selection_actions.html.slim
@@ -1,8 +1,5 @@
-.btn-group
- button.btn.btn-default.btn-xs.dropdown-toggle aria-expanded="false" data-toggle="dropdown" type="button"
- = t('views.admin.reports.generate')
- span.caret
-
- ul.dropdown-menu role="menu"
- li= link_to_function t('views.admin.reports.orders_spreadsheet'), "orders.admin.select.report('#{url_for action: :report_orders, orders_method: orders_method}')"
- li= link_to_function t('views.admin.reports.products_spreadsheet'), "orders.admin.select.report('#{url_for action: :report_products, orders_method: orders_method}')"
+span.generate-report-label
+ = t('views.admin.reports.generate')+':'
+span.generate-report-actions
+ = link_to_function t('views.admin.reports.orders_spreadsheet'), "orders.admin.select.report('#{url_for action: :report_orders, orders_method: orders_method}')"
+ = link_to_function t('views.admin.reports.products_spreadsheet'), "orders.admin.select.report('#{url_for action: :report_products, orders_method: orders_method}')"
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/72e86d60b755a51542b003f570216cb6d22d9f90
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170306/a41a8c65/attachment-0001.html>
More information about the Noosfero-dev
mailing list