Skip to content

Commit

Permalink
Merge branch 'master' into uk/1316-ui-grid-reports
Browse files Browse the repository at this point in the history
  • Loading branch information
jeronimo committed Mar 31, 2017
2 parents 444ee92 + 268bea2 commit a89a08f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/templates/partials/contact.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
%p.modal-header {{'contact' | t}}
%p{"ng-if" => "::enterprise.phone", "ng-bind" => "::enterprise.phone"}
%p.word-wrap{"ng-if" => "::enterprise.email_address"}
%p{"ng-if" => "::enterprise.email_address"}
%a{"ng-href" => "{{::enterprise.email_address | stripUrl}}", target: "_blank", mailto: true}
%span.email{"ng-bind" => "::enterprise.email_address | stripUrl"}
%p.word-wrap{"ng-if" => "enterprise.website"}
%p{"ng-if" => "enterprise.website"}
%a{"ng-href" => "http://{{::enterprise.website | stripUrl}}", target: "_blank", "ng-bind" => "::enterprise.website | stripUrl"}
2 changes: 1 addition & 1 deletion app/models/spree/ability_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def add_order_cycle_management_abilities(user)
def add_order_management_abilities(user)
# Enterprise User can only access orders that they are a distributor for
can [:index, :create], Spree::Order
can [:read, :update, :fire, :resend, :invoice, :print], Spree::Order do |order|
can [:read, :update, :fire, :resend, :invoice, :print, :print_ticket], Spree::Order do |order|
# We allow editing orders with a nil distributor as this state occurs
# during the order creation process from the admin backend
order.distributor.nil? || user.enterprises.include?(order.distributor) || order.order_cycle.andand.coordinated_by?(user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
%table.index
%thead
%tr{"data-hook" => "producer_properties_header"}
%th= t(:inherited_property)
%th= t(:value)
%th= t('admin.products.properties.inherited_property')
%th= t('admin.description')
%th.actions
%tbody#producer_properties{"data-hook" => ""}
- @product.supplier.producer_properties.each do |producer_property|
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ replace "tr[data-hook='product_properties_header']"
%tr{"data-hook" => "product_properties_header"}
%th= t('admin.products.properties.property_name')
%th= t('admin.description')
%th.actions
4 changes: 2 additions & 2 deletions app/views/admin/producer_properties/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
%table.index.sortable{"data-hook" => "", "data-sortable-link" => main_app.update_positions_admin_enterprise_producer_properties_url(@enterprise)}
%thead
%tr{"data-hook" => "producer_properties_header"}
%th{colspan: "2"}= t('.property')
%th= t('.value')
%th{colspan: "2"}= t('admin.products.properties.property_name')
%th= t('admin.description')
%th.actions
%tbody#producer_properties{"data-hook" => ""}
= f.fields_for :producer_properties do |pp_form|
Expand Down
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class Application < Rails::Application
config.assets.precompile += ['mail/all.css']
config.assets.precompile += ['search/all.css', 'search/*.js']
config.assets.precompile += ['shared/*']
config.assets.precompile += ['qz/*']

config.active_support.escape_html_entities_in_json = true
end
Expand Down
7 changes: 4 additions & 3 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ en:
columns: Columns
actions: Actions
viewing: "Viewing: %{current_view_name}"
description: Description

whats_this: What's this?

Expand Down Expand Up @@ -223,6 +224,9 @@ en:
inherits_properties?: Inherits Properties?
available_on: Available On
av_on: "Av. On"
properties:
property_name: Property Name
inherited_property: Inherited Property
variants:
to_order_tip: "Items made to order do not have a set stock level, such as loaves of bread made fresh to order."

Expand Down Expand Up @@ -503,9 +507,6 @@ en:
advanced_settings: Advanced Settings
update_and_close: Update and Close
producer_properties:
form:
property: Property
value: Value
index:
title: Producer Properties
shared:
Expand Down

0 comments on commit a89a08f

Please sign in to comment.