aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/api/v1/imports/index.rabl3
-rw-r--r--app/views/api/v1/imports/show.rabl6
-rw-r--r--app/views/api/v1/journey_patterns/show.rabl8
-rw-r--r--app/views/api/v1/netex_imports/create.json.rabl3
-rw-r--r--app/views/api/v1/workbenches/index.rabl3
-rw-r--r--app/views/api/v1/workbenches/show.rabl3
-rw-r--r--app/views/api_keys/_form.html.slim13
-rw-r--r--app/views/api_keys/edit.html.slim3
-rw-r--r--app/views/api_keys/index.html.slim24
-rw-r--r--app/views/api_keys/new.html.slim3
-rw-r--r--app/views/api_keys/show.html.slim7
-rw-r--r--app/views/autocomplete_calendars/autocomplete.rabl3
-rw-r--r--app/views/autocomplete_time_tables/index.rabl9
-rw-r--r--app/views/calendar_mailer/created.html.slim24
-rw-r--r--app/views/calendar_mailer/updated.html.slim23
-rw-r--r--app/views/calendars/edit.html.slim2
-rw-r--r--app/views/calendars/index.html.slim2
-rw-r--r--app/views/calendars/new.html.slim2
-rw-r--r--app/views/calendars/show.html.slim2
-rw-r--r--app/views/companies/index.html.slim2
-rw-r--r--app/views/companies/show.html.slim2
-rw-r--r--app/views/imports/_filters.html.slim21
-rw-r--r--app/views/imports/_form.html.slim20
-rw-r--r--app/views/imports/index.html.slim58
-rw-r--r--app/views/imports/new.html.slim14
-rw-r--r--app/views/imports/show.html.slim66
-rw-r--r--app/views/journey_patterns_collections/show.html.slim2
-rw-r--r--app/views/layouts/application.html.slim2
-rw-r--r--app/views/layouts/mailer.html.slim21
-rw-r--r--app/views/layouts/navigation/_main_nav_left.html.slim12
-rw-r--r--app/views/layouts/navigation/_main_nav_top.html.slim2
-rw-r--r--app/views/line_footnotes/edit.html.slim2
-rw-r--r--app/views/line_footnotes/show.html.slim2
-rw-r--r--app/views/line_referentials/show.html.slim2
-rw-r--r--app/views/lines/index.html.slim2
-rw-r--r--app/views/lines/show.html.slim2
-rw-r--r--app/views/networks/index.html.slim4
-rw-r--r--app/views/networks/show.html.slim4
-rw-r--r--app/views/referential_companies/index.html.slim2
-rw-r--r--app/views/referential_companies/show.html.slim2
-rw-r--r--app/views/referential_lines/show.html.slim2
-rw-r--r--app/views/referential_networks/index.html.slim2
-rw-r--r--app/views/referential_networks/show.html.slim2
-rw-r--r--app/views/referential_stop_areas/show.html.slim2
-rw-r--r--app/views/referentials/_filters.html.slim4
-rw-r--r--app/views/referentials/_form.html.slim4
-rw-r--r--app/views/referentials/_period_fields.html.slim2
-rw-r--r--app/views/referentials/edit.html.slim2
-rw-r--r--app/views/referentials/index.html.slim6
-rw-r--r--app/views/referentials/new.html.slim4
-rw-r--r--app/views/referentials/show.html.slim10
-rw-r--r--app/views/routes/edit.html.slim2
-rw-r--r--app/views/routes/new.html.slim2
-rw-r--r--app/views/routes/show.html.slim16
-rw-r--r--app/views/routing_constraint_zones/edit.html.slim2
-rw-r--r--app/views/routing_constraint_zones/index.html.slim2
-rw-r--r--app/views/routing_constraint_zones/new.html.slim6
-rw-r--r--app/views/routing_constraint_zones/show.html.slim2
-rw-r--r--app/views/stop_area_referentials/show.html.slim6
-rw-r--r--app/views/stop_areas/index.html.slim2
-rw-r--r--app/views/stop_areas/show.html.slim2
-rw-r--r--app/views/time_table_combinations/_form.html.slim2
-rw-r--r--app/views/time_tables/_filter.html.slim2
-rw-r--r--app/views/time_tables/edit.html.slim5
-rw-r--r--app/views/time_tables/index.html.slim5
-rw-r--r--app/views/time_tables/new.html.slim2
-rw-r--r--app/views/time_tables/show.html.slim2
-rw-r--r--app/views/vehicle_journeys/index.html.slim2
-rw-r--r--app/views/workbenches/_filters.html.slim16
-rw-r--r--app/views/workbenches/index.html.slim2
-rw-r--r--app/views/workbenches/show.html.slim11
71 files changed, 357 insertions, 161 deletions
diff --git a/app/views/api/v1/imports/index.rabl b/app/views/api/v1/imports/index.rabl
new file mode 100644
index 000000000..e8cfd101e
--- /dev/null
+++ b/app/views/api/v1/imports/index.rabl
@@ -0,0 +1,3 @@
+collection @imports
+
+extends "api/v1/imports/show"
diff --git a/app/views/api/v1/imports/show.rabl b/app/views/api/v1/imports/show.rabl
new file mode 100644
index 000000000..180894cb8
--- /dev/null
+++ b/app/views/api/v1/imports/show.rabl
@@ -0,0 +1,6 @@
+object @import
+
+attributes :id, :name, :status
+node :referential_ids do |i|
+ i.workbench.referentials.map(&:id)
+end
diff --git a/app/views/api/v1/journey_patterns/show.rabl b/app/views/api/v1/journey_patterns/show.rabl
index 21f25e480..7c3af52fc 100644
--- a/app/views/api/v1/journey_patterns/show.rabl
+++ b/app/views/api/v1/journey_patterns/show.rabl
@@ -5,6 +5,13 @@ extends "api/v1/trident_objects/show"
attributes attr, :unless => lambda { |m| m.send( attr).nil?}
end
+node do |jp|
+ {
+ short_id: jp.objectid.parts.try(:third)
+ }
+
+end
+
node(:route_short_description) do |journey_pattern|
partial("api/v1/routes/short_description", :object => journey_pattern.route)
end
@@ -18,4 +25,3 @@ child :stop_points => :stop_area_short_descriptions do |stop_points|
partial("api/v1/stop_areas/short_description", :object => stop_point.stop_area)
end
end
-
diff --git a/app/views/api/v1/netex_imports/create.json.rabl b/app/views/api/v1/netex_imports/create.json.rabl
new file mode 100644
index 000000000..f37703349
--- /dev/null
+++ b/app/views/api/v1/netex_imports/create.json.rabl
@@ -0,0 +1,3 @@
+
+object @netex_import
+attributes :id, :workbench_id, :referential_id
diff --git a/app/views/api/v1/workbenches/index.rabl b/app/views/api/v1/workbenches/index.rabl
new file mode 100644
index 000000000..2f0bf5fee
--- /dev/null
+++ b/app/views/api/v1/workbenches/index.rabl
@@ -0,0 +1,3 @@
+collection @workbenches
+
+extends "api/v1/workbenches/show"
diff --git a/app/views/api/v1/workbenches/show.rabl b/app/views/api/v1/workbenches/show.rabl
new file mode 100644
index 000000000..d43727809
--- /dev/null
+++ b/app/views/api/v1/workbenches/show.rabl
@@ -0,0 +1,3 @@
+object @workbench
+
+attributes :id, :name
diff --git a/app/views/api_keys/_form.html.slim b/app/views/api_keys/_form.html.slim
index 74b806677..f3ebf3fe1 100644
--- a/app/views/api_keys/_form.html.slim
+++ b/app/views/api_keys/_form.html.slim
@@ -1,10 +1,7 @@
-= semantic_form_for [@referential, @api_key] do |form|
- = form.inputs do
- = form.input :name
-
+= simple_form_for @api_key, url: action_url do |f|
+ = f.input :name
- unless @api_key.new_record?
- = form.input :token, :input_html => { :readonly => true }
+ = f.input :token, :input_html => { readonly: true }
- = form.actions do
- = form.action :submit, as: :button
- = form.action :cancel, as: :link \ No newline at end of file
+ = f.association :referential
+ = f.button :submit, 'submit', class: 'btn-primary'
diff --git a/app/views/api_keys/edit.html.slim b/app/views/api_keys/edit.html.slim
index 110f0775d..e47deddf7 100644
--- a/app/views/api_keys/edit.html.slim
+++ b/app/views/api_keys/edit.html.slim
@@ -1,3 +1,2 @@
= title_tag t('api_keys.edit.title')
-
-== render 'form' \ No newline at end of file
+== render partial: 'form', locals: {action_url: organisation_api_key_path}
diff --git a/app/views/api_keys/index.html.slim b/app/views/api_keys/index.html.slim
new file mode 100644
index 000000000..fc8d95c7a
--- /dev/null
+++ b/app/views/api_keys/index.html.slim
@@ -0,0 +1,24 @@
+- header_params = ['map-marker',
+ t('.title'),
+ '']
+- header_params << link_to(t('actions.add'), new_organisation_api_key_path, class: 'btn btn-default') if policy(Api::V1::ApiKey).create?
+= pageheader(*header_params) do
+
+
+- if @api_keys.any?
+ .row
+ .col-lg-12
+ = table_builder_2 @api_keys,
+ [ \
+ TableBuilderHelper::Column.new( \
+ key: :name, \
+ attribute: 'name' \
+ ), \
+ TableBuilderHelper::Column.new( \
+ key: :token, \
+ attribute: 'token' \
+ ), \
+ ],
+ cls: 'table has-search'
+
+ = new_pagination @api_keys, 'pull-right'
diff --git a/app/views/api_keys/new.html.slim b/app/views/api_keys/new.html.slim
index f7b1dd99b..291c9f8a6 100644
--- a/app/views/api_keys/new.html.slim
+++ b/app/views/api_keys/new.html.slim
@@ -1,3 +1,2 @@
= title_tag t('api_keys.new.title')
-
-== render "form" \ No newline at end of file
+== render partial: 'form', locals: {action_url: organisation_api_keys_path}
diff --git a/app/views/api_keys/show.html.slim b/app/views/api_keys/show.html.slim
index b65717408..de30ac125 100644
--- a/app/views/api_keys/show.html.slim
+++ b/app/views/api_keys/show.html.slim
@@ -12,7 +12,6 @@
- content_for :sidebar do
ul.actions
- li = link_to t('api_keys.actions.new'), new_referential_api_key_path(@referential), class: "add"
- li = link_to t('api_keys.actions.edit'), edit_referential_api_key_path(@referential, @api_key), class: "edit"
- li = link_to t('api_keys.actions.destroy'), referential_api_key_path(@referential, @api_key), :method => :delete, :data => {:confirm => t('api_keys.actions.destroy_confirm')}, class: "remove"
- br \ No newline at end of file
+ li = link_to t('api_keys.actions.edit'), edit_organisation_api_key_path(@api_key), class: "edit"
+ li = link_to t('api_keys.actions.destroy'), organisation_api_key_path(@api_key), :method => :delete, :data => {:confirm => t('api_keys.actions.destroy_confirm')}, class: "remove"
+ br
diff --git a/app/views/autocomplete_calendars/autocomplete.rabl b/app/views/autocomplete_calendars/autocomplete.rabl
index 9aba2c37b..3a7703c53 100644
--- a/app/views/autocomplete_calendars/autocomplete.rabl
+++ b/app/views/autocomplete_calendars/autocomplete.rabl
@@ -1,5 +1,6 @@
collection @calendars, :object_root => false
attribute :id, :name, :short_name, :shared
+
node :text do |cal|
- "#{cal.id} - #{cal.name}"
+ "<strong>" + cal.name + " - " + cal.id.to_s + "</strong>"
end
diff --git a/app/views/autocomplete_time_tables/index.rabl b/app/views/autocomplete_time_tables/index.rabl
index 80e3f8684..7aafdca16 100644
--- a/app/views/autocomplete_time_tables/index.rabl
+++ b/app/views/autocomplete_time_tables/index.rabl
@@ -2,14 +2,15 @@ collection @time_tables, :object_root => false
node do |time_table|
{
- :id => time_table.id, :comment => time_table.comment, :objectid => time_table.objectid,
+ :id => time_table.id,
+ :comment => time_table.comment,
+ :objectid => time_table.objectid,
:time_table_bounding => time_table.presenter.time_table_bounding,
:composition_info => time_table.presenter.composition_info,
:tags => time_table.tags.join(','),
- :text => "#{time_table.comment} - #{time_table.display_day_types} - #{time_table.objectid.parts.try(:third)}",
:color => time_table.color,
:day_types => time_table.display_day_types,
- :short_id => time_table.objectid.parts.try(:third)
+ :short_id => time_table.objectid.parts.try(:third),
+ :text => "<strong><span class='fa fa-circle' style='color:" + (time_table.color ? time_table.color : '#4b4b4b') + "'></span> " + time_table.comment + " - " + time_table.objectid.parts.try(:third) + "</strong><br/><small>" + time_table.display_day_types + "</small>"
}
end
-
diff --git a/app/views/calendar_mailer/created.html.slim b/app/views/calendar_mailer/created.html.slim
index da15b7189..37b2a86ea 100644
--- a/app/views/calendar_mailer/created.html.slim
+++ b/app/views/calendar_mailer/created.html.slim
@@ -1 +1,25 @@
div = t('mailers.calendar_mailer.created.body', cal_name: @calendar.name, cal_index_url: calendars_url)
+
+table style="border-collapse:collapse;font-family:'Open Sans', Arial, sans serif;width:550px;margin:0px auto;color:#333333;"
+
+ thead
+ tr
+ th
+ .jumbotron style="background-color:#007fbb;color:#fff;padding:20px 25px;margin-bottom:0px;text-align:left;"
+ h1.brandname style="display:inline-block;font-size:20px;font-weight:700;text-transform:uppercase;margin:0;"
+ = t('brandname')
+
+ tbody
+ tr
+ td style="padding:40px 0px 60px 0px;"
+ p style="font-size:14px;font-weight:700;margin:0px 0px 10px 0px;"
+ = t('mailers.calendar_mailer.updated.subject')
+
+ p style="font-size:14px;margin:0px 0px 10px 0px;"
+ = t('mailers.calendar_mailer.created.body', cal_name: @calendar.name, cal_index_url: calendars_url).html_safe
+
+ tr
+ td style="text-align:center;padding:20px 0 0 0;border-top:1px solid #007fbb;"
+ p style="font-size:12px;font-weight:700;margin:0px 0px 10px 0px;opacity:0.85;"
+ em = t('mailers.calendar_mailer.sent_by') + " "
+ = link_to t('brandname'), unauthenticated_root_url, style: "color:#333333;text-decoration:underline;"
diff --git a/app/views/calendar_mailer/updated.html.slim b/app/views/calendar_mailer/updated.html.slim
index f70480107..bf128439a 100644
--- a/app/views/calendar_mailer/updated.html.slim
+++ b/app/views/calendar_mailer/updated.html.slim
@@ -1,2 +1,23 @@
-div = t('mailers.calendar_mailer.updated.body', cal_name: @calendar.name, cal_index_url: calendars_url)
+table style="border-collapse:collapse;font-family:'Open Sans', Arial, sans serif;width:550px;margin:0px auto;color:#333333;"
+ thead
+ tr
+ th
+ .jumbotron style="background-color:#007fbb;color:#fff;padding:20px 25px;margin-bottom:0px;text-align:left;"
+ h1.brandname style="display:inline-block;font-size:20px;font-weight:700;text-transform:uppercase;margin:0;"
+ = t('brandname')
+
+ tbody
+ tr
+ td style="padding:40px 0px 60px 0px;"
+ p style="font-size:14px;font-weight:700;margin:0px 0px 10px 0px;"
+ = t('mailers.calendar_mailer.updated.subject')
+
+ p style="font-size:14px;margin:0px 0px 10px 0px;"
+ = t('mailers.calendar_mailer.updated.body', cal_name: @calendar.name, cal_index_url: calendars_url).html_safe
+
+ tr
+ td style="text-align:center;padding:20px 0 0 0;border-top:1px solid #007fbb;"
+ p style="font-size:12px;font-weight:700;margin:0px 0px 10px 0px;opacity:0.85;"
+ em = t('mailers.calendar_mailer.sent_by') + " "
+ = link_to t('brandname'), unauthenticated_root_url, style: "color:#333333;text-decoration:underline;"
diff --git a/app/views/calendars/edit.html.slim b/app/views/calendars/edit.html.slim
index 6668630e8..426f27881 100644
--- a/app/views/calendars/edit.html.slim
+++ b/app/views/calendars/edit.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'modele-calendrier',
t('.title', calendar: @calendar.name),
'',
t('last_update', time: l(@calendar.updated_at, format: :short))
diff --git a/app/views/calendars/index.html.slim b/app/views/calendars/index.html.slim
index e3ac16505..757ade89b 100644
--- a/app/views/calendars/index.html.slim
+++ b/app/views/calendars/index.html.slim
@@ -1,6 +1,6 @@
/ PageHeader
-- header_params = ['map-marker',
+- header_params = ['modele-calendrier',
t('.title'),
'']
- header_params << link_to(t('actions.add'), new_calendar_path, class: 'btn btn-default') if policy(Calendar).create?
diff --git a/app/views/calendars/new.html.slim b/app/views/calendars/new.html.slim
index 7faecf587..2cb6f8061 100644
--- a/app/views/calendars/new.html.slim
+++ b/app/views/calendars/new.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'modele-calendrier',
t('.title'),
'',
''
diff --git a/app/views/calendars/show.html.slim b/app/views/calendars/show.html.slim
index 4ce5de57f..eda4ef97c 100644
--- a/app/views/calendars/show.html.slim
+++ b/app/views/calendars/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'modele-calendrier',
@calendar.name,
'',
t('last_update', time: l(@calendar.updated_at, format: :short)),
diff --git a/app/views/companies/index.html.slim b/app/views/companies/index.html.slim
index ceea385b3..90d5e8c96 100644
--- a/app/views/companies/index.html.slim
+++ b/app/views/companies/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'transporteur',
t('companies.index.title'),
'Lorem ipsum dolor sit amet',
'',
diff --git a/app/views/companies/show.html.slim b/app/views/companies/show.html.slim
index a5c7347a8..4fb437115 100644
--- a/app/views/companies/show.html.slim
+++ b/app/views/companies/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'transporteur',
@company.name,
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@company.updated_at, format: :short)) do
diff --git a/app/views/imports/_filters.html.slim b/app/views/imports/_filters.html.slim
new file mode 100644
index 000000000..99fcb0232
--- /dev/null
+++ b/app/views/imports/_filters.html.slim
@@ -0,0 +1,21 @@
+= search_form_for @q, url: workbench_imports_path(@workbench), html: { method: :get, class: 'form form-filter' } do |f|
+ .ffg-row
+ .input-group.search_bar
+ = f.search_field :name_or_creator_cont, class: 'form-control', placeholder: t('imports.filters.name_or_creator_cont')
+ span.input-group-btn
+ button.btn.btn-default#search_btn type='submit'
+ span.fa.fa-search
+
+ .ffg-row
+ .form-group.togglable
+ = f.label Import.human_attribute_name(:status), required: false, class: 'control-label'
+ = f.input :status_eq_any, collection: @imports.map(&:status).uniq.compact, as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + l + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'}
+
+ .form-group.togglable
+ = f.label Import.human_attribute_name(:started_at), required: false, class: 'control-label'
+ .filter_menu
+ = f.input :started_at_eq, as: :date, label: false, wrapper_html: { class: 'date smart_date filter_menu-item' }, include_blank: true
+
+ .actions
+ = link_to t('actions.erase'), workbench_imports_path(@workbench), class: 'btn btn-link'
+ = f.submit t('actions.filter'), class: 'btn btn-default'
diff --git a/app/views/imports/_form.html.slim b/app/views/imports/_form.html.slim
index b795e908f..0fbf578be 100644
--- a/app/views/imports/_form.html.slim
+++ b/app/views/imports/_form.html.slim
@@ -1,6 +1,14 @@
-= simple_form_for import, as: :import, url: workbench_imports_path(workbench) do |f|
- = f.input :name
- = f.input :file
- = f.association :referential, collection: workbench.referentials
- = f.input :type, as: :hidden
- = f.button :submit
+= simple_form_for import, as: :import, url: workbench_imports_path(workbench), html: {class: 'form-horizontal', id: 'wb_import_form'}, wrapper: :horizontal_form do |form|
+
+ .row
+ .col-lg-12
+ = form.input :name
+
+ .row
+ .col-lg-12
+ .form-group
+ = form.label :file, t('activerecord.attributes.import.resources'), class: 'control-label col-sm-4 col-xs-5'
+ .col-sm-8.col-xs-7
+ = form.input_field :file, label: false, class: 'form-control'
+
+ = form.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'wb_import_form'
diff --git a/app/views/imports/index.html.slim b/app/views/imports/index.html.slim
index 6e2d49f73..09014350f 100644
--- a/app/views/imports/index.html.slim
+++ b/app/views/imports/index.html.slim
@@ -1,12 +1,46 @@
-= title_tag t('.title')
-- @imports.each do |import|
- .import
- li = link_to import.name, workbench_import_path(@workbench, import)
- li = import.referential.name if import.referential
- li = link_to import.file.file.filename, import.file.url, target: :_blank
- hr
-
-.warning = t('.warning')
-- content_for :sidebar do
- ul.actions
- li = link_to t('imports.actions.new'), new_workbench_import_path(workbench_id: @workbench), class: 'add'
+/ PageHeader
+= pageheader 'importer',
+ t('.title'),
+ '',
+ '',
+ link_to(t('imports.actions.new'), new_workbench_import_path(workbench_id: @workbench), class: 'btn btn-primary')
+
+/ PageContent
+.page_content
+ .container-fluid
+ - if params[:q].present? or @imports.any?
+ .row
+ .col-lg-12
+ = render 'filters'
+
+ - if @imports.any?
+ .row
+ .col-lg-12
+ = table_builder_2 @imports,
+ [ \
+ TableBuilderHelper::Column.new( \
+ key: :status, \
+ attribute: 'status' \
+ ), \
+ TableBuilderHelper::Column.new( \
+ key: :started_at, \
+ attribute: 'started_at' \
+ ), \
+ TableBuilderHelper::Column.new( \
+ key: :name, \
+ attribute: 'name' \
+ ), \
+ TableBuilderHelper::Column.new( \
+ key: :creator, \
+ attribute: 'creator' \
+ ) \
+ ],
+ links: [],
+ cls: 'table has-search'
+
+ = new_pagination @imports, 'pull-right'
+
+ - unless @imports.any?
+ .row.mt-xs
+ .col-lg-12
+ = replacement_msg t('imports.search_no_results')
diff --git a/app/views/imports/new.html.slim b/app/views/imports/new.html.slim
index 55b655a85..5d5df0857 100644
--- a/app/views/imports/new.html.slim
+++ b/app/views/imports/new.html.slim
@@ -1,4 +1,10 @@
-= title_tag t('.title')
-.row
- .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-8.col-sm-offset-2
- = render 'form', import: @import, workbench: @workbench
+/ PageHeader
+= pageheader 'importer',
+ t('.title')
+
+/ PageContent
+.page_content
+ .container-fluid
+ .row
+ .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-10.col-sm-offset-1
+ = render 'form', import: @import, workbench: @workbench
diff --git a/app/views/imports/show.html.slim b/app/views/imports/show.html.slim
index b40e11ea4..5518e1a47 100644
--- a/app/views/imports/show.html.slim
+++ b/app/views/imports/show.html.slim
@@ -1,14 +1,58 @@
-.title.row
- .col-md-8
- = title_tag job_status_title(@import)
+/ PageHeader
+= pageheader 'importer',
+ @import.name,
+ '',
+ t('last_update', time: l(@import.updated_at, format: :short)) do
-.import_show
- .links
- = link_to font_awesome_classic_tag("fa-file-#{@import.file.file.extension}-o") + t("imports.show.imported_file"), @import.file.url
+ / Below is secundary actions & optional contents (filters, ...)
+ .row
+ .col-lg-12.text-right.mb-sm
+ - @import.action_links.each do |link|
+ = link_to link.href,
+ method: link.method,
+ data: link.data,
+ class: 'btn btn-primary' do
+ = link.content
-- content_for :sidebar do
- ul.actions
- li
- = link_to t('imports.actions.destroy'), workbench_import_path(@workbench, @import.id), method: :delete, data: {confirm: t('imports.actions.destroy_confirm')}, class: 'remove'
+/ PageContent
+.page_content
+ .container-fluid
+ .row
+ .col-lg-6.col-md-6.col-sm-12.col-xs-12
+ = definition_list t('metadatas'), { 'Récupération des données' => '-', "Nom de l'archive" => @import.try(:file_identifier)}
- = history_tag(@import)
+ .row
+ .col-lg-12
+ = table_builder_2 @import.children,
+ [ \
+ TableBuilderHelper::Column.new( \
+ name: 'Nom du jeu de données', \
+ attribute: 'name' \
+ ), \
+ TableBuilderHelper::Column.new( \
+ key: :status, \
+ attribute: 'status' \
+ ), \
+ TableBuilderHelper::Column.new( \
+ name: 'Contrôle STIF', \
+ attribute: '' \
+ ), \
+ TableBuilderHelper::Column.new( \
+ name: 'Contrôle organisation', \
+ attribute: '' \
+ ) \
+ ],
+ links: [],
+ cls: 'table',
+ overhead: [ \
+ {}, \
+ { \
+ title: "#{@import.children_succeedeed} jeu de données validé sur #{@import.children.count} présents dans l'archive", \
+ width: 1, \
+ cls: 'overheaded-danger full-border' \
+ }, { \
+ title: 'Bilan des jeux de contrôles d\'import <span title="Lorem ipsum..." class="fa fa-lg fa-info-circle text-info"></span>', \
+ width: 2, \
+ cls: 'overheaded-default colspan="2"' \
+ } \
+ ]
diff --git a/app/views/journey_patterns_collections/show.html.slim b/app/views/journey_patterns_collections/show.html.slim
index eb6dfb650..bce4f28b5 100644
--- a/app/views/journey_patterns_collections/show.html.slim
+++ b/app/views/journey_patterns_collections/show.html.slim
@@ -1,5 +1,5 @@
/ pageheader
-= pageheader 'map-marker',
+= pageheader 'mission',
"Missions de #{@route.try(:stop_points).first.try(:stop_area).name} vers #{@route.try(:stop_points).last.try(:stop_area).name}",
'Lorem ipsum dolor sit amet',
''
diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim
index 6eab2a761..d6a22c4f8 100644
--- a/app/views/layouts/application.html.slim
+++ b/app/views/layouts/application.html.slim
@@ -6,7 +6,7 @@ html lang=I18n.locale
= csrf_meta_tag
- title STIF BOIV
+ title = t('brandname')
= stylesheet_link_tag 'base'
= stylesheet_link_tag 'application'
diff --git a/app/views/layouts/mailer.html.slim b/app/views/layouts/mailer.html.slim
index 1485e8188..5db6917b3 100644
--- a/app/views/layouts/mailer.html.slim
+++ b/app/views/layouts/mailer.html.slim
@@ -2,21 +2,6 @@ doctype html
html
head
meta charset="utf-8"
- title= message.subject
-
- body style="font-family: Verdana, Helvetica, Arial, MS Trebuchet, sans-serif; font-size: 14px; width: 600px; background: #E5E5E5; padding: 15px"
-
- <style>
- h2 { font-size: 18px; }
- h3 { font-size: 14px; }
- a { color: black; }
- </style>
-
- h1 style="background: #61970B; height: 75px; font-size: 24px; font-weight: normal; color: white; padding: 20px 0 0 30px;"
- |Chouette
-
- div style="background: white; margin-bottom: 10px; padding: 15px; -moz-box-shadow: 3px 3px 4px #bbbbbb; -webkit-box-shadow: 3px 3px 4px #BBB; box-shadow: 3px 3px 4px #BBB; border-right: 1px solid #BBB; border-bottom: 1px solid #BBB;"
- = yield
-
- div style="color: #333333; text-align:center; font-size: 10px;"
- = "Envoyé par #{link_to 'Chouette', unauthenticated_root_url}"
+ /!* Email styles need to be inline */
+ body
+ = yield
diff --git a/app/views/layouts/navigation/_main_nav_left.html.slim b/app/views/layouts/navigation/_main_nav_left.html.slim
index 9dfc828c0..74442692d 100644
--- a/app/views/layouts/navigation/_main_nav_left.html.slim
+++ b/app/views/layouts/navigation/_main_nav_left.html.slim
@@ -5,7 +5,7 @@
.menu-content
.closeMenu title='Fermer le menu'
- .brandname = "IBOO"
+ .brandname = t('brandname')
#menu-items.panel-group
.menu-item.panel
@@ -33,8 +33,14 @@
.list-group
= link_to '#', class: "list-group-item #{params[:controller] == 'workbenches' ? 'active' : ''}" do
span Jeux de données
- = link_to '#', class: 'list-group-item' do
- span Import
+
+ - if @workbench
+ = link_to workbench_imports_path(@workbench), class: "list-group-item #{(params[:controller] == 'imports') ? 'active' : ''}" do
+ span Import
+ - else
+ = link_to '#', class: 'list-group-item disabled' do
+ span Import
+
= link_to calendars_path, class: 'list-group-item' do
span Modèles de calendrier
= link_to '#', class: 'list-group-item' do
diff --git a/app/views/layouts/navigation/_main_nav_top.html.slim b/app/views/layouts/navigation/_main_nav_top.html.slim
index 4cdd5f053..d6c849d3f 100644
--- a/app/views/layouts/navigation/_main_nav_top.html.slim
+++ b/app/views/layouts/navigation/_main_nav_top.html.slim
@@ -1,5 +1,5 @@
.nav-menu#menu_top
- .brandname IBOO
+ .brandname = t('brandname')
.menu-content
.menu-item
diff --git a/app/views/line_footnotes/edit.html.slim b/app/views/line_footnotes/edit.html.slim
index fcd7a47e0..4a0fbb931 100644
--- a/app/views/line_footnotes/edit.html.slim
+++ b/app/views/line_footnotes/edit.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'ligne',
"Notes sur la ligne #{@line.name}",
'Lorem ipsum dolor sit amet',
(@line.footnotes.any? ? t('last_update', time: l(@line.footnotes.last.updated_at, format: :short)) : '')
diff --git a/app/views/line_footnotes/show.html.slim b/app/views/line_footnotes/show.html.slim
index 6ad721711..8138c1383 100644
--- a/app/views/line_footnotes/show.html.slim
+++ b/app/views/line_footnotes/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'ligne',
"Notes sur la ligne #{@line.name}",
'Lorem ipsum dolor sit amet',
'',
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index e2381e7e9..d2527f360 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'synchro-ilico',
t('.title'),
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@line_referential.updated_at, format: :short)),
diff --git a/app/views/lines/index.html.slim b/app/views/lines/index.html.slim
index 630d63068..e4a29b182 100644
--- a/app/views/lines/index.html.slim
+++ b/app/views/lines/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'ligne',
t('lines.index.title'),
'Lorem ipsum dolor sit amet',
'',
diff --git a/app/views/lines/show.html.slim b/app/views/lines/show.html.slim
index 6f75432e1..0779a0f5a 100644
--- a/app/views/lines/show.html.slim
+++ b/app/views/lines/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'ligne',
@line.name,
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@line.updated_at, format: :short)) do
diff --git a/app/views/networks/index.html.slim b/app/views/networks/index.html.slim
index 4c1f9783c..bd1f3d15a 100644
--- a/app/views/networks/index.html.slim
+++ b/app/views/networks/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'reseau',
t('networks.index.title'),
'Lorem ipsum dolor sit amet',
'',
@@ -40,6 +40,6 @@
= new_pagination @networks, 'pull-right'
- unless @networks.any?
- .row
+ .row.mt-xs
.col-lg-12
= replacement_msg t('networks.search_no_results')
diff --git a/app/views/networks/show.html.slim b/app/views/networks/show.html.slim
index 09edbad2e..d237351c4 100644
--- a/app/views/networks/show.html.slim
+++ b/app/views/networks/show.html.slim
@@ -1,7 +1,7 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'reseau',
@network.name,
- 'Lorem ipsum dolor sit amet',
+ '',
t('last_update', time: l(@network.updated_at, format: :short)) do
/ Below is secundary actions & optional contents (filters, ...)
diff --git a/app/views/referential_companies/index.html.slim b/app/views/referential_companies/index.html.slim
index 23eea40ce..1946bbab5 100644
--- a/app/views/referential_companies/index.html.slim
+++ b/app/views/referential_companies/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'transporteur',
t('companies.index.title'),
'',
'',
diff --git a/app/views/referential_companies/show.html.slim b/app/views/referential_companies/show.html.slim
index 177ce2d69..1d71c778a 100644
--- a/app/views/referential_companies/show.html.slim
+++ b/app/views/referential_companies/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'transporteur',
@company.name,
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@company.updated_at, format: :short)) do
diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim
index 34c296932..f20b59d3e 100644
--- a/app/views/referential_lines/show.html.slim
+++ b/app/views/referential_lines/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'ligne',
@line.name,
'',
t('last_update', time: l(@line.updated_at, format: :short)) do
diff --git a/app/views/referential_networks/index.html.slim b/app/views/referential_networks/index.html.slim
index c58a91321..747143c94 100644
--- a/app/views/referential_networks/index.html.slim
+++ b/app/views/referential_networks/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'reseau',
t('networks.index.title'),
'Lorem ipsum dolor sit amet',
'',
diff --git a/app/views/referential_networks/show.html.slim b/app/views/referential_networks/show.html.slim
index b9d9d5d8b..d7095561e 100644
--- a/app/views/referential_networks/show.html.slim
+++ b/app/views/referential_networks/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'reseau',
@network.name,
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@network.updated_at, format: :short)) do
diff --git a/app/views/referential_stop_areas/show.html.slim b/app/views/referential_stop_areas/show.html.slim
index d594665f7..fa383c82d 100644
--- a/app/views/referential_stop_areas/show.html.slim
+++ b/app/views/referential_stop_areas/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'arret',
@stop_area.name,
'Lorem ipsum dolor sit amet'
diff --git a/app/views/referentials/_filters.html.slim b/app/views/referentials/_filters.html.slim
index 9302ccaa8..1cc6bb410 100644
--- a/app/views/referentials/_filters.html.slim
+++ b/app/views/referentials/_filters.html.slim
@@ -20,5 +20,5 @@
= f.input :company_id_eq_any, collection: LineReferential.first.companies.order('name').pluck(:id), as: :check_boxes, label: false, label_method: lambda{|l| ("<span>#{LineReferential.first.companies.find(l).name}</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
.actions
- = link_to 'Effacer', @workbench, class: 'btn btn-link'
- = f.submit 'Filtrer', class: 'btn btn-default'
+ = link_to t('actions.erase'), @workbench, class: 'btn btn-link'
+ = f.submit t('actions.filter'), class: 'btn btn-default'
diff --git a/app/views/referentials/_form.html.slim b/app/views/referentials/_form.html.slim
index 31d71bcdc..a9e308699 100644
--- a/app/views/referentials/_form.html.slim
+++ b/app/views/referentials/_form.html.slim
@@ -42,11 +42,11 @@
= render 'period_fields', f: period_form
.links.nested-linker
- = link_to_add_association 'Ajouter une période', subform, :periods, class: 'btn btn-outline-primary'
+ = link_to_add_association t('simple_form.labels.referential.actions.add_period'), subform, :periods, class: 'btn btn-outline-primary'
.separator
- = subform.input :lines, as: :select, collection: @referential.workbench.lines.includes(:company).order(:name), selected: subform.object.line_ids, label_method: :display_name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Sélection de lignes', 'multiple': 'multiple', style: 'width: 100%' }
+ = subform.input :lines, as: :select, collection: @referential.workbench.lines.includes(:company).order(:name), selected: subform.object.line_ids, label_method: :display_name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': t('simple_form.labels.referential.placeholders.select_lines'), 'multiple': 'multiple', style: 'width: 100%' }
.hidden = form.input :workbench_id, as: :hidden
diff --git a/app/views/referentials/_period_fields.html.slim b/app/views/referentials/_period_fields.html.slim
index 95e204554..4d2372f7b 100644
--- a/app/views/referentials/_period_fields.html.slim
+++ b/app/views/referentials/_period_fields.html.slim
@@ -12,4 +12,4 @@
div
= f.input :end, as: :date, label: false, wrapper_html: { class: 'date smart_date' }
div
- = link_to_remove_association '', f, class: 'fa fa-trash', data: { confirm: 'Etes-vous sûr(e) ?' }, title: t('actions.delete')
+ = link_to_remove_association '', f, class: 'fa fa-trash', data: { confirm: t('are_you_sure')}, title: t('actions.delete')
diff --git a/app/views/referentials/edit.html.slim b/app/views/referentials/edit.html.slim
index d54b63135..1fac626e6 100644
--- a/app/views/referentials/edit.html.slim
+++ b/app/views/referentials/edit.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'jeux-de-donnees',
t('.title'),
'',
t('last_update', time: l(@referential.updated_at, format: :short))
diff --git a/app/views/referentials/index.html.slim b/app/views/referentials/index.html.slim
index 8943d419c..8bb66da21 100644
--- a/app/views/referentials/index.html.slim
+++ b/app/views/referentials/index.html.slim
@@ -1,7 +1,7 @@
/ FIXME #827
- current_organisation.workbenches.each do |workbench|
h2 = link_to workbench.name, workbench
- p = "#{workbench.referentials.count} jeu(x) de données à l'heure actuelle"
+ p = t('workbenches.referential_count', count: workbench.referentials.count)
/ FIXME #823
- if false
@@ -11,8 +11,8 @@
- content_for :sidebar do
ul.actions
- li = link_to 'Données Reflex', stop_area_referential_path(1)
- li = link_to 'Données CodifLigne', line_referential_path(1)
+ li = link_to t('reflex_data'), stop_area_referential_path(1)
+ li = link_to t('codif_data'), line_referential_path(1)
li = link_to t('calendars.standard_calendars'), calendars_path
- if false
li = link_to t('referentials.actions.new'), new_referential_path, class: 'add'
diff --git a/app/views/referentials/new.html.slim b/app/views/referentials/new.html.slim
index 55f38eb33..f4a7e4707 100644
--- a/app/views/referentials/new.html.slim
+++ b/app/views/referentials/new.html.slim
@@ -1,9 +1,9 @@
/ PageHeader
- if @referential.created_from.present?
- = pageheader 'map-marker',
+ = pageheader 'jeux-de-donnees',
t('.duplicated.title')
- else
- = pageheader 'map-marker',
+ = pageheader 'jeux-de-donnees',
t('.title')
/ PageContent
diff --git a/app/views/referentials/show.html.slim b/app/views/referentials/show.html.slim
index 425f8014a..5229c3d7d 100644
--- a/app/views/referentials/show.html.slim
+++ b/app/views/referentials/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'jeux-de-donnees',
@referential.name,
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@referential.updated_at, format: :short)),
@@ -24,7 +24,7 @@
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
= definition_list t('metadatas'),
- { 'Statut' => @referential.archived? ? "<div class='td-block'><span class='fa fa-archive'></span><span>Conservé</span></div>".html_safe : "<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>En préparation</span></div>".html_safe,
+ { t('activerecord.attributes.referential.status') => @referential.archived? ? "<div class='td-block'><span class='fa fa-archive'></span><span>#{t('activerecord.attributes.referential.archived_at')}</span></div>".html_safe : "<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>#{t('activerecord.attributes.referential.archived_at_null')}</span></div>".html_safe,
@referential.human_attribute_name(:validity_period) => (@referential.validity_period.present? ? t('validity_range', debut: l(@referential.try(:validity_period).try(:begin), format: :short), end: l(@referential.try(:validity_period).try(:end), format: :short)) : '-'),
@referential.human_attribute_name(:organisation) => @referential.organisation.name,
@referential.human_attribute_name(:published_at) => '-' }
@@ -41,7 +41,7 @@
= table_builder_2 @reflines,
[ \
TableBuilderHelper::Column.new( \
- name: 'ID Codifligne', \
+ name: t('id_codif'), \
attribute: Proc.new { |n| n.objectid.local_id }, \
sortable: false \
), \
@@ -85,7 +85,7 @@
= modalbox 'purgeModal' do
= simple_form_for [@referential, CleanUp.new] do |f|
.modal-header
- h4.modal-title Purger le JDD
+ h4.modal-title #{t('simple_form.labels.clean_up.title')}
.modal-body
.container-fluid
.row
@@ -100,6 +100,6 @@
= f.input :end_date, as: :date, label: t('titles.clean_up.end_date'), wrapper_html: { class: 'date cleanup_end_date_wrapper smart_date', id: "end_date" }
.modal-footer
- button.btn.btn-link type='button' data-dismiss='modal' Annuler
+ button.btn.btn-link type='button' data-dismiss='modal' #{t('cancel')}
- unless policy(@referential).archived?
= f.button :submit, t('actions.clean_up') , class: 'btn btn-primary'
diff --git a/app/views/routes/edit.html.slim b/app/views/routes/edit.html.slim
index c854bc867..850588aef 100644
--- a/app/views/routes/edit.html.slim
+++ b/app/views/routes/edit.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'itineraire',
@route.name,
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@route.updated_at, format: :short))
diff --git a/app/views/routes/new.html.slim b/app/views/routes/new.html.slim
index 102467677..a68f8ae4e 100644
--- a/app/views/routes/new.html.slim
+++ b/app/views/routes/new.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'itineraire',
t('routes.new.title'),
''
diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim
index f2f8f1a9d..1e3fac723 100644
--- a/app/views/routes/show.html.slim
+++ b/app/views/routes/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'itineraire',
@route.name,
'',
t('last_update', time: l(@route.updated_at, format: :short)),
@@ -37,8 +37,7 @@
[ \
TableBuilderHelper::Column.new( \
name: 'ID Reflex', \
- attribute: Proc.new { |s| s.try(:stop_area).try(:user_objectid) }, \
- sortable: false \
+ attribute: Proc.new { |s| s.try(:stop_area).try(:user_objectid) } \
), \
TableBuilderHelper::Column.new( \
key: :name, \
@@ -46,7 +45,7 @@
), \
TableBuilderHelper::Column.new( \
key: :deleted_at, \
- attribute: Proc.new { |s| s.try(:stop_area).deleted_at ? t('false') : t('true') } \
+ attribute: Proc.new { |s| s.try(:stop_area).deleted_at ? t('false') : t('true') }, \
), \
TableBuilderHelper::Column.new( \
key: :zip_code, \
@@ -63,14 +62,11 @@
TableBuilderHelper::Column.new( \
key: :for_alighting, \
attribute: Proc.new { |s| t("stop_points.stop_point.for_alighting.#{s.for_alighting}") } \
- ), \
- TableBuilderHelper::Column.new( \
- key: :position, \
- attribute: 'position' \
- ), \
+ ) \
],
links: [:show],
- cls: 'table'
+ sortable: false,
+ cls: 'table has-stoppoints'
- else
= replacement_msg t('stop_areas.search_no_results')
diff --git a/app/views/routing_constraint_zones/edit.html.slim b/app/views/routing_constraint_zones/edit.html.slim
index d0e0ded32..2c23344df 100644
--- a/app/views/routing_constraint_zones/edit.html.slim
+++ b/app/views/routing_constraint_zones/edit.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'itl',
t('.title', routing_constraint_zone: @routing_constraint_zone.name),
'',
t('last_update', time: l(@routing_constraint_zone.updated_at, format: :short))
diff --git a/app/views/routing_constraint_zones/index.html.slim b/app/views/routing_constraint_zones/index.html.slim
index 6b3e73096..d7e15a2da 100644
--- a/app/views/routing_constraint_zones/index.html.slim
+++ b/app/views/routing_constraint_zones/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'itl',
t('routing_constraint_zones.index.title'),
'',
'',
diff --git a/app/views/routing_constraint_zones/new.html.slim b/app/views/routing_constraint_zones/new.html.slim
index 4e792f8af..1ed65335f 100644
--- a/app/views/routing_constraint_zones/new.html.slim
+++ b/app/views/routing_constraint_zones/new.html.slim
@@ -1,6 +1,6 @@
/ PageHeader
-= pageheader 'map-marker',
- t('.title')
+= pageheader 'itl',
+ t('.title')
/ PageContent
.page_content
@@ -12,7 +12,7 @@
.row
.col-lg-12
= form.input :name
- = form.input :route_id, collection: @line.routes, include_blank: false, input_html: {data: {url: new_referential_line_routing_constraint_zone_path(@referential, @line), object: @routing_constraint_zone.to_json }}
+ = form.input :route_id, collection: @line.routes, include_blank: false, input_html: { class: 'new_routing_constraint_zone_route', data: {url: new_referential_line_routing_constraint_zone_path(@referential, @line), object: @routing_constraint_zone.to_json }}
.separator
diff --git a/app/views/routing_constraint_zones/show.html.slim b/app/views/routing_constraint_zones/show.html.slim
index 07b5ac6e6..b5aa199c6 100644
--- a/app/views/routing_constraint_zones/show.html.slim
+++ b/app/views/routing_constraint_zones/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'itl',
@routing_constraint_zone.name,
'',
t('last_update', time: l(@routing_constraint_zone.updated_at, format: :short)) do
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 56ecbf6da..dc90def50 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'synchro-icar',
t('.title'),
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@stop_area_referential.updated_at, format: :short)),
@@ -37,6 +37,6 @@
td.text-center
.fa.fa-circle class="text-#{criticity_class(log.criticity)}"
td
- - data = log.message_attributs.symbolize_keys!
+ - data = log.message_attributes.symbolize_keys!
- data[:processing_time] = distance_of_time_in_words(data[:processing_time].to_i)
- = t("stop_area_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!).html_safe
+ = t("stop_area_referential_sync.message.#{log.message_key}", log.message_attributes.symbolize_keys!).html_safe
diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim
index adb023633..795c773ec 100644
--- a/app/views/stop_areas/index.html.slim
+++ b/app/views/stop_areas/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'arret',
t('stop_areas.index.title'),
'',
'',
diff --git a/app/views/stop_areas/show.html.slim b/app/views/stop_areas/show.html.slim
index 05f66a33a..dce5bdbad 100644
--- a/app/views/stop_areas/show.html.slim
+++ b/app/views/stop_areas/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'arret',
@stop_area.name,
'Lorem ipsum dolor sit amet'
diff --git a/app/views/time_table_combinations/_form.html.slim b/app/views/time_table_combinations/_form.html.slim
index b4f818828..8e2d77d46 100644
--- a/app/views/time_table_combinations/_form.html.slim
+++ b/app/views/time_table_combinations/_form.html.slim
@@ -7,7 +7,7 @@
abbr title='Champ requis' *
= f.input :combined_type, as: :boolean, checked_value: 'time_table', unchecked_value: 'calendar', required: false, label: content_tag(:span, t("time_table_combinations.combined_type.#{@combination.combined_type}"), class: 'switch-label', data: { checkedValue: 'Calendriers', uncheckedValue: 'Modèles de calendriers' }), wrapper_html: { class: 'col-sm-8 col-xs-7' }
- = f.input :time_table_id, as: :select, input_html: {class: 'tt_combination_target', style: "width: 100%", data: { 'select2-ajax': 'true', 'select2ed-placeholder': 'Indiquez un calendrier...', term: 'comment_or_objectid_cont', url: referential_autocomplete_time_tables_path(@referential, format: :json)}}, wrapper_html: {class: @combination.combined_type != 'time_table' ? 'hidden' : ''}
+ = f.input :time_table_id, as: :select, input_html: {class: 'tt_combination_target', style: "width: 100%", data: { 'select2-ajax': 'true', 'select2ed-placeholder': 'Indiquez un calendrier...', term: 'comment_cont_or_objectid_cont', url: referential_autocomplete_time_tables_path(@referential, format: :json, :source_id => @combination.source_id)}}, wrapper_html: {class: @combination.combined_type != 'time_table' ? 'hidden' : ''}
= f.input :calendar_id, as: :select, input_html: { class: 'tt_combination_target', style: "width: 100%", data: { 'select2-ajax': 'true', 'select2ed-placeholder': 'Indiquez un modèle de calendrier...', term: 'name_cont', url: autocomplete_calendars_path}}, wrapper_html: {class: @combination.combined_type != 'calendar' ? 'hidden' : ''}
diff --git a/app/views/time_tables/_filter.html.slim b/app/views/time_tables/_filter.html.slim
index 392dc4f50..043aa87d0 100644
--- a/app/views/time_tables/_filter.html.slim
+++ b/app/views/time_tables/_filter.html.slim
@@ -20,4 +20,4 @@
.actions
= link_to 'Effacer', @workbench, class: 'btn btn-link'
- = f.submit 'Filtrer', class: 'btn btn-default'
+ = f.submit 'Filtrer', class: 'btn btn-default', id: 'time_table_filter_btn'
diff --git a/app/views/time_tables/edit.html.slim b/app/views/time_tables/edit.html.slim
index f129cd63a..ed55dc4e3 100644
--- a/app/views/time_tables/edit.html.slim
+++ b/app/views/time_tables/edit.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'calendrier-application',
@time_table.comment,
'',
''
@@ -10,6 +10,7 @@
#periods
= javascript_tag do
- | window.actionType = "#{raw params[:action]}"
+ | window.actionType = "#{raw params[:action]}";
+ | window.I18n = #{(I18n.backend.send(:translations).to_json).html_safe};
= javascript_include_tag 'es6_browserified/time_tables/index.js'
diff --git a/app/views/time_tables/index.html.slim b/app/views/time_tables/index.html.slim
index 72c025bc1..05be460d4 100644
--- a/app/views/time_tables/index.html.slim
+++ b/app/views/time_tables/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'calendrier-application',
t('time_tables.index.title'),
'',
((policy(Chouette::TimeTable).create? && @referential.organisation == current_organisation) ? link_to(t('actions.add'), new_referential_time_table_path(@referential), class: 'btn btn-default') : '')
@@ -62,3 +62,6 @@
.row.mt-xs
.col-lg-12
= replacement_msg t('time_tables.search_no_results')
+
+= javascript_tag do
+ | window.I18n = #{(I18n.backend.send(:translations).to_json).html_safe};
diff --git a/app/views/time_tables/new.html.slim b/app/views/time_tables/new.html.slim
index 8d72f49b6..8a6930b9c 100644
--- a/app/views/time_tables/new.html.slim
+++ b/app/views/time_tables/new.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'calendrier-application',
t("time_tables.#{params[:action]}.title"),
'',
''
diff --git a/app/views/time_tables/show.html.slim b/app/views/time_tables/show.html.slim
index 36b79cc25..021b55058 100644
--- a/app/views/time_tables/show.html.slim
+++ b/app/views/time_tables/show.html.slim
@@ -2,7 +2,7 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'calendrier-application',
@time_table.comment,
'',
t('last_update', time: l(@time_table.updated_at, format: :short)),
diff --git a/app/views/vehicle_journeys/index.html.slim b/app/views/vehicle_journeys/index.html.slim
index 93f4e3221..4efc34eaa 100644
--- a/app/views/vehicle_journeys/index.html.slim
+++ b/app/views/vehicle_journeys/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'horaires-des-courses',
t('vehicle_journeys.index.title', route: @route.name ),
'Lorem ipsum dolor sit amet',
'' do
diff --git a/app/views/workbenches/_filters.html.slim b/app/views/workbenches/_filters.html.slim
index d7ac79577..8da629e9c 100644
--- a/app/views/workbenches/_filters.html.slim
+++ b/app/views/workbenches/_filters.html.slim
@@ -1,24 +1,24 @@
= search_form_for @q_for_form, url: workbench_path(@workbench.id), builder: SimpleForm::FormBuilder, class: 'form form-filter' do |f|
.ffg-row
.input-group.search_bar
- = f.search_field :name_cont, class: 'form-control', placeholder: 'Indiquez un nom de référentiel...'
+ = f.search_field :name_cont, class: 'form-control', placeholder: t('referentials.filters.name')
span.input-group-btn
button.btn.btn-default type='submit'
span.fa.fa-search
.ffg-row
.form-group
- = f.label 'Ligne', required: false, class: 'control-label'
- = f.input :associated_lines_id_eq, as: :select, collection: @workbench.lines.includes(:company).order(:name), input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Indiquez une ligne...' }, label: false, label_method: :display_name, wrapper_html: { class: 'select2ed'}
+ = f.label t('activerecord.models.line.one').upcase, required: false, class: 'control-label'
+ = f.input :associated_lines_id_eq, as: :select, collection: @workbench.lines.includes(:company).order(:name), input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': t('referentials.filters.line') }, label: false, label_method: :display_name, wrapper_html: { class: 'select2ed'}
.form-group.togglable
= f.label Referential.human_attribute_name(:status), required: false, class: 'control-label'
.form-group.checkbox_list
- = f.input :archived_at_not_null, label: ("<span>Conservé<span class='fa fa-archive'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
- = f.input :archived_at_null, label: ("<span>En préparation<span class='sb sb-lg sb-preparing'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
+ = f.input :archived_at_not_null, label: ("<span>#{t('activerecord.attributes.referential.archived_at')}<span class='fa fa-archive'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
+ = f.input :archived_at_null, label: ("<span>#{t('activerecord.attributes.referential.archived_at_null')}<span class='sb sb-lg sb-preparing'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
.form-group.togglable
- = f.label 'Organisation(s)', required: false, class: 'control-label'
+ = f.label t('activerecord.models.organisation.one'), required: false, class: 'control-label'
= f.input :organisation_name_eq_any, collection: Organisation.order('name').pluck(:name), as: :check_boxes, label: false, label_method: lambda{|w| ("<span>#{w}</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
.form-group.togglable
@@ -29,5 +29,5 @@
= p.input :end_lteq, as: :date, label: t('simple_form.to'), wrapper_html: { class: 'date smart_date filter_menu-item' }, default: @end_range, include_blank: @end_range ? false : true
.actions
- = link_to 'Effacer', @workbench, class: 'btn btn-link'
- = f.submit 'Filtrer', class: 'btn btn-default'
+ = link_to t('actions.erase'), @workbench, class: 'btn btn-link'
+ = f.submit t('actions.filter'), class: 'btn btn-default', id: 'referential_filter_btn'
diff --git a/app/views/workbenches/index.html.slim b/app/views/workbenches/index.html.slim
index ca61d439d..54d50d114 100644
--- a/app/views/workbenches/index.html.slim
+++ b/app/views/workbenches/index.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'tableau-de-bord',
t('.title', organisation: current_organisation.name)
/ PageContent
diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim
index bb8b71ab2..8d924b360 100644
--- a/app/views/workbenches/show.html.slim
+++ b/app/views/workbenches/show.html.slim
@@ -1,5 +1,5 @@
/ PageHeader
-= pageheader 'map-marker',
+= pageheader 'jeux-de-donnees',
t('referentials.index.title'),
'',
'' do
@@ -7,8 +7,8 @@
/ Below is secundary actions & optional contents (filters, ...)
.row.mb-sm
.col-lg-12.text-right
- = link_to t('actions.import'), workbench_imports_path(@workbench), class: 'btn btn-primary'
- if policy(Referential).create?
+ = link_to t('actions.import'), workbench_imports_path(@workbench), class: 'btn btn-primary'
= link_to t('actions.add'), new_referential_path(workbench_id: @workbench), class: 'btn btn-primary'
/ PageContent
@@ -31,7 +31,7 @@
), \
TableBuilderHelper::Column.new( \
key: :status, \
- attribute: Proc.new {|w| w.archived? ? ("<div class='td-block'><span class='fa fa-archive'></span><span>Conservé</span></div>").html_safe : ("<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>En préparation</span></div>").html_safe} \
+ attribute: Proc.new {|w| w.archived? ? ("<div class='td-block'><span class='fa fa-archive'></span><span>#{t('activerecord.attributes.referential.archived_at')}</span></div>").html_safe : ("<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>#{t('activerecord.attributes.referential.archived_at_null')}</span></div>").html_safe} \
), \
TableBuilderHelper::Column.new( \
key: :organisation, \
@@ -43,7 +43,7 @@
), \
TableBuilderHelper::Column.new( \
key: :lines, \
- name: 'Nb lignes', \
+ name: t('activerecord.attributes.referential.number_of_lines'), \
attribute: Proc.new {|w| w.lines.count} \
), \
TableBuilderHelper::Column.new( \
@@ -71,3 +71,6 @@
.row.mt-xs
.col-lg-12
= replacement_msg t('referentials.search_no_results')
+
+= javascript_tag do
+ | window.I18n = #{(I18n.backend.send(:translations).to_json).html_safe};