Merge branch 'hackweek/i18n' of https://github.com/elf-pavlik/openfoodnetwork into elf-pavlik-hackweek/i18n

This commit is contained in:
Nicolas Blanc
2016-01-31 09:16:33 +00:00
68 changed files with 684 additions and 332 deletions

View File

@@ -42,5 +42,8 @@
//= require textAngular.min.js
//= require textAngular-sanitize.min.js
//= require ../shared/bindonce.min.js
//= require darkswarm/i18n.js
//= require darkswarm/i18n.translate.js
//= require_tree .

View File

@@ -12,25 +12,25 @@ angular.module("ofn.admin").controller "AdminOrderMgmtCtrl", [
$scope.startDate = formatDate start
$scope.endDate = formatDate end
$scope.quickSearch = ""
$scope.bulkActions = [ { name: "Delete Selected", callback: $scope.deleteLineItems } ]
$scope.bulkActions = [ { name: t("bom_actions_delete"), callback: $scope.deleteLineItems } ]
$scope.selectedBulkAction = $scope.bulkActions[0]
$scope.selectedUnitsProduct = {};
$scope.selectedUnitsVariant = {};
$scope.sharedResource = false
$scope.columns = Columns.setColumns
order_no: { name: "Order No.", visible: false }
full_name: { name: "Name", visible: true }
email: { name: "Email", visible: false }
phone: { name: "Phone", visible: false }
order_date: { name: "Order Date", visible: true }
producer: { name: "Producer", visible: true }
order_cycle: { name: "Order Cycle", visible: false }
hub: { name: "Hub", visible: false }
variant: { name: "Variant", visible: true }
quantity: { name: "Quantity", visible: true }
max: { name: "Max", visible: true }
final_weight_volume: { name: "Weight/Volume", visible: false }
price: { name: "Price", visible: false }
order_no: { name: t("bom_no"), visible: false }
full_name: { name: t("name"), visible: true }
email: { name: t("email"), visible: false }
phone: { name: t("phone"), visible: false }
order_date: { name: t("bom_date"), visible: true }
producer: { name: t("producer"), visible: true }
order_cycle: { name: t("bom_cycle"), visible: false }
hub: { name: t("bom_hub"), visible: false }
variant: { name: t("bom_variant"), visible: true }
quantity: { name: t("bom_quantity"), visible: true }
max: { name: t("bom_max"), visible: true }
final_weight_volume: { name: t("bom_final_weigth_volume"), visible: false }
price: { name: t("bom_price"), visible: false }
$scope.initialise = ->
$scope.initialiseVariables()
authorise_api_reponse = ""

View File

@@ -4,32 +4,32 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
$scope.StatusMessage = StatusMessage
$scope.columns = Columns.setColumns
producer: {name: "Producer", visible: true}
sku: {name: "SKU", visible: false}
name: {name: "Name", visible: true}
unit: {name: "Unit", visible: true}
price: {name: "Price", visible: true}
on_hand: {name: "On Hand", visible: true}
on_demand: {name: "On Demand", visible: false}
category: {name: "Category", visible: false}
tax_category: {name: "Tax Category", visible: false}
inherits_properties: {name: "Inherits Properties?", visible: false}
available_on: {name: "Available On", visible: false}
producer: {name: t("products_producer"), visible: true}
sku: {name: t("products_sku"), visible: false}
name: {name: t("products_name"), visible: true}
unit: {name: t("products_unit"), visible: true}
price: {name: t("products_price"), visible: true}
on_hand: {name: t("products_on_hand"), visible: true}
on_demand: {name: t("products_on_demand"), visible: false}
category: {name: t("products_category"), visible: false}
tax_category: {name: t("products_tax_category"), visible: false}
inherits_properties: {name: t("products_inherits_properties"), visible: false}
available_on: {name: t("products_available_on"), visible: false}
$scope.variant_unit_options = VariantUnitManager.variantUnitOptions()
$scope.filterableColumns = [
{ name: "Producer", db_column: "producer_name" },
{ name: "Name", db_column: "name" }
{ name: t("label_producers"), db_column: "producer_name" },
{ name: t("name"), db_column: "name" }
]
$scope.filterTypes = [
{ name: "Equals", predicate: "eq" },
{ name: "Contains", predicate: "cont" }
{ name: t("equals"), predicate: "eq" },
{ name: t("contains"), predicate: "cont" }
]
$scope.optionTabs =
filters: { title: "Filter Products", visible: false }
filters: { title: t("filter_products"), visible: false }
$scope.producers = producers
@@ -105,7 +105,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
$scope.categoryFilter = "0"
$scope.editWarn = (product, variant) ->
if (DirtyProducts.count() > 0 and confirm("Unsaved changes will be lost. Continue anyway?")) or (DirtyProducts.count() == 0)
if (DirtyProducts.count() > 0 and confirm(t("unsaved_changes_confirmation"))) or (DirtyProducts.count() == 0)
window.location = "/admin/products/" + product.permalink_live + ((if variant then "/variants/" + variant.id else "")) + "/edit"
@@ -150,14 +150,14 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
if !$scope.variantSaved(variant)
$scope.removeVariant(product, variant)
else
if confirm("Are you sure?")
if confirm(t("are_you_sure"))
$http(
method: "DELETE"
url: "/api/products/" + product.permalink_live + "/variants/" + variant.id + "/soft_delete"
).success (data) ->
$scope.removeVariant(product, variant)
else
alert("The last variant cannot be deleted!")
alert(t("delete_product_variant"))
$scope.removeVariant = (product, variant) ->
product.variants.splice product.variants.indexOf(variant), 1
@@ -194,7 +194,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
if productsToSubmit.length > 0
$scope.updateProducts productsToSubmit # Don't submit an empty list
else
StatusMessage.display 'alert', 'No changes to save.'
StatusMessage.display 'alert', t("products_change")
$scope.updateProducts = (productsToSubmit) ->
@@ -212,10 +212,10 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
).error (data, status) ->
if status == 400 && data.errors? && data.errors.length > 0
errors = error + "\n" for error in data.errors
alert "Saving failed with the following error(s):\n" + errors
$scope.displayFailure "Save failed due to invalid data"
alert t("products_update_error") + errors
$scope.displayFailure t("products_update_error")
else
$scope.displayFailure "Server returned with error status: " + status
$scope.displayFailure t("products_update_error_data") + status
$scope.packProduct = (product) ->
@@ -253,21 +253,21 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
$scope.displayUpdating = ->
StatusMessage.display 'progress', 'Saving...'
StatusMessage.display 'progress', t("saving")
$scope.displaySuccess = ->
StatusMessage.display 'success', 'Changes saved.'
StatusMessage.display 'success',t("products_changes_saved")
$scope.displayFailure = (failMessage) ->
StatusMessage.display 'failure', "Saving failed. #{failMessage}"
StatusMessage.display 'failure', t("products_update_error_msg") + "#{failMessage}"
$scope.displayDirtyProducts = ->
if DirtyProducts.count() > 0
message = if DirtyProducts.count() == 1 then "one product" else DirtyProducts.count() + " products"
StatusMessage.display 'notice', "Changes to #{message} remain unsaved."
message = if DirtyProducts.count() == 1 then t("one_product") else DirtyProducts.count() + t("products")
StatusMessage.display 'notice', t("changes_to") + "#{message}" + t("remain_unsaved.")
else
StatusMessage.clear()

View File

