aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXinhui2016-10-07 10:33:00 +0200
committerXinhui2016-10-07 10:33:00 +0200
commit255d8a7d04cc09b221ea8e137b2c906c71f738f1 (patch)
tree5a66dfb6d127862656920a13f416b11e88d99a06
parent09cc957d4552bfc6d17560f9f0d83058fc11d60f (diff)
downloadchouette-core-255d8a7d04cc09b221ea8e137b2c906c71f738f1.tar.bz2
Fix condition templating sync history
-rw-r--r--app/views/line_referentials/show.html.slim18
-rw-r--r--app/views/stop_area_referentials/show.html.slim20
2 files changed, 21 insertions, 17 deletions
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index 793acc7bb..152c919a8 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -25,14 +25,16 @@
h3 Historique des synchronisations
ul.list-group width="75%"
- - @line_referential.line_referential_syncs.last.line_referential_sync_messages.last.tap do |log|
- li
- = log.criticity
- br
- = log.created_at
- br
- = t("line_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
- hr
+ - unless @line_referential.last_sync.line_referential_sync_messages.empty?
+ - @line_referential.last_sync.line_referential_sync_messages.last.tap do |log|
+ li
+ = log.criticity
+ br
+ = log.created_at
+ br
+ = t("line_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
+ hr
+ end
end
- content_for :sidebar do
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 44ed6e4b2..30c7ddd62 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -13,16 +13,18 @@
h3 Historique des synchronisations
ul.list-group width="75%"
- - if @stop_area_referential.last_sync.stop_area_referential_sync_messages.empty?
- - @stop_area_referential.last_sync.stop_area_referential_sync_messages.last.tap do |log|
- li
- = log.criticity
- br
- = log.created_at
- br
- = t("stop_area_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
- hr
+ - unless @stop_area_referential.last_sync.stop_area_referential_sync_messages.empty?
+ - @stop_area_referential.last_sync.stop_area_referential_sync_messages.last.tap do |log|
+ li
+ = log.criticity
+ br
+ = log.created_at
+ br
+ = t("stop_area_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
+ hr
+ end
end
+
- content_for :sidebar do
ul.actions
li = link_to t('stop_area_referentials.actions.sync'), sync_stop_area_referential_path(@stop_area_referential), class: 'sync', method: :post