mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Translating variant overrides / inventory page
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
.ofn-drop-down#bulk-actions-dropdown
|
||||
%span.icon-check Actions
|
||||
%span.icon-check= " #{t('admin.actions')}".html_safe
|
||||
%span{ 'ng-class' => "expanded && 'icon-caret-up' || !expanded && 'icon-caret-down'" }
|
||||
.menu{ 'ng-show' => "expanded" }
|
||||
.menu_item{ 'ng-repeat' => "action in bulkActions", 'ng-click' => "$eval(action.callback)(filteredLineItems)", 'close-on-click' => true }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.ofn-drop-down.right#columns-dropdown
|
||||
%span{ :class => 'icon-reorder' } Columns
|
||||
%span{ :class => 'icon-reorder' }= " #{t('admin.columns')}".html_safe
|
||||
%span{ 'ng-class' => "expanded && 'icon-caret-up' || !expanded && 'icon-caret-down'" }
|
||||
%div.menu{ 'ng-show' => "expanded" }
|
||||
%div.menu_item{ ng: { repeat: "column in columns" }, toggle: { column: true } }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.ofn-drop-down#views-dropdown
|
||||
%span{ :class => 'icon-eye-open' } Viewing: {{ currentView().name }}
|
||||
%span{ :class => 'icon-eye-open' }= " #{t('admin.viewing', current_view_name: '{{ currentView().name }}')}".html_safe
|
||||
%span{ 'ng-class' => "expanded && 'icon-caret-up' || !expanded && 'icon-caret-down'" }
|
||||
%div.menu{ 'ng-show' => "expanded" }
|
||||
%div.menu_item{ ng: { repeat: "(viewKey, view) in views" }, toggle: { view: true }, 'close-on-click' => true }
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
.eight.columns.alpha
|
||||
= render 'admin/shared/bulk_actions_dropdown'
|
||||
= render 'admin/shared/views_dropdown'
|
||||
%span.text-big.with-tip.icon-question-sign{ ng: { show: 'views.inventory.visible' } , data: { powertip: 'This is your inventory of products. Products must be listed here before you can sell them in your shop. To add products to your inventory, select \'New Products\' from the Viewing dropdown.' } }
|
||||
%span.text-big.with-tip.icon-question-sign{ ng: { show: 'views.hidden.visible' } , data: { powertip: 'These products have been hidden from your inventory and will not be available in your shop. You can click \'Add\' to add a product to you inventory.' } }
|
||||
%span.text-big.with-tip.icon-question-sign{ ng: { show: 'views.new.visible' } , data: { powertip: 'These products are available to be added to your inventory. Click \'Add\' to add a product to your inventory, or \'Hide\' to hide it from view. You can always change your mind later!' } }
|
||||
%span.text-big.with-tip.icon-question-sign{ ng: { show: 'views.inventory.visible' } , data: { powertip: "#{t('admin.inventory.inventory_powertip')}" } }
|
||||
%span.text-big.with-tip.icon-question-sign{ ng: { show: 'views.hidden.visible' } , data: { powertip: "#{t('admin.inventory.hidden_powertip')}" } }
|
||||
%span.text-big.with-tip.icon-question-sign{ ng: { show: 'views.new.visible' } , data: { powertip: "#{t('admin.inventory.new_powertip')}" } }
|
||||
.four.columns
|
||||
.four.columns.omega{ ng: { show: 'views.new.visible' } }
|
||||
%button.fullwidth{ type: 'button', ng: { click: "selectView('inventory')" } }
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
.filters.sixteen.columns.alpha
|
||||
.filter.four.columns.alpha
|
||||
%label{ :for => 'query', ng: {class: '{disabled: !hub.id}'} }Quick Search
|
||||
%label{ :for => 'query', ng: {class: '{disabled: !hub.id}'} }=t('admin.quick_search')
|
||||
%br
|
||||
%input.fullwidth{ :type => "text", :id => 'query', ng: { model: 'query', disabled: '!hub.id'} }
|
||||
.two.columns
|
||||
.filter_select.four.columns
|
||||
%label{ :for => 'hub_id', ng: { bind: 'hub_id ? "Shop" : "Select a shop"' } }
|
||||
%label{ :for => 'hub_id', ng: { bind: "hub_id ? '#{t('admin.shop')}' : '#{t('admin.inventory.select_a_shop')}'" } }
|
||||
%br
|
||||
%select.select2.fullwidth#hub_id{ 'ng-model' => 'hub_id', name: 'hub_id', ng: { options: 'hub.id as hub.name for (id, hub) in hubs', change: 'selectHub()' } }
|
||||
.filter_select.four.columns
|
||||
%label{ :for => 'producer_filter', ng: {class: '{disabled: !hub.id}'} }Producer
|
||||
%label{ :for => 'producer_filter', ng: {class: '{disabled: !hub.id}'} }=t('admin.producer')
|
||||
%br
|
||||
%input.ofn-select2.fullwidth{ :id => 'producer_filter', type: 'number', data: 'producers', blank: "{id: 0, name: 'All'}", ng: { model: 'producerFilter', disabled: '!hub.id' } }
|
||||
-# .filter_select{ :class => "three columns" }
|
||||
@@ -23,4 +23,4 @@
|
||||
.filter_clear.two.columns.omega
|
||||
%label{ :for => 'clear_all_filters' }
|
||||
%br
|
||||
%input.red.fullwidth{ :type => 'button', :id => 'clear_all_filters', :value => "Clear All", ng: { click: "resetSelectFilters()", disabled: '!hub.id'} }
|
||||
%input.red.fullwidth{ :type => 'button', :id => 'clear_all_filters', :value => "#{t('admin.clear_all')}", ng: { click: "resetSelectFilters()", disabled: '!hub.id'} }
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
%col.add{ width: "15%" }
|
||||
%thead
|
||||
%tr
|
||||
%th.producer Producer
|
||||
%th.product Product
|
||||
%th.variant Variant
|
||||
%th.add Add
|
||||
%th.producer=t('admin.producer')
|
||||
%th.product=t('admin.product')
|
||||
%th.variant=t('(admin.variant')
|
||||
%th.add=t('admin.inventory.add')
|
||||
%tbody{ bindonce: true, ng: { repeat: 'product in filteredProducts | limitTo:productLimit' } }
|
||||
%tr{ id: "v_{{variant.id}}", ng: { repeat: 'variant in product.variants | inventoryVariants:hub.id:views' } }
|
||||
%td.producer{ bo: { bind: 'producersByID[product.producer_id].name'} }
|
||||
@@ -19,4 +19,4 @@
|
||||
.variant-override-unit{ bo: { bind: 'variant.unit_to_display'} }
|
||||
%td.add
|
||||
%button.fullwidth.icon-plus{ ng: { click: "setVisibility(hub.id,variant.id,true)" } }
|
||||
= t(:add)
|
||||
= t('admin.inventory.add')
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
%col.hide{ width: "15%" }
|
||||
%thead
|
||||
%tr
|
||||
%th.producer Producer
|
||||
%th.product Product
|
||||
%th.variant Variant
|
||||
%th.add Add
|
||||
%th.hide Hide
|
||||
%th.producer=t('admin.producer')
|
||||
%th.product=t('admin.product')
|
||||
%th.variant=t('(admin.variant')
|
||||
%th.add=t('admin.inventory.add')
|
||||
%th.hide=t('admin.inventory.hide')
|
||||
%tbody{ bindonce: true, ng: { repeat: 'product in filteredProducts | limitTo:productLimit' } }
|
||||
%tr{ id: "v_{{variant.id}}", ng: { repeat: 'variant in product.variants | inventoryVariants:hub.id:views' } }
|
||||
%td.producer{ bo: { bind: 'producersByID[product.producer_id].name'} }
|
||||
@@ -20,7 +20,7 @@
|
||||
.variant-override-unit{ bo: { bind: 'variant.unit_to_display'} }
|
||||
%td.add
|
||||
%button.fullwidth.icon-plus{ ng: { click: "setVisibility(hub.id,variant.id,true)" } }
|
||||
= t(:add)
|
||||
= t('admin.inventory.add')
|
||||
%td.hide
|
||||
%button.fullwidth.hide.icon-remove{ ng: { click: "setVisibility(hub.id,variant.id,false)" } }
|
||||
= t(:hide)
|
||||
= t('admin.inventory.hide')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%div{ ng: { show: '(newProductCount = (products | newInventoryProducts:hub_id).length) > 0 && !views.new.visible && !alertDismissed' } }
|
||||
%hr.divider.sixteen.columns.alpha.omega
|
||||
%alert-row{ message: "There are {{ newProductCount }} new products available to add to your inventory.",
|
||||
%alert-row{ message: "#{t('admin.inventory.new_products_alert_message', new_product_count: '{{ newProductCount }}')}",
|
||||
dismissed: "alertDismissed",
|
||||
button: { text: 'Review Now', action: "selectView('new')" } }
|
||||
button: { text: "#{t('admin.inventory.review_now')}", action: "selectView('new')" } }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
%div.text-big.no-results{ ng: { show: 'hub && products.length > 0 && filteredProducts.length == 0' } }
|
||||
%span{ ng: { show: 'views.inventory.visible && !filtersApplied()' } } You inventory is currently empty.
|
||||
%span{ ng: { show: 'views.inventory.visible && filtersApplied()' } } No matching products found in your inventory.
|
||||
%span{ ng: { show: 'views.hidden.visible && !filtersApplied()' } } No products have been hidden from this inventory.
|
||||
%span{ ng: { show: 'views.hidden.visible && filtersApplied()' } } No hidden products match your search criteria.
|
||||
%span{ ng: { show: 'views.new.visible && !filtersApplied()' } } No new products available to add this inventory.
|
||||
%span{ ng: { show: 'views.new.visible && filtersApplied()' } } No new products match your search criteria.
|
||||
%span{ ng: { show: 'views.inventory.visible && !filtersApplied()' } }=t('admin.inventory.currently_empty')
|
||||
%span{ ng: { show: 'views.inventory.visible && filtersApplied()' } }=t('admin.inventory.no_matching_products')
|
||||
%span{ ng: { show: 'views.hidden.visible && !filtersApplied()' } }=t('admin.inventory.no_hidden_products')
|
||||
%span{ ng: { show: 'views.hidden.visible && filtersApplied()' } }=t('admin.inventory.no_matching_hidden_products')
|
||||
%span{ ng: { show: 'views.new.visible && !filtersApplied()' } }=t('admin.inventory.no_new_products')
|
||||
%span{ ng: { show: 'views.new.visible && filtersApplied()' } }=t('admin.inventory.no_matching_new_products')
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
%col.visibility{ width: "10%", ng: { show: 'columns.visibility.visible' } }
|
||||
%thead
|
||||
%tr{ ng: { controller: "ColumnsCtrl" } }
|
||||
%th.producer{ ng: { show: 'columns.producer.visible' } } Producer
|
||||
%th.product{ ng: { show: 'columns.product.visible' } } Product
|
||||
%th.sku{ ng: { show: 'columns.sku.visible' } } SKU
|
||||
%th.price{ ng: { show: 'columns.price.visible' } } Price
|
||||
%th.on_hand{ ng: { show: 'columns.on_hand.visible' } } On hand
|
||||
%th.on_demand{ ng: { show: 'columns.on_demand.visible' } } On Demand?
|
||||
%th.reset{ colspan: 2, ng: { show: 'columns.reset.visible' } } Enable Stock Level Reset?
|
||||
%th.inheritance{ ng: { show: 'columns.inheritance.visible' } } Inherit?
|
||||
%th.visibility{ ng: { show: 'columns.visibility.visible' } } Hide
|
||||
%th.producer{ ng: { show: 'columns.producer.visible' } }=t('admin.producer')
|
||||
%th.product{ ng: { show: 'columns.product.visible' } }=t('admin.product')
|
||||
%th.sku{ ng: { show: 'columns.sku.visible' } }=t('admin.inventory.sku')
|
||||
%th.price{ ng: { show: 'columns.price.visible' } }=t('admin.inventory.price')
|
||||
%th.on_hand{ ng: { show: 'columns.on_hand.visible' } }=t('admin.inventory.on_hand')
|
||||
%th.on_demand{ ng: { show: 'columns.on_demand.visible' } }=t('admin.inventory.on_demand')
|
||||
%th.reset{ colspan: 2, ng: { show: 'columns.reset.visible' } }=t('admin.inventory.enable_reset')
|
||||
%th.inheritance{ ng: { show: 'columns.inheritance.visible' } }=t('admin.inventory.inherit')
|
||||
%th.visibility{ ng: { show: 'columns.visibility.visible' } }=t('admin.inventory.hide')
|
||||
%tbody{bindonce: true, ng: {repeat: 'product in filteredProducts = (products | hubPermissions:hubPermissions:hub.id | inventoryProducts:hub.id:views | attrFilter:{producer_id:producerFilter} | filter:query) | limitTo:productLimit' } }
|
||||
= render 'admin/variant_overrides/products_product'
|
||||
= render 'admin/variant_overrides/products_variants'
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
%input.field{ :type => 'checkbox', name: 'variant-overrides-{{ variant.id }}-inherit', ng: { model: 'inherit' }, 'track-inheritance' => true }
|
||||
%td.visibility{ ng: { show: 'columns.visibility.visible' } }
|
||||
%button.icon-remove.hide.fullwidth{ :type => 'button', ng: { click: "setVisibility(hub.id,variant.id,false)" } }
|
||||
= t(:hide)
|
||||
= t('admin.inventory.hide')
|
||||
|
||||
@@ -58,6 +58,42 @@ en:
|
||||
|
||||
sort_order_cycles_on_shopfront_by: "Sort Order Cycles On Shopfront By"
|
||||
|
||||
|
||||
admin:
|
||||
# General form elements
|
||||
quick_search: Quick Search
|
||||
clear_all: Clear All
|
||||
producer: Producer
|
||||
shop: Shop
|
||||
product: Product
|
||||
variant: Variant
|
||||
|
||||
columns: Columns
|
||||
actions: Actions
|
||||
viewing: "Viewing: %{current_view_name}"
|
||||
|
||||
inventory:
|
||||
sku: SKU
|
||||
price: Price
|
||||
on_hand: On Hand
|
||||
on_demand: On Demand?
|
||||
enable_reset: Enable Stock Level Reset?
|
||||
inherit: Inherit?
|
||||
add: Add
|
||||
hide: Hide
|
||||
select_a_shop: Select A Shop
|
||||
review_now: Review Now
|
||||
new_products_alert_message: There are %{new_product_count} new products available to add to your inventory.
|
||||
currently_empty: Your inventory is currently empty
|
||||
no_matching_products: No matching products found in your inventory
|
||||
no_hidden_products: No products have been hidden from this inventory
|
||||
no_matching_hidden_products: No hidden products match your search criteria
|
||||
no_new_products: No new products are available to add to this inventory
|
||||
no_matching_new_products: No new products match your search criteria
|
||||
inventory_powertip: This is your inventory of products. To add products to your inventory, select 'New Products' from the Viewing dropdown.
|
||||
hidden_powertip: These products have been hidden from your inventory and will not be available to add to your shop. You can click 'Add' to add a product to you inventory.
|
||||
new_powertip: These products are available to be added to your inventory. Click 'Add' to add a product to your inventory, or 'Hide' to hide it from view. You can always change your mind later!
|
||||
|
||||
# Printable Invoice Columns
|
||||
invoice_column_item: "Item"
|
||||
invoice_column_qty: "Qty"
|
||||
|
||||
Reference in New Issue
Block a user