@@ -7,7 +7,7 @@ angular.module("ofn.admin").controller "AdminEnterpriseRelationshipsCtrl", ($sco
$scope.EnterpriseRelationships.create($scope.parent_id, $scope.child_id, $scope.permissions)
$scope.delete = (enterprise_relationship) ->
if confirm("Are you sure?")
if confirm(t("are_you_sure"))
$scope.EnterpriseRelationships.delete enterprise_relationship
$scope.toggleKeyword = (string, key) ->

View File

@@ -7,5 +7,5 @@ angular.module("ofn.admin").controller "AdminEnterpriseRolesCtrl", ($scope, Ente
$scope.EnterpriseRoles.create($scope.user_id, $scope.enterprise_id)
$scope.delete = (enterprise_role) ->
if confirm("Are you sure?")
if confirm(t('are_you_sure'))
$scope.EnterpriseRoles.delete enterprise_role

View File

@@ -40,7 +40,7 @@ angular.module("ofn.admin").controller "AdminVariantOverridesCtrl", ($scope, $ti
$scope.update = ->
if DirtyVariantOverrides.count() == 0
StatusMessage.display 'alert', 'No changes to save.'
StatusMessage.display 'alert', 'No change to save '
else
StatusMessage.display 'progress', 'Saving...'
DirtyVariantOverrides.save()

View File

@@ -34,7 +34,7 @@ angular.module('enterprise_fees', [])
return function(scope, element, attrs) {
if(scope.enterprise_fee.id) {
var url = "/admin/enterprise_fees/" + scope.enterprise_fee.id
var html = '<a href="'+url+'" class="delete-resource icon_link with-tip icon-trash no-text" data-action="remove" data-confirm="Are you sure?" url="'+url+'"></a>';
var html = '<a href="'+url+'" class="delete-resource icon_link with-tip icon-trash no-text" data-action="remove" data-confirm="'+t("are_you_sure")+'" url="'+url+'"></a>';
//var html = '<a href="'+url+'" class="delete-resource" data-confirm="Are you sure?"><img alt="Delete" src="/assets/admin/icons/delete.png" /> Delete</a>';
element.append(html);
}

View File

@@ -5,11 +5,11 @@ angular.module("admin.enterprise_groups")
$scope.menu.setItems [
{ name: 'Primary Details', icon_class: "icon-user" }
{ name: 'Users', icon_class: "icon-user" }
{ name: 'About', icon_class: "icon-pencil" }
{ name: 'Images', icon_class: "icon-picture" }
{ name: 'Contact', icon_class: "icon-phone" }
{ name: 'Web', icon_class: "icon-globe" }
{ name: (t('users')), icon_class: "icon-user" }
{ name: (t('about')), icon_class: "icon-pencil" }
{ name: (t('images')), icon_class: "icon-picture" }
{ name: (t('contact')), icon_class: "icon-phone" }
{ name: (t('web')), icon_class: "icon-globe" }
]
$scope.select(0)

View File

@@ -6,7 +6,7 @@ angular.module("admin.enterprises")
$scope.navClear = NavigationCheck.clear
$scope.pristineEmail = $scope.Enterprise.email
$scope.menu = SideMenu
$scope.newManager = { id: '', email: 'Add a manager...' }
$scope.newManager = { id: '', email: (t('add_manager')) }
# Provide a callback for generating warning messages displayed before leaving the page. This is passed in
# from a directive "nav-check" in the page - if we pass it here it will be called in the test suite,
@@ -31,4 +31,6 @@ angular.module("admin.enterprises")
if (user for user in $scope.Enterprise.users when user.id == manager.id).length == 0
$scope.Enterprise.users.push manager
else
alert "#{manager.email} is already a manager!"
alert ("#{manager.email}" + " " + t("is_already_manager"))

View File

@@ -11,3 +11,4 @@ angular.module("admin.enterprises").controller 'enterprisesCtrl', ($scope, $q, E
package: { name: "Package", visible: true }
status: { name: "Status", visible: true }
manage: { name: "Manage", visible: true }

View File

@@ -5,19 +5,19 @@ angular.module("admin.enterprises")
$scope.select = SideMenu.select
$scope.menu.setItems [
{ name: 'Primary Details', icon_class: "icon-home" }
{ name: 'Users', icon_class: "icon-user" }
{ name: 'Address', icon_class: "icon-map-marker" }
{ name: 'Contact', icon_class: "icon-phone" }
{ name: 'Social', icon_class: "icon-twitter" }
{ name: 'About', icon_class: "icon-pencil" }
{ name: 'Business Details', icon_class: "icon-briefcase" }
{ name: 'Images', icon_class: "icon-picture" }
{ name: "Properties", icon_class: "icon-tags", show: "showProperties()" }
{ name: "Shipping Methods", icon_class: "icon-truck", show: "showShippingMethods()" }
{ name: "Payment Methods", icon_class: "icon-money", show: "showPaymentMethods()" }
{ name: "Enterprise Fees", icon_class: "icon-tasks", show: "showEnterpriseFees()" }
{ name: "Shop Preferences", icon_class: "icon-shopping-cart", show: "showShopPreferences()" }
{ name: (t('primary_details')), icon_class: "icon-home" }
{ name: (t('users')), icon_class: "icon-user" }
{ name: (t('address')), icon_class: "icon-map-marker" }
{ name: (t('contact')), icon_class: "icon-phone" }
{ name: (t('social')), icon_class: "icon-twitter" }
{ name: (t('about')), icon_class: "icon-pencil" }
{ name: (t('business_details')), icon_class: "icon-briefcase" }
{ name: (t('images')), icon_class: "icon-picture" }
{ name: (t("properties")), icon_class: "icon-tags", show: "showProperties()" }
{ name: (t("shipping_methods")), icon_class: "icon-truck", show: "showShippingMethods()" }
{ name: (t("payment_methods")), icon_class: "icon-money", show: "showPaymentMethods()" }
{ name: (t("enterprise_fees")), icon_class: "icon-tasks", show: "showEnterpriseFees()" }
{ name: (t("shop_preferences")), icon_class: "icon-shopping-cart", show: "showShopPreferences()" }
]
$scope.select(0)

View File

@@ -0,0 +1,8 @@
angular.module('ofn.admin').filter "translate", ->
(key, options) ->
t(key, options)
angular.module('ofn.admin').filter "t", ->
(key, options) ->
t(key, options)

View File

@@ -6,27 +6,27 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.confirmDelete = true
$scope.startDate = formatDate daysFromToday -7
$scope.endDate = formatDate daysFromToday 1
$scope.bulkActions = [ { name: "Delete Selected", callback: 'deleteLineItems' } ]
$scope.bulkActions = [ { name: t("bom_actions_delete"), callback: 'deleteLineItems' } ]
$scope.selectedUnitsProduct = {};
$scope.selectedUnitsVariant = {};
$scope.sharedResource = false
$scope.columns = Columns.setColumns
order_no: { name: "Order No.", visible: false }
full_name: { name: "Name", visible: true }
email: { name: "Email", visible: false }
phone: { name: "Phone", visible: false }
order_date: { name: "Order Date", visible: true }
producer: { name: "Producer", visible: true }
order_cycle: { name: "Order Cycle", visible: false }
hub: { name: "Hub", visible: false }
variant: { name: "Variant", visible: true }
quantity: { name: "Quantity", visible: true }
max: { name: "Max", visible: true }
final_weight_volume: { name: "Weight/Volume", visible: false }
price: { name: "Price", visible: false }
order_no: { name: t("bom_no"), visible: false }
full_name: { name: t("name"), visible: true }
email: { name: t("email"), visible: false }
phone: { name: t("phone"), visible: false }
order_date: { name: t("bom_date"), visible: true }
producer: { name: t("producer"), visible: true }
order_cycle: { name: t("bom_cycle"), visible: false }
hub: { name: t("bom_hub"), visible: false }
variant: { name: t("bom_variant"), visible: true }
quantity: { name: t("bom_quantity"), visible: true }
max: { name: t("bom_max"), visible: true }
final_weight_volume: { name: t("bom_final_weigth_volume"), visible: false }
price: { name: t("bom_price"), visible: false }
$scope.confirmRefresh = ->
LineItems.allSaved() || confirm("Unsaved changes exist and will be lost if you continue.")
LineItems.allSaved() || confirm(t("unsaved_changes_warning"))
$scope.resetSelectFilters = ->
$scope.distributorFilter = blankOption().id
@@ -69,12 +69,12 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.bulk_order_form.$setPristine()
$scope.saving = false
).catch ->
alert "Some errors must be resolved be before you can update orders.\nAny fields with red borders contain errors."
alert "#{t("unsaved_changes_warning")}"
else
alert "Some errors must be resolved be before you can update orders.\nAny fields with red borders contain errors."
alert "#{t("unsaved_changes_warning")}"
$scope.deleteLineItem = (lineItem) ->
if ($scope.confirmDelete && confirm("Are you sure?")) || !$scope.confirmDelete
if ($scope.confirmDelete && confirm(t("are_you_sure"))) || !$scope.confirmDelete
LineItems.delete lineItem, =>
$scope.lineItems.splice $scope.lineItems.indexOf(lineItem), 1

View File

@@ -5,7 +5,7 @@ class Customer < ActiveRecord::Base
belongs_to :user, :class_name => Spree.user_class
validates :code, uniqueness: { scope: :enterprise_id, allow_blank: true, allow_nil: true }
validates :email, presence: true, uniqueness: { scope: :enterprise_id, message: "is associated with an existing customer" }
validates :email, presence: true, uniqueness: { scope: :enterprise_id, message: I18n.t('validation_msg_is_associated_with_an_exising_customer') }
validates :enterprise_id, presence: true
scope :of, ->(enterprise) { where(enterprise_id: enterprise) }
@@ -18,3 +18,4 @@ class Customer < ActiveRecord::Base
self.user = user || Spree::User.find_by_email(email)
end
end

View File

@@ -4,7 +4,7 @@ class EnterpriseRelationship < ActiveRecord::Base
has_many :permissions, class_name: 'EnterpriseRelationshipPermission', dependent: :destroy
validates_presence_of :parent_id, :child_id
validates_uniqueness_of :child_id, scope: :parent_id, message: "^That relationship is already established."
validates_uniqueness_of :child_id, scope: :parent_id, message: I18n.t('validation_msg_relationship_already_established')
scope :with_enterprises,
joins('LEFT JOIN enterprises AS parent_enterprises ON parent_enterprises.id = enterprise_relationships.parent_id').

View File

@@ -26,8 +26,8 @@ Spree::Product.class_eval do
# validates_presence_of :variants, unless: :new_record?, message: "Product must have at least one variant"
validates_presence_of :supplier
validates :primary_taxon, presence: { message: "^Product Category can't be blank" }
validates :tax_category_id, presence: { message: "^Tax Category can't be blank" }, if: "Spree::Config.products_require_tax_category"
validates :primary_taxon, presence: { message: I18n.t("validation_msg_product_category_cant_be_blank") }
validates :tax_category_id, presence: { message: I18n.t("validation_msg_tax") }, if: "Spree::Config.products_require_tax_category"
validates_presence_of :variant_unit
validates_presence_of :variant_unit_scale,

View File

@@ -8,9 +8,10 @@
-# - month_options = (0...12).map { |i| Time.zone.now.beginning_of_month - i.months }.map{ |t| [t.strftime("%b %Y"), t.strftime("%b %Y %z")]}
%fieldset.no-border-bottom
%legend Settings
%legend
=t :admin_settings
= form_for @settings, as: :settings, url: main_app.admin_accounts_and_billing_settings_path, :method => :put do |f|
.row{ ng: { app: 'admin.accounts_and_billing_settings' } }
.row{ ng: { app: t(:admin_accounts_and_billing) } }
.twelve.columns.alpha.omega
.field
= f.label :accounts_distributor_id, t(:accounts_administration_distributor)
@@ -23,26 +24,32 @@
.row
.six.columns.alpha
%fieldset.no-border-bottom
%legend Update Invoices
%legend
=t :update_invoice
= f.check_box :auto_update_invoices
= f.label :auto_update_invoices, "Auto-update invoices nightly at 1:00am"
= f.label :auto_update_invoices,
t(:auto_finalise_invoices)
.six.columns.omega
%fieldset.no-border-bottom
%legend Finalise Invoices
%legend
=t :finalise_invoice
= f.check_box :auto_finalize_invoices
= f.label :auto_finalize_invoices, "Auto-finalise invoices monthly on the 2nd at 1:30am"
= f.label :auto_finalize_invoices,
t(:auto_update_invoices)
.row
.twelve.columns.alpha.omega.form-buttons{"data-hook" => "buttons"}
= button t(:update), 'icon-refresh', value: "update"
%fieldset.no-border-bottom
%legend Manually Run Tasks
%legend
=t :manually_run_task
.row
.six.columns.alpha.step.text-center
.form-buttons{"data-hook" => "buttons"}
=link_to_with_icon "icon-undo", "Update User Invoices",
=link_to_with_icon "icon-undo",
t(:update_user_invoices) ,
main_app.start_job_admin_accounts_and_billing_settings_path(job: { name: "update_account_invoices" }),
class: "button fullwidth"
@@ -51,22 +58,22 @@
- if @update_account_invoices_job
%p.text-center
- if @update_account_invoices_job.run_at < Time.zone.now
%strong In Progress
=t :in_progress
%br
Started at:
=t :started_at
- else
%strong Queued
%strong
=t :queued
%br
Scheduled for:
=t :Scheduled_for
= @update_account_invoices_job.run_at
- else
%p.explanation
Use this button to immediately update invoices for the month to date for each enterprise user in the system. This task can be set up to run automatically every night.
=t :update_user_invoice_explained
.six.columns.omega.step.text-center
.form-buttons{"data-hook" => "buttons"}
=link_to_with_icon "icon-ok-sign", "Finalise User Invoices",
=link_to_with_icon "icon-ok-sign", t(:finalise_user_invoices ),
main_app.start_job_admin_accounts_and_billing_settings_path(job: { name: "finalize_account_invoices" }),
class: "button fullwidth"
@@ -75,14 +82,17 @@
- if @finalize_account_invoices_job
%p.text-center
- if @finalize_account_invoices_job.run_at < Time.zone.now
%strong In Progress
%strong
=t :in_progress
%br
Started at:
=t :started_at
- else
%strong Queued
%strong
=t :queued
%br
Scheduled for:
=t :scheduled_for
= @finalize_account_invoices_job.run_at
- else
%p.explanation
Use this button to finalize all invoices in the system for the previous calendar month. This task can be set up to run automatically once a month.
=t :finalise_user_invoice_explained

View File

@@ -1,12 +1,14 @@
- content_for :page_title do
%h1.page-title Customers
%h1.page-title
=t :customers
= admin_inject_shops
%div{ ng: { app: 'admin.customers', controller: 'customersCtrl' } }
.row{ ng: { hide: "loaded() && filteredCustomers.length > 0" } }
.five.columns.alpha
%h3 Please select a Hub:
%h3
=t :please_select_hub
.four.columns
%select.select2.fullwidth#shop_id{ 'ng-model' => 'shop.id', name: 'shop_id', 'ng-options' => 'shop.id as shop.name for shop in shops' }
.seven.columns.omega &nbsp;
@@ -34,9 +36,11 @@
.row{ 'ng-if' => 'shop && !loaded()' }
.sixteen.columns.alpha#loading
%img.spinner{ src: "/assets/spinning-circles.svg" }
%h1 LOADING CUSTOMERS
%h1
=t :loading_customers
.row{ :class => "sixteen columns alpha", 'ng-show' => 'loaded() && filteredCustomers.length == 0'}
%h1#no_results No customers found.
%h1#no_results
=t :no_customers_found
.row{ ng: { show: "loaded() && filteredCustomers.length > 0" } }

View File

@@ -1,5 +1,5 @@
= content_for :page_title do
Enterprise Fees
=t :Enterprise_Fees
= ng_form_for @enterprise_fee_set, :url => main_app.bulk_update_admin_enterprise_fees_path, :html => {'ng-app' => 'enterprise_fees', 'ng-controller' => 'AdminEnterpriseFeesCtrl'} do |enterprise_fee_set_form|
= hidden_field_tag 'enterprise_id', @enterprise.id if @enterprise
@@ -10,12 +10,18 @@
%table.index#listing_enterprise_fees
%thead
%tr
%th Enterprise
%th Fee Type
%th Name
%th Tax Category
%th Calculator
%th Calculator values
%th
=t'Enterprise'
%th
=t'fee_type'
%th
=t'name'
%th
=t'tax_category'
%th
=t'calculator'
%th
=t'calculator_values'
%th.actions
%tbody
= enterprise_fee_set_form.ng_fields_for :collection do |f|
@@ -30,4 +36,4 @@
%td{'ng-bind-html-unsafe-compiled' => 'enterprise_fee.calculator_settings'}
%td.actions{'spree-delete-resource' => "1"}
= enterprise_fee_set_form.submit 'Update'
= enterprise_fee_set_form.submit t(:update)

View File

@@ -1,5 +1,6 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='About'" } }
%legend About
%legend
= t 'admin_entreprise_groups_about'
= f.field_container :long_description do
%text-angular{'id' => 'enterprise_group_long_description', 'name' => 'enterprise_group[long_description]', 'class' => 'text-angular',
'ta-toolbar' => "[['h1','h2','h3','h4','p'],['bold','italics','underline','clear'],['insertLink']]"}

View File

@@ -1,11 +1,12 @@
= f.fields_for :address do |af|
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Contact'" } }
%legend Contact
%legend
= t 'admin_entreprise_groups_contact'
.row
.alpha.three.columns
= af.label :phone
.omega.eight.columns
= af.text_field :phone, { placeholder: "eg. 98 7654 3210"}
= af.text_field :phone, { placeholder: t(:admin_entreprise_groups_contact_phone_placeholder)}
.row
.alpha.three.columns
= f.label :email
@@ -15,7 +16,7 @@
.three.columns.alpha
= af.label :address1
.eight.columns.omega
= af.text_field :address1, { placeholder: "eg. 123 High Street"}
= af.text_field :address1, { placeholder: t(:admin_entreprise_groups_contact_address1_placeholder)}
.row
.alpha.three.columns
= af.label :address2
@@ -23,18 +24,17 @@
= af.text_field :address2
.row
.three.columns.alpha
= af.label :city, 'Suburb'
= af.label :city, t(:admin_entreprise_groups_contact_city)
\/
= af.label :zipcode, 'Postcode'
= af.label :zipcode, t(:admin_entreprise_groups_contact_zipcode)
.four.columns
= af.text_field :city, { placeholder: "eg. Northcote"}
= af.text_field :city, { placeholder: t(:admin_entreprise_groups_contact_city_placeholder)}
.four.columns.omega
= af.text_field :zipcode, { placeholder: "eg. 3070"}
= af.text_field :zipcode, { placeholder: t(:admin_entreprise_groups_contact_zipcode_placeholder)}
.row
.three.columns.alpha
= af.label :state_id, 'State'
\/
= af.label :country_id, 'Country'
= af.label :state_id, t(:admin_entreprise_groups_contact_state_id)
= af.label :country_id, t(:admin_entreprise_groups_contact_country_id)
.four.columns
= af.collection_select :state_id, af.object.country.states, :id, :name, {}, :class => "select2 fullwidth"
.four.columns.omega

View File

@@ -1,18 +1,20 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Images'" } }
%legend Images
%legend
= t 'admin_entreprise_groups_images'
.row
.alpha.three.columns
= f.label :logo, class: 'with-tip', 'data-powertip' => 'This is the logo'
.with-tip{'data-powertip' => 'This is the logo'}
.with-tip{'data-powertip' => t(:admin_entreprise_groups_data_powertip_logo)}
%a What's this?
.omega.eight.columns
= image_tag @object.logo.url if @object.logo.present?
= f.file_field :logo
.row
.alpha.three.columns
= f.label :promo_image, class: 'with-tip', 'data-powertip' => 'This image is displayed at the top of the Group profile'
.with-tip{'data-powertip' => 'This image is displayed at the top of the Group profile'}
%a What's this?
= f.label :promo_image, class: 'with-tip', 'data-powertip' => t(:admin_entreprise_groups_data_powertip_promo_image)
.with-tip{'data-powertip' => t(:admin_entreprise_groups_data_powertip_promo_image_tip)}
%a
= t 'admin_entreprise_groups_what_s_this'
.omega.eight.columns
= image_tag @object.promo_image.url if @object.promo_image.present?
= f.file_field :promo_image

View File

@@ -1,5 +1,6 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Primary Details'" } }
%legend Primary Details
%legend
= t "admin_entreprise_groups_primary_details"
= f.field_container :name do
= f.label :name
%br/
@@ -11,12 +12,12 @@
= f.text_field :description
= f.field_container :on_front_page do
= f.label :on_front_page, 'On front page?'
= f.label :on_front_page, t(:admin_entreprise_groups_on_front_page)
%br/
= f.check_box :on_front_page
= f.field_container :enterprise_ids do
= f.label :enterprise_ids, 'Enterprises'
= f.label :enterprise_ids, t(:admin_entreprise_groups_entreprise)
%br/
= f.collection_select :enterprise_ids, @enterprises, :id, :name, {}, {class: "select2 fullwidth", multiple: true}

View File

@@ -2,9 +2,10 @@
%legend Users
.row
.three.columns.alpha
=f.label :owner_id, 'Owner'
.with-tip{'data-powertip' => "The primary user responsible for this group."}
%a What's this?
=f.label :owner_id, t(:admin_entreprise_groups_owner)
.with-tip{'data-powertip' => t(:admin_entreprise_groups_data_powertip)}
%a
= t 'admin_entreprise_groups_what_s_this'
.eight.columns.omega
- if spree_current_user.admin?
= f.hidden_field :owner_id,

View File

@@ -1,10 +1,11 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Web'" } }
%legend Web Resources
%legend
= t 'admin_entreprise_groups_web'
.row
.alpha.three.columns
= f.label :website
.omega.eight.columns
= f.text_field :website, { placeholder: "eg. www.truffles.com"}
= f.text_field :website, { placeholder: t(:admin_entreprise_groups_web_website_placeholder)}
.row
.alpha.three.columns
= f.label :facebook, 'Facebook'
@@ -24,4 +25,4 @@
.alpha.three.columns
= f.label :twitter
.omega.eight.columns
= f.text_field :twitter, { placeholder: "eg. @the_prof" }
= f.text_field :twitter, { placeholder: t(:admin_entreprise_groups_web_twitter) }

View File

@@ -1,5 +1,5 @@
= content_for :page_title do
Enterprise Groups
= t 'admin_entreprise_groups'
= content_for :page_actions do
%li#new_enterprise_group_link
@@ -8,11 +8,15 @@
%table.index#listing_enterprise_groups
%thead
%tr
%th Name
%th
= t 'admin_entreprise_groups_name'
- if spree_current_user.admin?
%th Owner
%th On front page?
%th Enterprises
%th
= t 'admin_entreprise_groups_owner'
%th
= t 'admin_entreprise_groups_on_front_page'
%th
= t 'admin_entreprise_groups_entreprise'
%th.actions
%tbody

View File

@@ -1,6 +1,7 @@
%tr{"ng-repeat" => "enterprise_relationship in EnterpriseRelationships.enterprise_relationships | keywords:query"}
%td {{ enterprise_relationship.parent_name }}
%td permits
%td
= t 'admin_entreprise_relationships_permits'
%td {{ enterprise_relationship.child_name }}
%td
%ul

View File

@@ -3,17 +3,17 @@
%select{name: "enterprise_relationship_parent_id", "ng-model" => "parent_id", "ng-options" => "e.id as e.name for e in Enterprises.my_enterprises"}
%td
permits
= t 'admin_entreprise_relationships_permits'
%td
%select{name: "enterprise_relationship_child_id", "ng-model" => "child_id", "ng-options" => "e.id as e.name for e in Enterprises.all_enterprises"}
%td
%label
%input{type: "checkbox", ng: {checked: "allPermissionsChecked()", click: "checkAllPermissions()"}}
Everything
= t 'admin_entreprise_relationships_everything'
%div{"ng-repeat" => "permission in EnterpriseRelationships.all_permissions"}
%label
%input{type: "checkbox", "ng-model" => "permissions[permission]"}
to {{ EnterpriseRelationships.permission_presentation(permission) }}
%td.actions
%input{type: "button", value: "Create", "ng-click" => "create()"}
%input{type: "button", value: t(:admin_entreprise_relationships_button_create), "ng-click" => "create()"}
.errors {{ EnterpriseRelationships.create_errors }}

View File

@@ -1,4 +1,4 @@
%input.search{"ng-model" => "query", "placeholder" => "Search"}
%input.search{"ng-model" => "query", "placeholder" => t(:admin_entreprise_relationships_seach_placeholder)}
%label{ng: {repeat: "permission in EnterpriseRelationships.all_permissions"}}
%input{type: "checkbox", ng: {click: "$parent.query = toggleKeyword($parent.query, permission)"}}

View File

@@ -1,5 +1,5 @@
- content_for :page_title do
Enterprise Relationships
= t 'admin_entreprise_relationships'
= render 'admin/shared/enterprises_sub_menu'

View File

@@ -1,5 +1,5 @@
- content_for :page_title do
Roles
=t :roles
= render 'admin/shared/users_sub_menu'

View File

@@ -4,7 +4,8 @@
= button_to "Notify producers", main_app.notify_producers_admin_order_cycle_path, :id => 'admin_notify_producers', :confirm => 'Are you sure?'
%h1 Edit Order Cycle
%h1
=t'edit_order_cycle'
- ng_controller = order_cycles_simple_form ? 'AdminSimpleEditOrderCycleCtrl' : 'AdminEditOrderCycleCtrl'

View File

@@ -1,15 +1,15 @@
= content_for :page_title do
Order Cycles
= t :admin_order_cycles
= content_for :page_actions do
%li#new_order_cycle_link
= button_link_to "New Order Cycle", main_app.new_admin_order_cycle_path, :icon => 'icon-plus', :id => 'admin_new_order_cycle_link'
= button_link_to t(:new_order_cycle), main_app.new_admin_order_cycle_path, :icon => 'icon-plus', :id => 'admin_new_order_cycle_link'
- if @show_more
%li
= button_link_to "Show less", main_app.admin_order_cycles_path
= button_link_to t(:label_less), main_app.admin_order_cycles_path
- else
%li
= button_link_to "Show more", main_app.admin_order_cycles_path(params: { show_more: true })
= button_link_to t(:label_more), main_app.admin_order_cycles_path(params: { show_more: true })
= form_for @order_cycle_set, :url => main_app.bulk_update_admin_order_cycles_path do |f|
%table.index#listing_order_cycles
@@ -28,14 +28,21 @@
%thead
%tr
%th Name
%th Open
%th Close
%th
=t'name'
%th
=t'open'
%th
=t'close'
- unless order_cycles_simple_index
%th Supplier
%th Coordinator
%th Distributors
%th Products
%th
=t'supplier'
%th
=t'coordinator'
%th
=t'distributors'
%th
=t'products'
%th.actions
%th.actions
%th.actions
@@ -44,4 +51,4 @@
= f.fields_for :collection do |order_cycle_form|
= render 'admin/order_cycles/row', order_cycle_form: order_cycle_form
= f.submit 'Update'
= f.submit t(:update)

View File

@@ -1,4 +1,5 @@
%h1 New Order Cycle
%h1
=t'new_order_cycle'
- ng_controller = order_cycles_simple_form ? 'AdminSimpleCreateOrderCycleCtrl' : 'AdminCreateOrderCycleCtrl'
= admin_inject_order_cycle_instance

View File

@@ -1,4 +1,5 @@
%h4.text-center Select a coordinator for your order cycle
%h4.text-center
=t'select_a_coordinator_for_your_order_cycle'
%br
@@ -9,7 +10,7 @@
.ten.columns
= select_tag :coordinator_id, options_for_select(permitted_coordinating_enterprise_options_for(@order_cycle)), { 'required' => true, class: 'select2 fullwidth'}
.two.columns.alpha
= f.submit "Continue >"
= f.submit "#{t(:continue)} >"
.two.columns.omega
&nbsp;

View File

@@ -6,7 +6,7 @@
- content_for :page_actions do
%ul.tollbar.inline-menu
%li
= link_to_add_fields 'Add Producer Property', 'tbody#producer_properties', class: 'icon-plus button'
= link_to_add_fields t(:add_producer_property), 'tbody#producer_properties', class: 'icon-plus button'
= render 'spree/shared/error_messages', target: @enterprise

View File

@@ -1,4 +1,4 @@
.row
%input.four.columns.alpha{type: 'button', value: 'Save Changes', 'ng-click' => 'update()'}
%input.four.columns.alpha{type: 'button', value: t(:save_changes), 'ng-click' => 'update()'}
.twelve.columns.omega
= render 'spree/admin/shared/status_message'

View File

@@ -1,4 +1,4 @@
- content_for :page_title do
Override Product Details
=t :override_product_details
= render :partial => 'spree/admin/shared/product_sub_menu'

View File

@@ -1,7 +1,7 @@
.row
.two.columns.alpha
Hub
=t :hub
.four.columns
%select.select2.fullwidth#hub_id{ 'ng-model' => 'hub_id', name: 'hub_id', 'ng-options' => 'hub.id as hub.name for hub in hubs' }
.ten.columns.omega
%input{ type: 'button', value: 'Go', 'ng-click' => 'selectHub()' }
%input{ type: 'button', value: t(:go), 'ng-click' => 'selectHub()' }

View File

@@ -1,10 +1,14 @@
%table.index.bulk{ng: {show: 'hub'}}
%thead
%tr
%th Producer
%th Product
%th Price
%th On hand
%th
= t(:producer)
%th
= t(:product)
%th
= t(:price)
%th
= t(:on_hand)
%tbody{ng: {repeat: 'product in products | hubPermissions:hubPermissions:hub.id'}}
= render 'admin/variant_overrides/products_product'
= render 'admin/variant_overrides/products_variants'

View File

@@ -1,6 +1,8 @@
- content_for :page_title do
%h1.page-title Bulk Order Management
%a.with-tip{ 'data-powertip' => "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required." } What's this?
%h1.page-title
= t "bulk_order_management"
%a.with-tip{ 'data-powertip' => "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required." }
= t "admin_entreprise_groups_what_s_this"
= render :partial => 'spree/admin/shared/order_sub_menu'
@@ -8,16 +10,19 @@
%save-bar{ save: "submit()", saving: 'saving', dirty: "bulk_order_form.$dirty" }
.filters{ :class => "sixteen columns alpha" }
.date_filter{ :class => "two columns alpha" }
%label{ :for => 'start_date_filter' }Start Date
%label{ :for => 'start_date_filter' }
= t "start_date"
%br
%input{ :class => "two columns alpha", :type => "text", :id => 'start_date_filter', 'ng-model' => 'startDate', 'datepicker' => "startDate", 'confirm-change' => "confirmRefresh()", 'ng-change' => 'refreshData()' }
.date_filter{ :class => "two columns" }
%label{ :for => 'end_date_filter' }End Date
%label{ :for => 'end_date_filter' }
= t "end_date"
%br
%input{ :class => "two columns alpha", :type => "text", :id => 'end_date_filter', 'ng-model' => 'endDate', 'datepicker' => "endDate", 'confirm-change' => "confirmRefresh()", 'ng-change' => 'refreshData()' }
.one.column &nbsp;
.filter_select{ :class => "three columns" }
%label{ :for => 'supplier_filter' }Producer
%label{ :for => 'supplier_filter' }
= t "producer"
%br
%select{ :class => "three columns alpha", :id => 'supplier_filter', 'select2-min-search' => 5, 'ng-model' => 'supplierFilter', 'ng-options' => 's.id as s.name for s in suppliers' }
.filter_select{ :class => "three columns" }
@@ -25,7 +30,8 @@
%br
%select{ :class => "three columns alpha", :id => 'distributor_filter', 'select2-min-search' => 5, 'ng-model' => 'distributorFilter', 'ng-options' => 'd.id as d.name for d in distributors'}
.filter_select{ :class => "three columns" }
%label{ :for => 'order_cycle_filter' }Order Cycle
%label{ :for => 'order_cycle_filter' }
= t "order_cycle"
%br
%select{ :class => "three columns alpha", :id => 'order_cycle_filter', 'select2-min-search' => 5, 'ng-model' => 'orderCycleFilter', 'ng-options' => 'oc.id as oc.name for oc in orderCycles', 'confirm-change' => "confirmRefresh()", 'ng-change' => 'refreshData()'}
.filter_clear{ :class => "two columns omega" }
@@ -48,28 +54,33 @@
.row
.one.column.alpha &nbsp;
.two.columns
%span.two.columns Group Buy Unit Size
%span.two.columns
= t "group_buy_unit_size"
%span.two.columns {{ formattedValueWithUnitName( selectedUnitsProduct.group_buy_unit_size, selectedUnitsProduct, selectedUnitsVariant ) }}
.one.column &nbsp;
.two.columns
%span.two.columns Total Quantity Ordered
%span.two.columns
= t "total_qtt_ordered"
%span.two.columns {{ formattedValueWithUnitName( sumUnitValues(), selectedUnitsProduct, selectedUnitsVariant ) }}
.one.column &nbsp;
.two.columns
%span.two.columns Max Quantity Ordered
%span.two.columns
= t "max_qtt_ordered"
%span.two.columns {{ formattedValueWithUnitName( sumMaxUnitValues(), selectedUnitsProduct, selectedUnitsVariant ) }}
.one.column &nbsp;
.two.columns
%span.two.columns Current Fulfilled Units
%span.two.columns
= t "current_fulfilled_units"
%span.two.columns {{ fulfilled(sumUnitValues()) }}
.one.column &nbsp;
.two.columns
%span.two.columns Max Fulfilled Units
%span.two.columns
= t "max_fulfilled_units"
%span.two.columns {{ fulfilled(sumMaxUnitValues()) }}
.one.column.omega &nbsp;
%div{ :class => "eight columns alpha", 'ng-hide' => 'allFinalWeightVolumesPresent()' }
%span{ :class => "eight columns alpha", style: 'color:red' }
WARNING: Some variants do not have a unit value
= t "bulk_management_warning"
%hr{ :class => "sixteen columns alpha", :style => "margin-bottom: 15px" }
%div{ 'ng-hide' => 'RequestMonitor.loading || lineItems.length == 0' }
.controls{ :class => "sixteen columns alpha", :style => "margin-bottom: 15px;" }
@@ -77,7 +88,8 @@
%input{ :class => "fullwidth", :type => "text", :id => 'quick_search', 'ng-model' => 'quickSearch', :placeholder => 'Quick Search' }
%div{ :class => "three columns" }
%div.ofn_drop_down{ 'ng-controller' => "DropDownCtrl", :id => "bulk_actions_dropdown", 'ofn-drop-down' => true }
%span{ :class => 'icon-check' } &nbsp; Actions
%span{ :class => 'icon-check' }
= t "action"
%span{ 'ng-class' => "expanded && 'icon-caret-up' || !expanded && 'icon-caret-down'" }
%div.menu{ 'ng-show' => "expanded" }
%div.menu_item{ :class => "three columns alpha", 'ng-repeat' => "action in bulkActions", 'ng-click' => "$eval(action.callback)(filteredLineItems)", 'ofn-close-on-click' => true }
@@ -95,7 +107,8 @@
%img.spinner{ src: "/assets/spinning-circles.svg" }
%h1 LOADING ORDERS
%div{ :class => "sixteen columns alpha", 'ng-show' => '!RequestMonitor.loading && filteredLineItems.length == 0'}
%h1#no_results No orders found.
%h1#no_results
= t "no_orders_found"
%div{ 'ng-hide' => 'RequestMonitor.loading || filteredLineItems.length == 0' }
%form{ name: 'bulk_order_form' }
%table.index#listing_orders.bulk{ :class => "sixteen columns alpha" }
@@ -104,13 +117,17 @@
%th.bulk
%input{ :type => "checkbox", :name => 'toggle_bulk', 'ng-click' => 'toggleAllCheckboxes()', 'ng-checked' => "allBoxesChecked()" }
%th.order_no{ 'ng-show' => 'columns.order_no.visible' }
%a{ :href => '', 'ng-click' => "predicate = 'order.number'; reverse = !reverse" } Order No.
%a{ :href => '', 'ng-click' => "predicate = 'order.number'; reverse = !reverse" }
= t "order_no"
%th.full_name{ 'ng-show' => 'columns.full_name.visible' }
%a{ :href => '', 'ng-click' => "predicate = 'order.full_name'; reverse = !reverse" } Name
%a{ :href => '', 'ng-click' => "predicate = 'order.full_name'; reverse = !reverse" }
= t "name"
%th.email{ 'ng-show' => 'columns.email.visible' }
%a{ :href => '', 'ng-click' => "predicate = 'order.email'; reverse = !reverse" } Email
%a{ :href => '', 'ng-click' => "predicate = 'order.email'; reverse = !reverse" }
= t "email"
%th.phone{ 'ng-show' => 'columns.phone.visible' }
%a{ :href => '', 'ng-click' => "predicate = 'order.phone'; reverse = !reverse" } Phone
%a{ :href => '', 'ng-click' => "predicate = 'order.phone'; reverse = !reverse" }
= t "phone"
%th.date{ 'ng-show' => 'columns.order_date.visible' }
%a{ :href => '', 'ng-click' => "predicate = 'order.completed_at'; reverse = !reverse" } Order Date
%th.producer{ 'ng-show' => 'columns.producer.visible' }
@@ -121,13 +138,17 @@
%a{ :href => '', 'ng-click' => "predicate = 'order.distributor.name'; reverse = !reverse" } Hub
%th.variant{ 'ng-show' => 'columns.variant.visible' }
%a{ :href => '', 'ng-click' => "predicate = 'units_variant.full_name'; reverse = !reverse" } Product: Unit
%th.quantity{ 'ng-show' => 'columns.quantity.visible' } Quantity
%th.max{ 'ng-show' => 'columns.max.visible' } Max
%th.final_weight_volume{ 'ng-show' => 'columns.final_weight_volume.visible' } Weight/Volume
%th.price{ 'ng-show' => 'columns.price.visible' } Price
%th.quantity{ 'ng-show' => 'columns.quantity.visible' }
= t "products_quantity"
%th.max{ 'ng-show' => 'columns.max.visible' }
= t "shop_variant_quantity_max"
%th.final_weight_volume{ 'ng-show' => 'columns.final_weight_volume.visible' }
= t "weight_volume"
%th.price{ 'ng-show' => 'columns.price.visible' }
= t "products_price"
%th.actions
%th.actions
Ask?&nbsp;
= t "ask"
%input{ :type => 'checkbox', 'ng-model' => "confirmDelete" }
%tr.line_item{ 'ng-repeat' => "line_item in filteredLineItems = ( lineItems | filter:quickSearch | selectFilter:supplierFilter:distributorFilter:orderCycleFilter | variantFilter:selectedUnitsProduct:selectedUnitsVariant:sharedResource | orderBy:predicate:reverse )", 'ng-class-even' => "'even'", 'ng-class-odd' => "'odd'", :id => "li_{{line_item.id}}" }
%td.bulk

View File

@@ -1,3 +1,3 @@
%a.sixteen.columns.alpha.button.bottom.blue{ href: "#{main_app.admin_enterprises_path}" }
MANAGE MY ENTERPRISES
= t "spree_admin_overview_enterprises_footer"
%span.icon-arrow-right

View File

@@ -1,8 +1,10 @@
%div.header.sixteen.columns.alpha{ :class => "#{@enterprises.count > 0 ? "" : "red"}"}
%h3.thirteen.columns.alpha My Enterprises
%h3.thirteen.columns.alpha
= t "spree_admin_overview_enterprises_header"
- if @enterprises.any?
- if spree_current_user.can_own_more_enterprises?
%a.three.columns.omega.icon-plus.button.blue.white-bottom{ href: "#{main_app.new_admin_enterprise_path}" }
CREATE NEW
= t "spree_admin_enterprises_create_new"
- else
%a.with-tip{ title: "Enterprises are Producers and/or Hubs and are the basic unit of organisation within the Open Food Network." } What's this?
%a.with-tip{ title: "Enterprises are Producers and/or Hubs and are the basic unit of organisation within the Open Food Network." }
= t "admin_enterprise_groups_what_s_this"

View File

@@ -1,12 +1,15 @@
%div.hubs_tab{ ng: { show: "activeTab == 'hubs'"} }
%div.sixteen.columns.alpha.list-title
%span.five.columns.alpha Name
%span.five.columns.alpha
= t "spree_admin_enterprises_hubs_name"
- if can? :admin, Spree::PaymentMethod
%span.centered.three.columns Payment Methods
- if can? :admin, Spree::ShippingMethod
%span.centered.three.columns Shipping Methods
%span.centered.three.columns
= t "spree_admin_enterprises_shipping_methods"
- if can? :admin, EnterpriseFee
%span.centered.three.columns Enterprise Fees
%span.centered.three.columns
= t "spree_admin_enterprises_fees"
%div.sixteen.columns.alpha.list
- @enterprises.is_distributor.each do |enterprise|
%a.sixteen.columns.alpha.list-item{ class: "#{cycle('odd','even')}", href: "#{main_app.edit_admin_enterprise_path(enterprise)}" }

View File

@@ -1,7 +1,8 @@
%div.sixteen.columns.alpha.list-item.red
%span.text.fifteen.columns.alpha You don't have any enterprises yet.
%span.text.fifteen.columns.alpha
= t "spree_admin_enterprises_none_text"
%span.one.columns.omega
%span.icon-remove-sign
%a.sixteen.columns.alpha.button.bottom.red{ href: "#{main_app.new_admin_enterprise_path}" }
CREATE A NEW ENTERPRISE
= t "spree_admin_enterprises_none_create_a_new_enterprise"
%span.icon-arrow-right

View File

@@ -1,11 +1,15 @@
%div.producers_tab{ ng: { show: "activeTab == 'producers'"} }
%div.list-title.sixteen.columns.alpha
%span.five.columns.alpha Name
%span.five.columns.alpha
= t "spree_admin_enterprises_producers_name"
- if can? :admin, Spree::Product
%span.centered.three.columns Total Products
%span.centered.three.columns Active Products
%span.centered.three.columns
= t "spree_admin_enterprises_producers_total_products"
%span.centered.three.columns
= t "spree_admin_enterprises_producers_active_products"
- if can? :admin, OrderCycle
%span.centered.three.columns Products in OCs
%span.centered.three.columns
= t "spree_admin_enterprises_producers_order_cycles"
%div.sixteen.columns.alpha.list
- @enterprises.is_primary_producer.each do |enterprise|
%a.sixteen.columns.alpha.list-item{ class: "#{cycle('odd','even')}", href: "#{main_app.edit_admin_enterprise_path(enterprise)}" }

View File

@@ -1,3 +1,5 @@
%div.sixteen.columns.alpha.tabs
%div.dashboard_tab.eight.columns.alpha.blue{ ng: { class: "{selected: activeTab == 'hubs'}", click: "activeTab = 'hubs'" } } HUBS
%div.dashboard_tab.eight.columns.omega.blue{ ng: { class: "{selected: activeTab == 'producers'}", click: "activeTab = 'producers'" } } PRODUCERS
%div.dashboard_tab.eight.columns.alpha.blue{ ng: { class: "{selected: activeTab == 'hubs'}", click: "activeTab = 'hubs'" } }
= t "spree_admin_enterprises_tabs_hubs"
%div.dashboard_tab.eight.columns.omega.blue{ ng: { class: "{selected: activeTab == 'producers'}", click: "activeTab = 'producers'" } }
= t "spree_admin_enterprises_tabs_producers"

View File

@@ -1,11 +1,13 @@
%div.dashboard_item.seven.columns.omega#order_cycles
%div.header.seven.columns.alpha{ :class => "#{@order_cycle_count > 0 ? "" : "orange"}"}
%h3.four.columns.alpha Order Cycles
%h3.four.columns.alpha
= t "spree_admin_order_cycles"
- if @order_cycle_count > 0
%a.three.columns.omega.icon-plus.button.blue{ href: "#{main_app.new_admin_order_cycle_path}" }
CREATE NEW
= t "spree_admin_enterprises_create_new"
- else
%a.with-tip{ title: "Order cycles determine when and where your products are available to customers." } What's this?
%a.with-tip{ title: t(:spree_admin_order_cycles_tip) }
= t "admin_entreprise_groups_what_s_this"
%div.seven.columns.alpha.list
- if @order_cycle_count > 0
%div.seven.columns.alpha.list-item
@@ -14,13 +16,14 @@
%span.one.column.omega
%span.icon-ok-sign
%a.seven.columns.alpha.button.bottom.blue{ href: "#{main_app.admin_order_cycles_path}" }
MANAGE ORDER CYCLES
= t "spree_admin_enterprises_producers_manage_order_cycles"
%span.icon-arrow-right
- else
%div.seven.columns.alpha.list-item.orange
%span.six.columns.alpha You don't have any active order cycles.
%span.six.columns.alpha
= t "spree_admin_enterprises_producers_orders_cycle_text"
%span.one.column.omega
%span.icon-warning-sign
%a.seven.columns.alpha.button.bottom.orange{ href: "#{main_app.admin_order_cycles_path}" }
MANAGE ORDER CYCLES
= t "spree_admin_enterprises_producers_manage_order_cycles"
%span.icon-arrow-right

View File

@@ -1,11 +1,13 @@
%div.dashboard_item.seven.columns.alpha#products
%div.header.seven.columns.alpha{ :class => "#{@product_count > 0 ? "" : "red"}"}
%h3.four.columns.alpha Products
%h3.four.columns.alpha
= t "products"
- if @product_count > 0
%a.three.columns.omega.icon-plus.button.blue{ href: "#{new_admin_product_path}" }
CREATE NEW
= t "spree_admin_enterprises_create_new"
- else
%a.with-tip{ title: "The products that you sell through the Open Food Network." } What's this?
%a.with-tip{ title: "The products that you sell through the Open Food Network." }
= t "admin_entreprise_groups_what_s_this"
%div.seven.columns.alpha.list
- if @product_count > 0
%div.seven.columns.alpha.list-item
@@ -14,13 +16,14 @@
%span.one.column.omega
%span.icon-ok-sign
%a.seven.columns.alpha.button.bottom.blue{ href: "#{bulk_edit_admin_products_path}" }
MANAGE PRODUCTS
= t "spree_admin_enterprises_producers_manage_products"
%span.icon-arrow-right
- else
%div.seven.columns.alpha.list-item.red
%span.six.columns.alpha You don't have any active products.
%span.six.columns.alpha
= t "spree_admin_enterprises_any_active_products_text"
%span.one.column.omega
%span.icon-remove-sign
%a.seven.columns.alpha.button.bottom.red{ href: "#{new_admin_product_path}" }
CREATE A NEW PRODUCT
= t "spree_admin_enterprises_create_new_product"
%span.icon-arrow-right

View File

@@ -1,4 +1,4 @@
- @enterprises.unconfirmed.each do |enterprise|
.alert
%h6= "Action Required: Please confirm the email address for #{enterprise.name}."
%span.message= "We've sent a confirmation email to #{enterprise.email}, so please check there for further instructions. Thanks!"
%h6= "#{t :spree_admin_overview_action_required}: #{t :spree_admin_single_enterprise_alert_mail_confirmation} #{enterprise.name}."
%span.message= "#{t :spree_admin_single_enterprise_alert_mail_sent} #{enterprise.email}. #{t :spree_admin_overview_check_your_inbox}"

View File

@@ -2,7 +2,8 @@
= render 'admin/shared/user_guide_link'
%h1{ :style => 'margin-bottom: 30px'} Dashboard
%h1{ :style => 'margin-bottom: 30px'}
= t "dashbord"
- if @enterprises.unconfirmed.any?

View File

@@ -19,7 +19,7 @@
}
#package_button
%button#toggle_type{ onClick: 'toggleType()' }
Change Package
= t "change_package"
%i.icon-chevron-down
@@ -29,17 +29,17 @@
- if @enterprise.confirmed_at.nil?
.alert-box
Please confirm the email address for
= t "spree_admin_single_enterprise_alert_mail_confirmation"
%strong= "#{@enterprise.name}."
We've sent an email to
= t(:spree_admin_single_enterprise_alert_mail_sent)
%strong= "#{@enterprise.email}."
= link_to('Resend', main_app.enterprise_confirmation_path(enterprise: { id: @enterprise.id, email: @enterprise.email } ), method: :post)
= link_to(t('resend'), main_app.enterprise_confirmation_path(enterprise: { id: @enterprise.id, email: @enterprise.email } ), method: :post)
%a.close{ href: "#" } ×
- if !@enterprise.visible
.alert-box
%strong Hint:
To allow people to find you, turn on your visibility under
%strong= "Manage #{@enterprise.name}."
%strong
= t "spree_admin_single_enterprise_hint"
%strong= "#{t('manage')} #{@enterprise.name}."
%a.close{ href: "#" } ×
.row
@@ -47,14 +47,15 @@
.header
%h3
%span.icon-map-marker
Your profile live
%p on the Open Food Network map
= t "your_profil_live"
%p
= t "on_ofn_map"
.list
/-# Can we pass an anchor here to zoom to our enterprise?
%a.button.bottom{href: main_app.map_path, target: '_blank'}
See
= t "see"
= @enterprise.name
live
= t "live"
%span.icon-arrow-right
.two.columns
&nbsp;
@@ -63,11 +64,12 @@
.header
%h3
%span.icon-edit
Edit profile details
%p Change your profile description, images, etc.
= t "edit_profile_details"
%p
= t "edit_profile_details_etc"
.list
%a.button.bottom{href: main_app.edit_admin_enterprise_path(@enterprise)}
Manage
= t "manage"
= @enterprise.name
%span.icon-arrow-right
@@ -77,10 +79,10 @@
.header
%h3
%span.icon-th-large
Add &amp; manage products
= t 'add_and_manage_products'
.list
%a.button.bottom{href: bulk_edit_admin_products_path}
Manage products
= t 'manage_products'
%span.icon-arrow-right
.two.columns
@@ -91,8 +93,8 @@
.header
%h3
%span.icon-shopping-cart
Add &amp; manage order cycles
= t 'add_and_manage_order_cycles'
.list
%a.button.bottom{href: main_app.admin_order_cycles_path}
Manage order cycles
= t 'manage_order_cycles'
%span.icon-arrow-right

View File

@@ -4,11 +4,13 @@
%br
%input.search{ :class => "four columns alpha", 'ng-model' => 'query', :name => "quick_filter", :type => 'text', 'placeholder' => 'Quick Search' }
.filter_select{ :class => "four columns" }
%label{ :for => 'producer_filter' }Producer
%label{ :for => 'producer_filter' }
= t 'producer'
%br
%select{ :class => "four columns alpha", :id => 'producer_filter', 'ofn-select2-min-search' => 5, 'ng-model' => 'producerFilter', 'ng-options' => 'producer.id as producer.name for producer in filterProducers' }
.filter_select{ :class => "four columns" }
%label{ :for => 'category_filter' }Category
%label{ :for => 'category_filter' }
= t 'category'
%br
%select{ :class => "four columns alpha", :id => 'category_filter', 'ofn-select2-min-search' => 5, 'ng-model' => 'categoryFilter', 'ng-options' => 'taxon.id as taxon.name for taxon in filterTaxons'}
%div{ :class => "one column" } &nbsp;

View File

@@ -2,30 +2,30 @@
%br
.row
.four.columns.alpha
= label_tag nil, "Distributor: "
= label_tag nil, t(:reports_customers_distributor)
= select_tag(:distributor_id,
options_from_collection_for_select(@distributors, :id, :name, params[:distributor_id]),
{:include_blank => true, :class => "select2 fullwidth"})
.four.columns
= label_tag nil, "Supplier: "
= label_tag nil, t(:reports_customers_supplier)
= select_tag(:supplier_id,
options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id]),
{:include_blank => true, :class => "select2 fullwidth"})
.six.columns
= label_tag nil, "Order Cycle: "
= label_tag nil, t(:reports_customers_cycle)
= select_tag(:order_cycle_id,
options_for_select(report_order_cycle_options(@order_cycles), params[:order_cycle_id]),
{:include_blank => true, :class => "select2 fullwidth"})
= label_tag nil, "Report Type: "
= label_tag nil, t(:reports_customers_type)
= select_tag(:report_type, options_for_select(@report_types, @report_type))
%br
%br
= check_box_tag :csv
= label_tag :csv, "Download as csv"
= label_tag :csv, t(:report_customers_csv)
%br
= button t(:search)
@@ -33,7 +33,7 @@
%br
%table#listing_customers.index
%thead
%tr{'data-hook' => "orders_header"}
%tr{'data-hook' => "orders_header" }
- @report.header.each do |heading|
%th=heading
%tbody

View File

@@ -2,16 +2,16 @@
= render 'date_range_form', f: f
.row
.alpha.two.columns= label_tag nil, "Hubs: "
.alpha.two.columns= label_tag nil, t(:report_hubs)
.omega.fourteen.columns= f.collection_select(:distributor_id_in, @distributors, :id, :name, {}, {class: "select2 fullwidth", multiple: true})
.row
.alpha.two.columns= label_tag nil, "Order Cycles: "
.alpha.two.columns= label_tag nil, t(:reports_customers_cycle)
.omega.fourteen.columns
= f.select(:order_cycle_id_in, report_order_cycle_options(@order_cycles), {selected: params[:q][:order_cycle_id_in]}, {class: "select2 fullwidth", multiple: true})
.row
.alpha.two.columns= label_tag nil, "Payment Methods: "
.alpha.two.columns= label_tag nil, t(:report_payment)
.omega.fourteen.columns= select_tag(:payment_method_in, options_for_select(report_payment_method_options(@report.orders), params[:payment_method_in]), {class: "select2 fullwidth", multiple: true})
.row
@@ -24,7 +24,7 @@
.row
= check_box_tag :csv
= label_tag :csv, "Download as csv"
= label_tag :csv, t(:report_customers_csv)
.row
= button t(:search)
@@ -33,7 +33,7 @@
%br
%table#listing_ocm_orders.index
%thead
%tr{'data-hook' => "orders_header"}
%tr{'data-hook' => "orders_header" }
- @report.header.each do |heading|
%th=heading
%tbody

View File

@@ -2,7 +2,7 @@
= render 'date_range_form', f: f
= check_box_tag :csv
= label_tag :csv, "Download as csv"
= label_tag :csv, t(:report_customers_csv)
%br
= button t(:search)
@@ -10,7 +10,7 @@
%br
%table#listing_orders.index
%thead
%tr{'data-hook' => "orders_header"}
%tr{'data-hook' => t(:report_customers_header)}
- @report.header.each do |heading|
%th=heading
%tbody

View File

@@ -2,25 +2,25 @@
= render 'date_range_form', f: f
.row
.alpha.two.columns= label_tag nil, "Hubs: "
.alpha.two.columns= label_tag nil, t(:report_hubs)
.omega.fourteen.columns= f.collection_select(:distributor_id_in, @distributors, :id, :name, {}, {class: "select2 fullwidth", multiple: true})
.row
.alpha.two.columns= label_tag nil, "Producers: "
.alpha.two.columns= label_tag nil, t(:report_producers)
.omega.fourteen.columns= select_tag(:supplier_id_in, options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id_in]), {class: "select2 fullwidth", multiple: true})
.row
.alpha.two.columns= label_tag nil, "Order Cycles: "
.alpha.two.columns= label_tag nil, t(:reports_customers_cycle)
.omega.fourteen.columns
= f.select(:order_cycle_id_in, report_order_cycle_options(@order_cycles), {selected: params[:q][:order_cycle_id_in]}, {class: "select2 fullwidth", multiple: true})
.row
.alpha.two.columns= label_tag nil, "Report Type: "
.alpha.two.columns= label_tag nil, t(:report_type)
.omega.fourteen.columns= select_tag(:report_type, options_for_select(@report_types, @report_type))
.row
= check_box_tag :csv
= label_tag :csv, "Download as csv"
= label_tag :csv, t(:report_customers_csv)
.row
= button t(:search)

