aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpl2017-02-15 17:35:05 +0100
committerjpl2017-02-15 17:35:13 +0100
commit7c177daaa3c3ad6320701e753d725b26d16ffb49 (patch)
tree6a96c6b94bdd13a3ed6f7d421631e9ccf47244fc
parent0b6ea7a154810d5e74a2ee2753067e56d4c2927f (diff)
downloadchouette-core-7c177daaa3c3ad6320701e753d725b26d16ffb49.tar.bz2
Refs #2609: updating reflex objects index, and sync pages
-rw-r--r--app/assets/stylesheets/components/_forms.sass15
-rw-r--r--app/views/line_referentials/show.html.slim6
-rw-r--r--app/views/stop_area_referentials/show.html.slim6
-rw-r--r--app/views/stop_areas/_filters.html.slim4
-rw-r--r--app/views/stop_areas/index.html.slim14
-rw-r--r--config/locales/enumerize.en.yml12
-rw-r--r--config/locales/enumerize.fr.yml12
7 files changed, 38 insertions, 31 deletions
diff --git a/app/assets/stylesheets/components/_forms.sass b/app/assets/stylesheets/components/_forms.sass
index 55722cc62..6e25b9440 100644
--- a/app/assets/stylesheets/components/_forms.sass
+++ b/app/assets/stylesheets/components/_forms.sass
@@ -150,7 +150,8 @@ $cbx-size: 20px
> .form-group
border-right: 1px solid #fff
margin: 0
- min-height: 42px
+ min-height: 44px
+ padding: 5px 15px
.control-label
font-weight: 700
@@ -163,6 +164,7 @@ $cbx-size: 20px
> .form-control
display: inline-block
width: auto
+ vertical-align: top
> .actions
position: absolute
@@ -197,13 +199,14 @@ $cbx-size: 20px
position: relative
&.togglable
- padding-right: 44px
+ padding: 7px 44px 7px 15px
+ // padding-right: 44px
cursor: pointer
> .control-label
cursor: pointer
- visibility: top
- line-height: 42px - 14px
+ vertical-align: top
+ line-height: 44px - 14px
padding: 0
> .form-control
@@ -226,11 +229,11 @@ $cbx-size: 20px
position: absolute
right: 15px
top: 0
- height: 40px
+ height: 44px
width: 15px
color: $blue
text-align: center
- line-height: 40px
+ line-height: 44px
&.open:before
content: '\f077'
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index 56d5ed1ef..5c0df1a71 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -28,8 +28,8 @@
thead
tr
th Synchronisé
- th Message
th Statut
+ th Message
tbody
- @line_referential.line_referential_syncs.each_with_index do |sync, i|
@@ -41,8 +41,8 @@
tr
td = l(log.created_at, format: :short)
td
+ .fa.fa-circle class="text-#{criticity_class(log.criticity)}"
+ td
- data = log.message_attributs.symbolize_keys!
- data[:processing_time] = distance_of_time_in_words(data[:processing_time].to_i)
= t("line_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!).html_safe
- td
- .fa.fa-circle class="text-#{criticity_class(log.criticity)}"
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 90f02728a..24428eea4 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -21,8 +21,8 @@
thead
tr
th Synchronisé
- th Message
th Statut
+ th Message
tbody
- @stop_area_referential.stop_area_referential_syncs.each_with_index do |sync, i|
@@ -34,8 +34,8 @@
tr
td = l(log.created_at, format: :short)
td
+ .fa.fa-circle class="text-#{criticity_class(log.criticity)}"
+ td
- data = log.message_attributs.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
- td
- .fa.fa-circle class="text-#{criticity_class(log.criticity)}"
diff --git a/app/views/stop_areas/_filters.html.slim b/app/views/stop_areas/_filters.html.slim
index 1a7b91197..1efa66890 100644
--- a/app/views/stop_areas/_filters.html.slim
+++ b/app/views/stop_areas/_filters.html.slim
@@ -3,7 +3,9 @@
= f.input :city_name_cont, placeholder: t('.city_name'), label: @stop_areas.human_attribute_name(:city_name), required: false
- = f.input :area_type_cont, placeholder: t('.area_type'), label: @stop_areas.human_attribute_name(:area_type), required: false
+ .form-group.togglable
+ = f.label @stop_areas.human_attribute_name(:area_type), required: false, class: 'control-label'
+ = f.input :area_type_eq_any, collection: Chouette::StopArea.area_type.options.sort, as: :check_boxes, label: false, label_method: lambda{|w| ("<span>" + t("enumerize.stop_area.area_type.#{w[1]}") + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
.actions
= link_to 'Effacer', @workbench, class: 'btn btn-link'
diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim
index 908c4e561..7ce6b61b1 100644
--- a/app/views/stop_areas/index.html.slim
+++ b/app/views/stop_areas/index.html.slim
@@ -8,8 +8,8 @@
/ PageContent
.page_content
.container-fluid
- - if @stop_areas.any?
- .row
+ - if params[:q].present? or @stop_areas.any?
+ .row.mb-sm
.col-lg-5.col-md-6.col-sm-6.col-xs-8
= search_form_for @q, url: stop_area_referential_stop_areas_path(@stop_area_referential), html: {method: :get} do |f|
.input-group.search_bar
@@ -21,20 +21,22 @@
.col-lg-7.col-md-6.col-sm-6.col-xs-4.text-right
= new_pagination @stop_areas
-
- .row.mt-sm
+
+ - if @stop_areas.any?
+ .row
.col-lg-12
= render 'filters'
= table_builder @stop_areas,
- { 'Oid' => Proc.new { |n| n.try(:objectid).try(:local_id) }, @stop_areas.human_attribute_name(:name) => 'name', @stop_areas.human_attribute_name(:registration_number) => 'registration_number', @stop_areas.human_attribute_name(:city_name) => 'city_name', @stop_areas.human_attribute_name(:zip_code) => 'zip_code' },
+ { 'Oid' => Proc.new { |n| n.try(:objectid).try(:local_id) }, @stop_areas.human_attribute_name(:name) => 'name', @stop_areas.human_attribute_name(:registration_number) => 'registration_number', @stop_areas.human_attribute_name(:zip_code) => 'zip_code',
+ @stop_areas.human_attribute_name(:city_name) => 'city_name', @stop_areas.human_attribute_name(:area_type) => Proc.new{|s| t("enumerize.stop_area.area_type.#{s.try(:area_type)}")} },
[:show, :edit, :delete],
[],
'table'
= new_pagination @stop_areas, 'pull-right'
- - else
+ - unless @stop_areas.any?
.row
.col-lg-12
= replacement_msg t('stop_areas.search_no_results')
diff --git a/config/locales/enumerize.en.yml b/config/locales/enumerize.en.yml
index b42f68003..f98672236 100644
--- a/config/locales/enumerize.en.yml
+++ b/config/locales/enumerize.en.yml
@@ -86,12 +86,12 @@ en:
funicular: Funicular
other: Other
stop_area:
- area_type:
- zdep: ZDEp
- zder: ZDEr
- zdlp: ZDLp
- zdlr: ZDLr
- lda: LDA
+ area_type:
+ zdep: ZDEp
+ zder: ZDEr
+ zdlp: ZDLp
+ zdlr: ZDLr
+ lda: LDA
line:
transport_mode:
interchange: Interchange
diff --git a/config/locales/enumerize.fr.yml b/config/locales/enumerize.fr.yml
index ecfde38bd..9ff4546da 100644
--- a/config/locales/enumerize.fr.yml
+++ b/config/locales/enumerize.fr.yml
@@ -85,12 +85,12 @@ fr:
funicular: Funiculaire
other: Autre
stop_area:
- area_type:
- zdep: ZDEp
- zder: ZDEr
- zdlp: ZDLp
- zdlr: ZDLr
- lda: LDA
+ area_type:
+ zdep: ZDEp
+ zder: ZDEr
+ zdlp: ZDLp
+ zdlr: ZDLr
+ lda: LDA
line:
transport_mode:
interchange: Interconnection