my admin interface translations

This commit is contained in:
julienFR88
2015-12-12 17:25:28 +01:00
committed by elf Pavlik
parent b58306aad8
commit 8fa293f561
7 changed files with 75 additions and 32 deletions

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_invoice ),
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,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,10 @@
%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

@@ -702,3 +702,32 @@ Please follow the instructions there to make your enterprise visible on the Open
roles: "Roles"
update: "Update"
add_producer_property: "Add producer property"
admin_settings: "Settings"
update_invoice: "Update Invoices"
finalise_invoice: "Finalise Invoices"
finalise_user_invoice: "Finalise User Invoice"
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"
producer: "Producer"
product: "Product"
price: "Price"
on_hand: "On hand"
save_changes: "Save changes"
update_action: "update()"