View File

@@ -2,25 +2,25 @@
= render 'date_range_form', f: f
.row
.alpha.two.columns= label_tag nil, "Hubs: "
.alpha.two.columns= label_tag nil, t(:report_hubs)
.omega.fourteen.columns= f.collection_select(:distributor_id_in, @distributors, :id, :name, {}, {class: "select2 fullwidth", multiple: true})
.row
.alpha.two.columns= label_tag nil, "Producers: "
.alpha.two.columns= label_tag nil, t(:report_producers)
.omega.fourteen.columns= select_tag(:supplier_id_in, options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id_in]), {class: "select2 fullwidth", multiple: true})
.row
.alpha.two.columns= label_tag nil, "Order Cycles: "
.alpha.two.columns= label_tag nil, t(:report_customers_cycle)
.omega.fourteen.columns
= f.select(:order_cycle_id_in, report_order_cycle_options(@order_cycles), {selected: params[:q][:order_cycle_id_in]}, {class: "select2 fullwidth", multiple: true})
.row
.alpha.two.columns= label_tag nil, "Report Type: "
.alpha.two.columns= label_tag nil, t(:report_type)
.omega.fourteen.columns= select_tag(:report_type, options_for_select(@report_types, @report_type))
.row
= check_box_tag :csv
= label_tag :csv, "Download as csv"
= label_tag :csv, t(:report_customers_csv)
.row
= button t(:search)
@@ -29,7 +29,7 @@
%br
%table#listing_orders.index
%thead
%tr{'data-hook' => "orders_header"}
%tr{'data-hook' => "orders_header" }
- @report.header.each do |heading|
%th=heading
%tbody

