From 02cbad26976de16c9f5e081c604252c859bba9bc Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 9 Mar 2016 18:49:35 +1100 Subject: [PATCH] Remove duplicate lines from merging --- app/models/customer.rb | 1 - .../accounts_and_billing_settings/edit.html.haml | 15 +++++++-------- app/views/admin/customers/index.html.haml | 6 +++--- app/views/admin/enterprise_fees/index.html.haml | 12 ++++++------ .../admin/enterprise_groups/_form_about.html.haml | 2 +- .../enterprise_groups/_form_address.html.haml | 2 +- .../enterprise_groups/_form_images.html.haml | 4 ++-- .../_form_primary_details.html.haml | 2 +- .../admin/enterprise_groups/_form_users.html.haml | 2 +- .../admin/enterprise_groups/_form_web.html.haml | 2 +- app/views/admin/enterprise_groups/index.html.haml | 6 +++--- .../_enterprise_relationship.html.haml | 2 +- .../admin/order_cycles/set_coordinator.html.haml | 2 +- .../admin/overview/_enterprises_header.html.haml | 5 ++--- 14 files changed, 30 insertions(+), 33 deletions(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 1ab2f3ae5c..c4c93cb8aa 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -18,4 +18,3 @@ class Customer < ActiveRecord::Base self.user = user || Spree::User.find_by_email(email) end end - diff --git a/app/views/admin/accounts_and_billing_settings/edit.html.haml b/app/views/admin/accounts_and_billing_settings/edit.html.haml index 7a74a59120..cd614b14f8 100644 --- a/app/views/admin/accounts_and_billing_settings/edit.html.haml +++ b/app/views/admin/accounts_and_billing_settings/edit.html.haml @@ -8,7 +8,7 @@ -# - 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 + %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: t(:admin_accounts_and_billing) } } @@ -24,7 +24,7 @@ .row .six.columns.alpha %fieldset.no-border-bottom - %legend + %legend =t :update_invoice = f.check_box :auto_update_invoices = f.label :auto_update_invoices, @@ -32,7 +32,7 @@ .six.columns.omega %fieldset.no-border-bottom - %legend + %legend =t :finalise_invoice = f.check_box :auto_finalize_invoices = f.label :auto_finalize_invoices, @@ -48,7 +48,7 @@ .row .six.columns.alpha.step.text-center .form-buttons{"data-hook" => "buttons"} - =link_to_with_icon "icon-undo", + =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" @@ -62,7 +62,7 @@ %br =t :started_at - else - %strong + %strong =t :queued %br =t :Scheduled_for @@ -82,12 +82,12 @@ - if @finalize_account_invoices_job %p.text-center - if @finalize_account_invoices_job.run_at < Time.zone.now - %strong + %strong =t :in_progress %br =t :started_at - else - %strong + %strong =t :queued %br =t :scheduled_for @@ -95,4 +95,3 @@ - else %p.explanation =t :finalise_user_invoice_explained - diff --git a/app/views/admin/customers/index.html.haml b/app/views/admin/customers/index.html.haml index ddeddd9025..cf3ef25bb3 100644 --- a/app/views/admin/customers/index.html.haml +++ b/app/views/admin/customers/index.html.haml @@ -1,5 +1,5 @@ - content_for :page_title do - %h1.page-title + %h1.page-title =t :customers = admin_inject_shops @@ -7,7 +7,7 @@ %div{ ng: { app: 'admin.customers', controller: 'customersCtrl' } } .row{ ng: { hide: "loaded() && filteredCustomers.length > 0" } } .five.columns.alpha - %h3 + %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' } @@ -27,7 +27,7 @@ %h1 =t :loading_customers .row{ :class => "sixteen columns alpha", 'ng-show' => 'loaded() && filteredCustomers.length == 0'} - %h1#no_results + %h1#no_results =t :no_customers_found diff --git a/app/views/admin/enterprise_fees/index.html.haml b/app/views/admin/enterprise_fees/index.html.haml index 42966bd6be..c9d1311d7a 100644 --- a/app/views/admin/enterprise_fees/index.html.haml +++ b/app/views/admin/enterprise_fees/index.html.haml @@ -10,17 +10,17 @@ %table.index#listing_enterprise_fees %thead %tr - %th + %th =t'Enterprise' - %th + %th =t'fee_type' - %th + %th =t'name' - %th + %th =t'tax_category' - %th + %th =t'calculator' - %th + %th =t'calculator_values' %th.actions %tbody diff --git a/app/views/admin/enterprise_groups/_form_about.html.haml b/app/views/admin/enterprise_groups/_form_about.html.haml index 2c2ba59464..1e97697a4e 100644 --- a/app/views/admin/enterprise_groups/_form_about.html.haml +++ b/app/views/admin/enterprise_groups/_form_about.html.haml @@ -1,5 +1,5 @@ %fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='About'" } } - %legend + %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', diff --git a/app/views/admin/enterprise_groups/_form_address.html.haml b/app/views/admin/enterprise_groups/_form_address.html.haml index a161c1d619..fa7b1e7e75 100644 --- a/app/views/admin/enterprise_groups/_form_address.html.haml +++ b/app/views/admin/enterprise_groups/_form_address.html.haml @@ -1,6 +1,6 @@ = f.fields_for :address do |af| %fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Contact'" } } - %legend + %legend = t 'admin_entreprise_groups_contact' .row .alpha.three.columns diff --git a/app/views/admin/enterprise_groups/_form_images.html.haml b/app/views/admin/enterprise_groups/_form_images.html.haml index ee01267208..b24feb60a0 100644 --- a/app/views/admin/enterprise_groups/_form_images.html.haml +++ b/app/views/admin/enterprise_groups/_form_images.html.haml @@ -1,5 +1,5 @@ %fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Images'" } } - %legend + %legend = t 'admin_entreprise_groups_images' .row .alpha.three.columns @@ -13,7 +13,7 @@ .alpha.three.columns = 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 + %a = t 'admin_entreprise_groups_what_s_this' = f.label :promo_image, 'ofn-with-tip' => 'This image is displayed at the top of the Group profile' %div{'ofn-with-tip' => 'This image is displayed at the top of the Group profile'} diff --git a/app/views/admin/enterprise_groups/_form_primary_details.html.haml b/app/views/admin/enterprise_groups/_form_primary_details.html.haml index 6785d88ada..56771c458c 100644 --- a/app/views/admin/enterprise_groups/_form_primary_details.html.haml +++ b/app/views/admin/enterprise_groups/_form_primary_details.html.haml @@ -1,5 +1,5 @@ %fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Primary Details'" } } - %legend + %legend = t "admin_entreprise_groups_primary_details" = f.field_container :name do = f.label :name diff --git a/app/views/admin/enterprise_groups/_form_users.html.haml b/app/views/admin/enterprise_groups/_form_users.html.haml index 3d146ed6f9..4c111c1772 100644 --- a/app/views/admin/enterprise_groups/_form_users.html.haml +++ b/app/views/admin/enterprise_groups/_form_users.html.haml @@ -4,7 +4,7 @@ .three.columns.alpha =f.label :owner_id, t(:admin_entreprise_groups_owner) .with-tip{'data-powertip' => t(:admin_entreprise_groups_data_powertip)} - %a + %a = t 'admin_entreprise_groups_what_s_this' =f.label :owner_id, 'Owner' %div{'ofn-with-tip' => "The primary user responsible for this group."} diff --git a/app/views/admin/enterprise_groups/_form_web.html.haml b/app/views/admin/enterprise_groups/_form_web.html.haml index 4d20f9d2fd..5d982f1bbb 100644 --- a/app/views/admin/enterprise_groups/_form_web.html.haml +++ b/app/views/admin/enterprise_groups/_form_web.html.haml @@ -1,5 +1,5 @@ %fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Web'" } } - %legend + %legend = t 'admin_entreprise_groups_web' .row .alpha.three.columns diff --git a/app/views/admin/enterprise_groups/index.html.haml b/app/views/admin/enterprise_groups/index.html.haml index 932695201f..a4eddfd5ca 100644 --- a/app/views/admin/enterprise_groups/index.html.haml +++ b/app/views/admin/enterprise_groups/index.html.haml @@ -8,14 +8,14 @@ %table.index#listing_enterprise_groups %thead %tr - %th + %th = t 'admin_entreprise_groups_name' - if spree_current_user.admin? %th = t 'admin_entreprise_groups_owner' - %th + %th = t 'admin_entreprise_groups_on_front_page' - %th + %th = t 'admin_entreprise_groups_entreprise' %th.actions diff --git a/app/views/admin/enterprise_relationships/_enterprise_relationship.html.haml b/app/views/admin/enterprise_relationships/_enterprise_relationship.html.haml index b4e865f083..05e6505868 100644 --- a/app/views/admin/enterprise_relationships/_enterprise_relationship.html.haml +++ b/app/views/admin/enterprise_relationships/_enterprise_relationship.html.haml @@ -1,6 +1,6 @@ %tr{"ng-repeat" => "enterprise_relationship in EnterpriseRelationships.enterprise_relationships | keywords:query"} %td {{ enterprise_relationship.parent_name }} - %td + %td = t 'admin_entreprise_relationships_permits' %td {{ enterprise_relationship.child_name }} %td diff --git a/app/views/admin/order_cycles/set_coordinator.html.haml b/app/views/admin/order_cycles/set_coordinator.html.haml index 0216edee54..db9bbb926c 100644 --- a/app/views/admin/order_cycles/set_coordinator.html.haml +++ b/app/views/admin/order_cycles/set_coordinator.html.haml @@ -1,4 +1,4 @@ -%h4.text-center +%h4.text-center =t'select_a_coordinator_for_your_order_cycle' %br diff --git a/app/views/spree/admin/overview/_enterprises_header.html.haml b/app/views/spree/admin/overview/_enterprises_header.html.haml index 78959383c5..5b1979c4ce 100644 --- a/app/views/spree/admin/overview/_enterprises_header.html.haml +++ b/app/views/spree/admin/overview/_enterprises_header.html.haml @@ -1,11 +1,10 @@ %div.header.sixteen.columns.alpha{ :class => "#{@enterprises.count > 0 ? "" : "red"}"} - %h3.thirteen.columns.alpha + %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}" } = 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." } + %a{ "ofn-with-tip" => "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" - %a{ "ofn-with-tip" => "Enterprises are Producers and/or Hubs and are the basic unit of organisation within the Open Food Network." } What's this?