aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorcedricnjanga2017-12-19 16:21:06 +0100
committerLuc Donnet2017-12-21 13:55:49 +0100
commit43f8c76522288a0328d520dfc753ed173fc84964 (patch)
treee067ae1f57fb34a5a82425b1e278507ccfdba4ae /config
parent723bee2cafff84c0b948f85ed450408d6cbc866a (diff)
downloadchouette-core-43f8c76522288a0328d520dfc753ed173fc84964.tar.bz2
BusinessCalendar => PurchaseWindow
belongs_to referential
Diffstat (limited to 'config')
-rw-r--r--config/breadcrumbs.rb11
-rw-r--r--config/locales/purchase_windows.en.yml (renamed from config/locales/business_calendars.en.yml)39
-rw-r--r--config/locales/purchase_windows.fr.yml (renamed from config/locales/business_calendars.fr.yml)10
-rw-r--r--config/routes.rb4
4 files changed, 32 insertions, 32 deletions
diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb
index 0bca4a0be..03a98a513 100644
--- a/config/breadcrumbs.rb
+++ b/config/breadcrumbs.rb
@@ -162,13 +162,14 @@ crumb :line do |line|
parent :lines, line.line_referential
end
-crumb :business_calendars do
- link I18n.t('business_calendars.index.title'), business_calendars_path
+crumb :purchase_windows do |referential|
+ link I18n.t('purchase_windows.index.title'), referential_purchase_windows_path(referential)
+ parent :referential, referential
end
-crumb :business_calendar do |business_calendar|
- link breadcrumb_name(business_calendar), business_calendar_path(business_calendar)
- parent :business_calendars
+crumb :purchase_window do |purchase_window, referential|
+ link breadcrumb_name(purchase_window), referential_purchase_window_path(referential, purchase_window)
+ parent :purchase_windows, referential
end
crumb :calendars do
diff --git a/config/locales/business_calendars.en.yml b/config/locales/purchase_windows.en.yml
index 494136e1d..eddc0de35 100644
--- a/config/locales/business_calendars.en.yml
+++ b/config/locales/purchase_windows.en.yml
@@ -1,6 +1,6 @@
en:
- business_calendars:
- search_no_results: 'No business calendar matching your query'
+ purchase_windows:
+ search_no_results: 'No purchase window matching your query'
days:
monday: M
tuesday: Tu
@@ -23,31 +23,31 @@ en:
11: November
12: December
actions:
- new: Add a new business calendar
- edit: Edit this business calendar
- destroy: Remove this business calendar
- destroy_confirm: Are you sure you want destroy this business calendar?
+ new: Add a new purchase window
+ edit: Edit this purchase window
+ destroy: Remove this purchase window
+ destroy_confirm: Are you sure you want destroy this purchase window?
errors:
overlapped_periods: Another period is overlapped with this period
short_period: A period needs to last at least two days
index:
- title: Business calendars
+ title: purchase windows
all: All
shared: Shared
not_shared: Not shared
- search_no_results: No business calendar matching your query
+ search_no_results: No purchase window matching your query
date: Date
create:
- title: Add a new business calendar
+ title: Add a new purchase window
new:
- title: Add a new business calendar
+ title: Add a new purchase window
edit:
- title: Update business calendar %{name}
+ title: Update purchase window %{name}
show:
- title: Business calendar %{name}
+ title: purchase window %{name}
simple_form:
labels:
- business_calendar:
+ purchase_windows:
date_value: Date
add_a_date: Add a date
add_a_date_range: Add a date range
@@ -56,19 +56,18 @@ en:
end: End
activerecord:
models:
- one: business calendar
- other: business calendars
+ one: purchase window
+ other: purchase windows
attributes:
- business_calendar:
+ purchase_windows:
name: Name
- short_name: Short name
date_ranges: Date ranges
- dates: Dates
- organisation: Organisation
+ referential: Referential
color: Color
+ bounding_dates: Bounding Dates
errors:
models:
- business_calendar:
+ purchase_windows:
attributes:
dates:
date_in_date_ranges: A date can not be in Dates and in Date ranges.
diff --git a/config/locales/business_calendars.fr.yml b/config/locales/purchase_windows.fr.yml
index 3ec08ebbd..9e00b0b9c 100644
--- a/config/locales/business_calendars.fr.yml
+++ b/config/locales/purchase_windows.fr.yml
@@ -1,5 +1,5 @@
fr:
- business_calendars:
+ purchase_windows:
search_no_results: 'Aucun calendrier commercial ne correspond à votre recherche'
days:
monday: L
@@ -59,16 +59,16 @@ fr:
one: "calendrier commercial"
other: "calendriers commerciaux"
attributes:
- business_calendar:
+ purchase_window:
name: Nom
short_name: Nom court
date_ranges: Intervalles de dates
- dates: Dates
- organisation: Organisation
+ referential: Jeu de données
color: Couleur
+ bounding_dates: Période englobante
errors:
models:
- business_calendar:
+ purchase_window:
attributes:
dates:
date_in_date_ranges: Une même date ne peut pas être incluse à la fois dans la liste et dans les intervalles de dates.
diff --git a/config/routes.rb b/config/routes.rb
index b4191da0f..c231e0bf7 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -99,8 +99,6 @@ ChouetteIhm::Application.routes.draw do
resources :networks
end
- resources :business_calendars
-
resources :calendars do
get :autocomplete, on: :collection, controller: 'autocomplete_calendars'
end
@@ -173,6 +171,8 @@ ChouetteIhm::Application.routes.draw do
resources :companies, controller: "referential_companies"
+ resources :purchase_windows
+
resources :time_tables do
collection do
get :tags