View File

@@ -3,15 +3,15 @@
.row
.four.columns.alpha
= label_tag nil, "Distributor: "
= f.collection_select(:distributor_id_eq, @distributors, :id, :name, {:include_blank => 'All'}, {:class => "select2 fullwidth"})
= label_tag nil, "Report Type: "
= label_tag nil, t(:report_distributor)
= f.collection_select(:distributor_id_eq, @distributors, :id, :name, {:include_blank => t(:report_all)}, {:class => "select2 fullwidth"})
= label_tag nil, t(:report_customers_type)
%br
= select_tag(:report_type, options_for_select([['Payments By Type',:payments_by_payment_type],['Itemised Payment Totals',:itemised_payment_totals],['Payment Totals',:payment_totals]], @report_type))
= select_tag(:report_type, options_for_select([[t(:report_payment_by),:payments_by_payment_type],[t(:report_itemised_payment),:itemised_payment_totals],[t(:report_payment_totals),:payment_totals]], @report_type))
%br
%br
= check_box_tag :csv
= label_tag :csv, "Download as csv"
= label_tag :csv, t(:report_customers_csv)
%br
%br
= button t(:search)
@@ -19,7 +19,7 @@
%br
%table#listing_orders.index
%thead
%tr{'data-hook' => "orders_header"}
%tr{'data-hook' => "orders_header" }
- @report.header.each do |heading|
%th=heading
%tbody

