aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/line_referentials/show.html.slim24
-rw-r--r--app/views/stop_area_referentials/show.html.slim22
2 files changed, 25 insertions, 21 deletions
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index 406da8fee..95f097fc8 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -25,17 +25,19 @@
h3 Historique des synchronisations
ul.list-group width="75%"
- - @line_referential.line_referential_syncs.each do |sync|
- - unless sync.line_referential_sync_messages.empty?
- - sync.line_referential_sync_messages.last.tap do |log|
- - if log.criticity = log.criticity
- li.alert class="alert-#{log.criticity}"
- strong = l(log.created_at, format: :short) + " : "
- / [:processing_time] unit conversion
- - 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!)
+ - @line_referential.line_referential_syncs.each_with_index do |sync, i|
+ / Display only 10 msgs
+ - if i < 10
+ - unless sync.line_referential_sync_messages.empty?
+ - sync.line_referential_sync_messages.last.tap do |log|
+ - if log.criticity = log.criticity
+ li.alert class="alert-#{log.criticity}"
+ strong = l(log.created_at, format: :short) + " : "
+ / [:processing_time] unit conversion
+ - 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!)
- content_for :sidebar do
ul.actions
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 9cceed5e5..907cdb168 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -13,17 +13,19 @@
h3 Historique des synchronisations
ul.list-group width="75%"
- - @stop_area_referential.stop_area_referential_syncs.each do |sync|
- - unless sync.stop_area_referential_sync_messages.empty?
- - sync.stop_area_referential_sync_messages.last.tap do |log|
- - if log.criticity = log.criticity
- li.alert class="alert-#{log.criticity}"
- strong = l(log.created_at, format: :short) + " : "
- / [:processing_time] unit conversion
- - data = log.message_attributs.symbolize_keys!
- - data[:processing_time] = distance_of_time_in_words(data[:processing_time].to_i)
+ - @stop_area_referential.stop_area_referential_syncs.each_with_index do |sync, i|
+ / Display only 10 msgs
+ - if i < 10
+ - unless sync.stop_area_referential_sync_messages.empty?
+ - sync.stop_area_referential_sync_messages.last.tap do |log|
+ - if log.criticity = log.criticity
+ li.alert class="alert-#{log.criticity}"
+ strong = l(log.created_at, format: :short) + " : "
+ / [:processing_time] unit conversion
+ - 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!)
+ = t("stop_area_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
- content_for :sidebar do
ul.actions