View File

@@ -2,40 +2,40 @@
%br
.row
.four.columns.alpha
= label_tag nil, "Distributor: "
= label_tag nil, t(:report_distributor)
= select_tag(:distributor_id,
options_from_collection_for_select(@distributors, :id, :name, params[:distributor_id]),
{:include_blank => true, :class => "select2 fullwidth"})
.four.columns
= label_tag nil, "Supplier: "
= label_tag nil, t(:reports_customers_supplier)
= select_tag(:supplier_id,
options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id]),
{:include_blank => true, :class => "select2 fullwidth"})
.six.columns
= label_tag nil, "Order Cycle: "
= label_tag nil, t(:report_order_cycle)
= select_tag(:order_cycle_id,
options_for_select(report_order_cycle_options(@order_cycles), params[:order_cycle_id]),
{:include_blank => true, :class => "select2 fullwidth"})
= label_tag nil, "Report Type: "
= label_tag nil, t(:report_type)
%br
= select_tag(:report_type, options_for_select(@report_types, params[:report_type]))
%br
%br
= check_box_tag :csv
= label_tag :csv, "Download as csv"
= label_tag :csv, t(:report_customers_csv)
%br
= button t(:search)
%br
%br
%table#listing_products.index
%thead
%tr{'data-hook' => "products_header"}
%tr{'data-hook' => "products_header" }
- @report.header.each do |heading|
%th=heading
%tbody

View File

@@ -3,10 +3,10 @@
.row
.four.columns.alpha
= label_tag nil, "Distributor:"
= label_tag nil, t(:report_distributor)
= f.collection_select(:distributor_id_eq, @distributors, :id, :name, {:include_blank => 'All'}, {:class => "select2 fullwidth"})
= check_box_tag :csv
= label_tag :csv, "Download as csv"
= label_tag :csv, t(:report_customers_csv)
%br
= button t(:search)
@@ -14,7 +14,7 @@
%br
%table#listing_orders.index
%thead
%tr{'data-hook' => "orders_header"}
%tr{'data-hook' => "orders_header" }
- @report.header.each do |heading|
%th= heading
%tbody

View File

@@ -1,10 +1,10 @@
= form_tag spree.users_and_enterprises_admin_reports_url do |f|
.row
.alpha.two.columns= label_tag nil, "Enterprises: "
.alpha.two.columns= label_tag nil, t(:report_entreprises)
.omega.fourteen.columns= select_tag(:enterprise_id_in, options_from_collection_for_select(Enterprise.all, :id, :name, params[:enterprise_id_in].andand.split(",")), {class: "select2 fullwidth", multiple: true})
.row
.alpha.two.columns= label_tag nil, "Users: "
.alpha.two.columns= label_tag nil, t(:report_users)
.omega.fourteen.columns= select_tag(:user_id_in, options_from_collection_for_select(Spree::User.all, :id, :email, params[:user_id_in].andand.split(",")), {class: "select2 fullwidth", multiple: true})
-# Might need this later if we add different kinds of reports
@@ -14,7 +14,7 @@
.row
= check_box_tag :csv
= label_tag :csv, "Download as csv"
= label_tag :csv, t(:report_customers_csv)
.row
= button t(:search)
%br

View File

@@ -2,31 +2,31 @@
= render 'date_range_form', f: f
.row
.four.columns.alpha= label_tag :report_type, "Report Type: "
.four.columns.alpha= label_tag :report_type, t(:report_type)
.four.columns.omega= select_tag :report_type, options_for_select(xero_report_types, params[:report_type]), {include_blank: false, class: "select2 fullwidth"}
.row
.four.columns.alpha= label_tag nil, "Hub: "
.four.columns.alpha= label_tag nil, t(:report_hubs)
.four.columns.omega= f.collection_select(:distributor_id_eq, @distributors, :id, :name, {:include_blank => 'All'}, {:class => "select2 fullwidth"})
.row
.four.columns.alpha= label_tag nil, "Order Cycle: "
.four.columns.alpha= label_tag nil, t(:report_order_cycle)
.four.columns.omega= f.select(:order_cycle_id_eq,
options_for_select(report_order_cycle_options(@order_cycles), params[:q][:order_cycle_id_eq]),
{:include_blank => true}, {:class => "select2 fullwidth"})
.row
.four.columns.alpha= label_tag :initial_invoice_number, "Initial invoice number:"
.four.columns.alpha= label_tag :initial_invoice_number, t(:initial_invoice_number)
.twelve.columns.omega= text_field_tag :initial_invoice_number, params[:initial_invoice_number]
.row
.four.columns.alpha= label_tag :invoice_date, "Invoice date:"
.four.columns.alpha= label_tag :invoice_date, t(:invoice_date)
.twelve.columns.omega= text_field_tag :invoice_date, params[:invoice_date], class: 'datetimepicker'
.row
.four.columns.alpha= label_tag :due_date, "Due date:"
.four.columns.alpha= label_tag :due_date, t(:due_date)
.twelve.columns.omega= text_field_tag :due_date, params[:due_date], class: 'datetimepicker'
.row
.four.columns.alpha= label_tag :account_code, "Account code:"
.four.columns.alpha= label_tag :account_code, t(:account_code)
.twelve.columns.omega= text_field_tag :account_code, params[:account_code]
.row
.four.columns.alpha= label_tag :csv, "Download as CSV:"
.four.columns.alpha= label_tag :csv, t(:report_customers_csv)
.twelve.columns.omega= check_box_tag :csv
.row
.four.columns.alpha= button t(:search)

View File

@@ -1,18 +1,24 @@
%tr{"data-hook" => "address1"}
%td Address:
%td
= t(:admin_shared_address_1):
%td= f.text_field :address1
%tr{"data-hook" => "address2"}
%td Address (cont.):
%tr{"data-hook" => "address2" }
%td
= t(:admin_shared_address_2):
%td= f.text_field :address2
%tr{"data-hook" => "city"}
%td City:
%tr{"data-hook" => "city" }
%td
= t(:admin_share_city):
%td= f.text_field :city
%tr{"data-hook" => "zipcode"}
%td Postcode:
%tr{"data-hook" => "zipcode" }
%td
= t(:admin_share_zipcode):
%td= f.text_field :zipcode
%tr{"data-hook" => "country"}
%td Country:
%tr{"data-hook" => "country" }
%td
= t(:admin_share_country):
%td= f.collection_select(:country_id, available_countries, :id, :name)
%tr{"data-hook" => "state"}
%td State:
%tr{"data-hook" => "state" }
%td
= t(:admin_share_state):
%td= f.collection_select(:state_id, f.object.country.states, :id, :name)

View File

@@ -1,8 +1,8 @@
- hubs_color = @hubs.count > 0 ? "blue" : "red"
- hubs_color = 'red' if (controller.action_name == 'create' || controller.action_name == 'update') && @object.errors.full_messages.include?("At least one hub must be selected")
- hubs_color = 'red' if (controller.action_name == 'create' || controller.action_name == 'update') && @object.errors.full_messages.include?(t(:hub_sidebar_at_least))
.sidebar_item.omega.four.columns#hubs
.four.columns.alpha.header{ class: "#{hubs_color}" }
%span.four.columns.alpha.centered Hubs
%span.four.columns.alpha.centered t(:hub_sidebar_hubs)
.four.columns.alpha.list{ class: "#{hubs_color}" }
- if @hubs.count > 0
= hidden_field klass, :distributor_ids, :multiple => true, value: nil
@@ -17,9 +17,10 @@
%span.icon-arrow-right
- else
.four.columns.alpha.list-item
%span.three.columns.alpha None Available
%span.three.columns.alpha
t(:hub_sidebar_none_available)
%span.one.column.omega
%span.icon-remove-sign
%a.four.columns.alpha.button{ href: "#{main_app.admin_enterprises_path}", class: "#{hubs_color}" }
MANAGE
t(:hub_sidebar_manage)
%span.icon-arrow-right

View File

@@ -1,7 +1,7 @@
- if enterprise
-if shop_trial_in_progress?(enterprise)
#trial_progress_bar
= "Your shopfront trial expires in #{remaining_trial_days(enterprise)}."
= t(:shop_trial_in_progress)
-elsif shop_trial_expired?(enterprise)
#trial_progress_bar
= "Good news! We have decided to extend shopfront trials until further notice (probably around March 2015)."
= t(:shop_trial_expired)

View File

@@ -17,7 +17,7 @@
</ul>
<ul class='variant-data'>
<li class='variant-sku'><strong>{{t 'sku'}}:</strong> {{variant.sku}}</li>
<li class='variant-on_hand'><strong>{{t 'on_hand' }}:</strong> {{variant.count_on_hand}}</li>
<li class='variant-on_hand'><strong>{{t 'on_hand'}}:</strong> {{variant.count_on_hand}}</li>
</ul>
{{#if variant.option_values}}

View File

@@ -30,8 +30,8 @@ en:
title: Open Food Network
welcome_to: 'Welcome to '
search_by_name: Search by name or suburb...
producers: Aussie Producers
producers_join: Australian producers are now welcome to join the Open Food Network.
producers: Aussie Producers #FIXME
producers_join: Australian producers are now welcome to join the Open Food Network. #FIXME
charges_sales_tax: Charges GST?
print_invoice: "Print Invoice"
send_invoice: "Send Invoice"
@@ -61,12 +61,12 @@ en:
invoice_column_tax: "GST"
invoice_column_price: "Price"
logo: "Logo (640x130)"
logo_mobile: "Mobile logo (75x26)"
logo_mobile_svg: "Mobile logo (SVG)"
logo: "Logo (640x130)" #FIXME
logo_mobile: "Mobile logo (75x26)" #FIXME
logo_mobile_svg: "Mobile logo (SVG)" #FIXME
home_hero: "Hero image"
home_show_stats: "Show statistics"
footer_logo: "Logo (220x76)"
footer_logo: "Logo (220x76)" #FIXME
footer_facebook_url: "Facebook URL"
footer_twitter_url: "Twitter URL"
footer_instagram_url: "Instagram URL"
@@ -109,7 +109,7 @@ en:
label_administration: "Administration"
label_admin: "Admin"
label_account: "Account"
label_more: "More"
label_more: "Show more"
label_less: "Show less"
items: "items"
@@ -234,6 +234,20 @@ en:
order_payment_paypal_successful: Your payment via PayPal has been processed successfully.
order_hub_info: Hub Info
bom_no: "Order no."
bom_date: "Order date"
bom_cycle: "Order cycle"
bom_quantity: "Quantity"
bom_max: "Max"
bom_hub: "Hub"
bom_variant: "Variant"
bom_final_weigth_volume: "Weight/Volume"
bom_price: "Price"
bom_actions_delete: "Delete Selected"
bom_order_error: "Some errors must be resolved before you can update orders.\nAny fields with red borders contain errors."
unsaved_changes_warning: "Unsaved changes exist and will be lost if you continue."
products: "Products"
products_in: "in %{oc}"
products_at: "at %{distributor}"
@@ -337,6 +351,11 @@ See the %{link} to find out more about %{sitename}'s features and to start using
products_cart_empty: "Cart empty"
products_edit_cart: "Edit your cart"
products_from: from
products_change: "No changes to save."
products_update_error: "Saving failed with the following error(s):"
products_update_error_msg: "Saving failed."
products_update_error_data: "Save failed due to invalid data:"
products_changes_saved: "Changes saved."
search_no_results_html: "Sorry, no results found for %{query}. Try another search?"
@@ -350,6 +369,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
groups_search: "Search name or keyword"
groups_no_groups: "No groups found"
groups_about: "About Us"
groups_producers: "Our producers"
groups_hubs: "Our hubs"
groups_contact_web: Contact
@@ -437,13 +457,24 @@ See the %{link} to find out more about %{sitename}'s features and to start using
producers_signup_cta_headline: Join now!
producers_signup_cta_action: Join now
producers_signup_detail: Here's the detail.
producer: Producer
products_item: Item
products_description: Description
products_variant: Variant
products_quantity: Quantity
products_availabel: Available?
products_price: Price
products_producer: "Producer"
products_price: "Price"
products_sku: "SKU"
products_name: "name"
products_unit: "unit"
products_on_hand: "on hand"
products_on_demand: "on demand"
products_category: "Category"
products_tax_category: "tax category"
products_available_on: "Available On"
products_inherits_properties: "Inherits Properties?"
register_title: Register
@@ -659,7 +690,7 @@ Please follow the instructions there to make your enterprise visible on the Open
shop_variant_quantity_max: "max"
contact: "Contact"
follow: "Follow"
shop_for_products_html: "Shop for <span class=\"turquoise\">%{enterprise}</span> products at:"
shop_for_products_html: "Shop for <span class=\"turquoise\">%{enterprise}</span> products at:" #FIXME
change_shop: "Change shop to:"
shop_at: "Shop now at:"
price_breakdown: "Full price breakdown"
@@ -671,3 +702,213 @@ Please follow the instructions there to make your enterprise visible on the Open
price_graph: "Price graph"
included_tax: "Included tax"
remove_tax: "Remove tax"
admin_entreprise_relationships: "Enterprise Relationships"
admin_entreprise_relationships_everything: "Everything"
admin_entreprise_relationships_permits: "permits"
admin_entreprise_relationships_seach_placeholder: "Search"
admin_entreprise_relationships_button_create: "Create"
admin_entreprise_groups: "Enterprise Groups"
admin_entreprise_groups_name: "Name"
admin_entreprise_groups_owner: "Owner"
admin_entreprise_groups_on_front_page: "On front page ?"
admin_entreprise_groups_entreprise: "Enterprises"
admin_entreprise_groups_primary_details: "Primary Details"
admin_entreprise_groups_data_powertip: "The primary user responsible for this group."
admin_entreprise_groups_data_powertip_logo: "This is the logo"
admin_entreprise_groups_data_powertip_promo_image: "This image is displayed at the top of the Group profile"
admin_entreprise_groups_data_powertip_promo_image_tip: "This image is displayed at the top of the Group profile"
admin_entreprise_groups_about: "About"
admin_entreprise_groups_images: "Images"
admin_entreprise_groups_contact: "Contact"
admin_entreprise_groups_contact_phone_placeholder: "eg. 98 7654 3210"
admin_entreprise_groups_contact_address1_placeholder: "eg. 123 High Street"
admin_entreprise_groups_contact_city: "Suburb"
admin_entreprise_groups_contact_city_placeholder: "eg. Northcote"
admin_entreprise_groups_contact_zipcode: "Postcode"
admin_entreprise_groups_contact_zipcode_placeholder: "eg. 3070"
admin_entreprise_groups_contact_state_id: "State"
admin_entreprise_groups_contact_country_id: "Country"
admin_entreprise_groups_web: "Web Resources"
admin_entreprise_groups_web_twitter: "eg. @the_prof"
admin_entreprise_groups_web_website_placeholder: "eg. www.truffles.com"
admin_order_cycles: "Admin Order Cycles"
open: "Open"
close: "Close"
supplier: "Supplier"
coordinator: "Coordinator"
distributor: "Distributor"
product: "Products"
enterprise_fees: "Enterprise Fees"
fee_type: "Fee Type"
tax_category: "Tax Category"
calculator: "Calculator"
calculator_values: "Calculator values"
new_order_cycles: "New Order Cycles"
select_a_coordinator_for_your_order_cycle: "select a coordinator for your order cycle"
edit_order_cycle: "Edit Order Cycle"
roles: "Roles"
update: "Update"
add_producer_property: "Add producer property"
admin_settings: "Settings"
update_invoice: "Update Invoices"
finalise_invoice: "Finalise Invoices"
finalise_user_invoices: "Finalise User Invoices"
finalise_user_invoice_explained: "Use this button to finalize all invoices in the system for the previous calendar month. This task can be set up to run automatically once a month."
manually_run_task: "Manually Run Task "
update_user_invoices: "Update User Invoices"
update_user_invoice_explained: "Use this button to immediately update invoices for the month to date for each enterprise user in the system. This task can be set up to run automatically every night."
auto_finalise_invoices: "Auto-finalise invoices monthly on the 2nd at 1:30am"
auto_update_invoices: "Auto-update invoices nightly at 1:00am"
in_progress: "In Progress"
started_at: "Started at"
queued: "Queued"
scheduled_for: "Scheduled for"
customers: "Customers"
please_select_hub: "Please select a Hub"
loading_customers: "Loading Customers"
no_customers_found: "No customers found"
go: "Go"
hub: "Hub"
accounts_administration_distributor: "accounts administration distributor"
override_product_details: "Override Product Details"
admin_accounts_and_billing: "admin.accounts_and_billing_settings" #FIXME
producer: "Producer"
product: "Product"
price: "Price"
on_hand: "On hand"
save_changes: "Save Changes"
update_action: "update()" #FIXME
admin_entreprise_groups_what_s_this: "What's this ?"
spree_admin_overview_enterprises_header: "My Enterprises"
spree_admin_overview_enterprises_footer: "MANAGE MY ENTERPRISES"
spree_admin_enterprises_hubs_name: "Name"
spree_admin_enterprises_create_new: "CREATE NEW"
spree_admin_enterprises_shipping_methods: "Shipping Methods"
spree_admin_enterprises_fees: "Enterprise Fees"
spree_admin_enterprises_none_create_a_new_enterprise: "CREATE A NEW ENTERPRISE"
spree_admin_enterprises_none_text: "You don't have any enterprises yet"
spree_admin_enterprises_producers_name: "Name"
spree_admin_enterprises_producers_total_products: "Total Products"
spree_admin_enterprises_producers_active_products: "Active Products"
spree_admin_enterprises_producers_order_cycles: "Products in OCs"
spree_admin_enterprises_producers_order_cycles_title: ""
spree_admin_enterprises_tabs_hubs: "HUBS"
spree_admin_enterprises_tabs_producers: "PRODUCERS"
spree_admin_enterprises_producers_manage_order_cycles: "MANAGE ORDER CYCLES"
spree_admin_enterprises_producers_manage_products: "MANAGE PRODUCTS"
spree_admin_enterprises_producers_orders_cycle_text: "You don't have any active order cycles."
spree_admin_enterprises_any_active_products_text: "You don't have any active products."
spree_admin_enterprises_create_new_product: "CREATE A NEW PRODUCT"
spree_admin_order_cycles: "Order Cycles"
spree_admin_order_cycles_tip: "Order cycles determine when and where your products are available to customers."
dashbord: "Dashboard"
spree_admin_single_enterprise_alert_mail_confirmation: "Please confirm the email address for"
spree_admin_single_enterprise_alert_mail_sent: "We've sent an email to"
spree_admin_overview_action_required: "Action Required"
spree_admin_overview_check_your_inbox: "Please check you inbox for furher instructions. Thanks!"
change_package: "Change Package"
spree_admin_single_enterprise_hint: "Hint: To allow people to find you, turn on your visibility under"
your_profil_live: "Your profile live"
on_ofn_map: "on the Open Food Network map"
see: "See"
live: "live"
manage: "Manage"
resend: "Resend"
add_and_manage_products: "Add &amp; manage products"
add_and_manage_order_cycles: "Add &amp; manage order cycles"
manage_order_cycles: "Manage order cycles"
manage_products: "Manage products"
edit_profile_details: "Edit profile details"
edit_profile_details_etc: "Change your profile description, images, etc."
bulk_order_management: "Bulk Order Management"
start_date: "Start Date"
end_date: "End Date"
order_cycle: "Order Cycle"
group_buy_unit_size: "Group Buy Unit Size"
total_qtt_ordered: "Total Quantity Ordered"
max_qtt_ordered: "Max Quantity Ordered"
current_fulfilled_units: "Current Fulfilled Units"
max_fulfilled_units: "Max Fulfilled Units"
bulk_management_warning: "WARNING: Some variants do not have a unit value"
action: " &nbsp; Actions"
ask: "Ask?&nbsp;"
no_orders_found: "No orders found."
order_no: "Order No."
weight_volume: "Weight/Volume"
remove_tax: "Remove tax"
tax_settings: "Tax Settings"
products_require_tax_category: "products require tax category"
admin_shared_address_1: "Address"
admin_shared_address_2: "Address (cont.)"
admin_share_city: "City"
admin_share_zipcode: "Postcode"
admin_share_country: "Country"
admin_share_state: "State"
hub_sidebar_hubs: "Hubs"
hub_sidebar_none_available: "None Available"
hub_sidebar_manage: "Manage"
hub_sidebar_at_least: "At least one hub must be selected"
hub_sidebar_blue: "blue"
hub_sidebar_red: "red"
shop_trial_in_progress: "Your shopfront trial expires in #{remaining_trial_days(enterprise)}." #FIXME
shop_trial_expired: "Good news! We have decided to extend shopfront trials until further notice (probably around March 2015)." #FIXME
reports_customers_distributor: "Distributor"
reports_customers_supplier: "Supplier"
reports_customers_cycle: "Order Cycle"
report_customers_type: "Report Type"
report_customers_csv: "Download as csv"
report_customers_header: "orders header"
report_producers: "Producers: "
report_type: "Report Type: "
report_hubs: "Hubs: "
report_payment: "Payment Methods: "
report_distributor: "Distributor: "
report_payment_by: 'Payments By Type'
report_itemised_payment: 'Itemised Payment Totals'
report_payment_totals: 'Payment Totals'
report_all: 'all'
report_order_cycle: "Order Cycle: "
report_product_header: "products_header"
report_order_header: "orders_header"
report_entreprises: "Enterprises: "
report_users: "Users: "
initial_invoice_number: "Initial invoice number:"
invoice_date: "Invoice date:"
due_date: "Due date:"
account_code: "Account code:"
equals: "Equals"
contains: "contains"
filter_products: "Filter Products"
delete_product_variant: "The last variant cannot be deleted!"
progress: "progress"
saving: "Saving.."
success: "success"
failure: "failure"
unsaved_changes_confirmation: "Unsaved changes will be lost. Continue anyway?"
one_product: "one product"
changes_to: "Changes to"
remain_unsaved: "remain unsaced"
add_manager: "Add a manager"
is_already_manager: "is already a manager!"
no_change_to_save: " No change to save"
add_manager: "Add a manager"
users: "Users"
about: "About"
images: "Images"
contact: "Contact"
web: "Web"
primary_details: "Primary Details"
adrdress: "Address"
contact: "Contact"
social: "Social"
business_details: "Business Details"
properties: "Properties"
shipping_methods: "Shipping Methods"
payment_methods: "Payment Methods"
enterprise_fees: "Enterprise Fees"
shop_preferences: "Shop Preferences"
validation_msg_relationship_already_established: "^That relationship is already established."
validation_msg_at_least_one_hub: "^At least one hub must be selected"
validation_msg_product_category_cant_be_blank: "^Product Category cant be blank"
validation_msg_tax_category_cant_be_blank: "^Tax Category can't be blank"
validation_msg_is_associated_with_an_exising_customer: "is associated with an existing customer"