From a2ac534ec3e9bbb34a392dff5ed1a11b7e270461 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Tue, 27 Sep 2016 17:16:05 +0200
Subject: LineReferentialSync status aasm
Refs #1707
---
app/views/line_referentials/show.html.slim | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'app/views')
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index 929eda7dd..df0b2ab36 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -21,13 +21,13 @@
span.badge = @line_referential.lines.size
= link_to Referential.human_attribute_name("lines"), line_referential_lines_path(@line_referential)
-- unless @line_referential.line_referential_sync.line_sync_operations.empty?
- h3 Historique des synchronisations
+/ - unless @line_referential.line_referential_sync.line_sync_operations.empty?
+/ h3 Historique des synchronisations
- ul.list-group width="75%"
- - @line_referential.line_referential_sync.line_sync_operations.each do |sync|
- li = "#{sync.created_at.to_formatted_s(:short)} - #{sync.message}"
+/ ul.list-group width="75%"
+/ - @line_referential.line_referential_sync.line_sync_operations.each do |sync|
+/ li = "#{sync.created_at.to_formatted_s(:short)} - #{sync.message}"
- content_for :sidebar do
ul.actions
- = link_to t('line_referentials.actions.edit'), edit_line_referential_path(@line_referential), class: 'edit'
\ No newline at end of file
+ = link_to t('line_referentials.actions.edit'), edit_line_referential_path(@line_referential), class: 'edit'
--
cgit v1.2.3
From 1d84e1ded90688fee6ad80bb4f53c861552e3b68 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Wed, 28 Sep 2016 17:37:56 +0200
Subject: Templating line_referential_sync_message
Refs #1707
---
app/views/line_referentials/show.html.slim | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
(limited to 'app/views')
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index df0b2ab36..a3dcdf192 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -21,12 +21,21 @@
span.badge = @line_referential.lines.size
= link_to Referential.human_attribute_name("lines"), line_referential_lines_path(@line_referential)
-/ - unless @line_referential.line_referential_sync.line_sync_operations.empty?
-/ h3 Historique des synchronisations
+- unless @line_referential.line_referential_syncs.empty?
+ h3 Historique des synchronisations
-/ ul.list-group width="75%"
-/ - @line_referential.line_referential_sync.line_sync_operations.each do |sync|
-/ li = "#{sync.created_at.to_formatted_s(:short)} - #{sync.message}"
+ ul.list-group width="75%"
+ - @line_referential.line_referential_syncs.each do |sync|
+ - sync.line_referential_sync_messages.each do |log|
+ li
+ = log.criticity
+ br
+ = log.created_at
+ br
+ = t("line_referentials.synchronization.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
+ hr
+ end
+ end
- content_for :sidebar do
ul.actions
--
cgit v1.2.3
From f5a4f5056ccb72d6b097594298581f8bb1400dba Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Thu, 29 Sep 2016 11:43:48 +0200
Subject: Launch sync from interface
Refs #1708
---
app/views/line_referentials/show.html.slim | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'app/views')
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index a3dcdf192..ee78cd378 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -39,4 +39,5 @@
- content_for :sidebar do
ul.actions
- = link_to t('line_referentials.actions.edit'), edit_line_referential_path(@line_referential), class: 'edit'
+ li = link_to t('line_referentials.actions.edit'), edit_line_referential_path(@line_referential), class: 'edit'
+ li = link_to t('line_referentials.actions.sync'), sync_line_referential_path(@line_referential), class: 'sync', method: :post
--
cgit v1.2.3
From 5dedb1352f274113e97a2554d9249e56a865a4bf Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Thu, 29 Sep 2016 15:25:37 +0200
Subject: Add started_at, ended_at, status to stop_area_referential_syncs
Refs #1710
---
app/views/stop_area_referentials/show.html.slim | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'app/views')
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 32fe950dc..761393013 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -9,12 +9,12 @@
span.badge = @stop_area_referential.stop_areas.size
= link_to Referential.human_attribute_name("stop_areas"), stop_area_referential_stop_areas_path(@stop_area_referential)
-- unless @stop_area_referential.stop_area_referential_sync.stop_area_sync_operations.empty?
- h3 Historique des synchronisations
+/ - unless @stop_area_referential.stop_area_referential_sync.stop_area_sync_operations.empty?
+/ h3 Historique des synchronisations
- ul.list-group width="75%"
- - @stop_area_referential.stop_area_referential_sync.stop_area_sync_operations.each do |sync|
- li = "#{sync.created_at.to_formatted_s(:short)} - #{sync.message}"
+/ ul.list-group width="75%"
+/ - @stop_area_referential.stop_area_referential_sync.stop_area_sync_operations.each do |sync|
+/ li = "#{sync.created_at.to_formatted_s(:short)} - #{sync.message}"
- content_for :sidebar do
- ul.actions
\ No newline at end of file
+ ul.actions
--
cgit v1.2.3
From 5a6efc44dd862384b80f6ff48583e9f9229dbaf4 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Thu, 29 Sep 2016 17:58:03 +0200
Subject: Launch reflex:sync from interface
Refs #1712
---
app/views/stop_area_referentials/show.html.slim | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
(limited to 'app/views')
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 761393013..80f98af61 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -9,12 +9,21 @@
span.badge = @stop_area_referential.stop_areas.size
= link_to Referential.human_attribute_name("stop_areas"), stop_area_referential_stop_areas_path(@stop_area_referential)
-/ - unless @stop_area_referential.stop_area_referential_sync.stop_area_sync_operations.empty?
-/ h3 Historique des synchronisations
-
-/ ul.list-group width="75%"
-/ - @stop_area_referential.stop_area_referential_sync.stop_area_sync_operations.each do |sync|
-/ li = "#{sync.created_at.to_formatted_s(:short)} - #{sync.message}"
+- unless @stop_area_referential.stop_area_referential_syncs.empty?
+ h3 Historique des synchronisations
+ ul.list-group width="75%"
+ - @stop_area_referential.stop_area_referential_syncs.each do |sync|
+ - sync.stop_area_referential_sync_messages.each do |log|
+ li
+ = log.criticity
+ br
+ = log.created_at
+ br
+ = t("stop_area_referential_sync.synchronization.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
--
cgit v1.2.3
From dca3de5b0162c374622b17e0893c4360a025c55a Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Fri, 30 Sep 2016 11:33:54 +0200
Subject: Refactoring i18n & templating
Refs #1712
---
app/views/line_referentials/show.html.slim | 18 ++++++++----------
app/views/stop_area_referentials/show.html.slim | 18 ++++++++----------
2 files changed, 16 insertions(+), 20 deletions(-)
(limited to 'app/views')
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index ee78cd378..f4328bfb5 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -25,16 +25,14 @@
h3 Historique des synchronisations
ul.list-group width="75%"
- - @line_referential.line_referential_syncs.each do |sync|
- - sync.line_referential_sync_messages.each do |log|
- li
- = log.criticity
- br
- = log.created_at
- br
- = t("line_referentials.synchronization.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
- hr
- end
+ - @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
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 80f98af61..c9a1b50fa 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -13,16 +13,14 @@
h3 Historique des synchronisations
ul.list-group width="75%"
- - @stop_area_referential.stop_area_referential_syncs.each do |sync|
- - sync.stop_area_referential_sync_messages.each do |log|
- li
- = log.criticity
- br
- = log.created_at
- br
- = t("stop_area_referential_sync.synchronization.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
- hr
- end
+ - @stop_area_referential.stop_area_referential_syncs.last.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
- content_for :sidebar do
ul.actions
--
cgit v1.2.3
From 5d6802c6eb0b78466a6bd1b176bfc380918c2fee Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Mon, 3 Oct 2016 14:27:31 +0200
Subject: Add cancel sync button for testing
---
app/views/line_referentials/show.html.slim | 2 ++
app/views/stop_area_referentials/show.html.slim | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
(limited to 'app/views')
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index f4328bfb5..793acc7bb 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -39,3 +39,5 @@
ul.actions
li = link_to t('line_referentials.actions.edit'), edit_line_referential_path(@line_referential), class: 'edit'
li = link_to t('line_referentials.actions.sync'), sync_line_referential_path(@line_referential), class: 'sync', method: :post
+ - if @line_referential.last_sync && @line_referential.last_sync.can_be_canceled?
+ li = link_to t('line_referentials.actions.cancel_sync'), cancel_sync_line_referential_path(@line_referential), class: 'cancel_sync', method: :post
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index c9a1b50fa..44ed6e4b2 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -13,7 +13,8 @@
h3 Historique des synchronisations
ul.list-group width="75%"
- - @stop_area_referential.stop_area_referential_syncs.last.stop_area_referential_sync_messages.last.tap do |log|
+ - 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
@@ -25,3 +26,5 @@
- 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
+ - if @stop_area_referential.last_sync
+ li = link_to t('stop_area_referentials.actions.cancel_sync'), cancel_sync_stop_area_referential_path(@stop_area_referential), class: 'cancel_sync', method: :post
--
cgit v1.2.3
From 1ad2d20af7cc2d9a7a5fab8375967565a12ef505 Mon Sep 17 00:00:00 2001
From: jpl
Date: Wed, 5 Oct 2016 14:28:36 +0200
Subject: update company views with table builder (helper)
---
app/views/companies/_companies.html.slim | 6 +++---
app/views/referential_companies/index.js.slim | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'app/views')
diff --git a/app/views/companies/_companies.html.slim b/app/views/companies/_companies.html.slim
index bcd471cc7..8891912f0 100644
--- a/app/views/companies/_companies.html.slim
+++ b/app/views/companies/_companies.html.slim
@@ -2,8 +2,8 @@
span.search = t('will_paginate.page_entries_info.search')
= page_entries_info(@companies)
-.companies.paginated_content
- = paginated_content(@companies)
+.companies.paginated_content style="margin-top:20px;"
+ = table_builder @companies, [:name, :edited_at, :published_at, :validity_period, :lines, :transporter, :status], 'table table-bordered'
.pagination
- = will_paginate @companies, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer
\ No newline at end of file
+ = will_paginate @companies, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer
diff --git a/app/views/referential_companies/index.js.slim b/app/views/referential_companies/index.js.slim
index cfb1c719c..3a1739abf 100644
--- a/app/views/referential_companies/index.js.slim
+++ b/app/views/referential_companies/index.js.slim
@@ -1 +1 @@
-| $('#companies').html("= escape_javascript(render('companies'))");
\ No newline at end of file
+/ | $('#companies').html("= escape_javascript(render('companies'))");
--
cgit v1.2.3
From 4b713d8b7b1097838a78d36dae3ec1cfac711349 Mon Sep 17 00:00:00 2001
From: jpl
Date: Thu, 6 Oct 2016 11:55:22 +0200
Subject: adding draper for decorators(companies first)
---
app/views/companies/_companies.html.slim | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'app/views')
diff --git a/app/views/companies/_companies.html.slim b/app/views/companies/_companies.html.slim
index 8891912f0..b9053c8cb 100644
--- a/app/views/companies/_companies.html.slim
+++ b/app/views/companies/_companies.html.slim
@@ -1,9 +1,9 @@
.page_info
span.search = t('will_paginate.page_entries_info.search')
- = page_entries_info(@companies)
+ = page_entries_info @companies
-.companies.paginated_content style="margin-top:20px;"
- = table_builder @companies, [:name, :edited_at, :published_at, :validity_period, :lines, :transporter, :status], 'table table-bordered'
+.companies.paginated_content
+ = table_builder CompanyDecorator.decorate_collection(@companies), [:name, :edited_at, :published_at, :validity_period, :linecount, :transporter, :status], 'table table-bordered'
.pagination
- = will_paginate @companies, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer
+ = will_paginate @companies, container: false, renderer: RemoteBootstrapPaginationLinkRenderer
--
cgit v1.2.3
From 255d8a7d04cc09b221ea8e137b2c906c71f738f1 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Fri, 7 Oct 2016 10:33:00 +0200
Subject: Fix condition templating sync history
---
app/views/line_referentials/show.html.slim | 18 ++++++++++--------
app/views/stop_area_referentials/show.html.slim | 20 +++++++++++---------
2 files changed, 21 insertions(+), 17 deletions(-)
(limited to 'app/views')
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
--
cgit v1.2.3
From 15523ffde84e85595224c3b5ecd7e6fa28256ca4 Mon Sep 17 00:00:00 2001
From: jpl
Date: Fri, 7 Oct 2016 15:29:05 +0200
Subject: adding link builder to table builder
---
app/views/companies/_companies.html.slim | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'app/views')
diff --git a/app/views/companies/_companies.html.slim b/app/views/companies/_companies.html.slim
index b9053c8cb..af7f6d48f 100644
--- a/app/views/companies/_companies.html.slim
+++ b/app/views/companies/_companies.html.slim
@@ -2,8 +2,10 @@
span.search = t('will_paginate.page_entries_info.search')
= page_entries_info @companies
-.companies.paginated_content
- = table_builder CompanyDecorator.decorate_collection(@companies), [:name, :edited_at, :published_at, :validity_period, :linecount, :transporter, :status], 'table table-bordered'
+.companies.paginated_content style="margin-top:20px;"
+ = table_builder CompanyDecorator.decorate_collection(@companies),
+ [:name, :edited_at, :published_at, :validity_period, :linecount, :transporter, :status] ["show", "delete"],
+ 'table table-bordered'
.pagination
= will_paginate @companies, container: false, renderer: RemoteBootstrapPaginationLinkRenderer
--
cgit v1.2.3
From 53099780076f7d5d11155900473c3452bd731a64 Mon Sep 17 00:00:00 2001
From: jpl
Date: Fri, 7 Oct 2016 15:50:37 +0200
Subject: adding link builder to table builder
---
app/views/companies/_companies.html.slim | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'app/views')
diff --git a/app/views/companies/_companies.html.slim b/app/views/companies/_companies.html.slim
index af7f6d48f..a83b3bada 100644
--- a/app/views/companies/_companies.html.slim
+++ b/app/views/companies/_companies.html.slim
@@ -4,7 +4,8 @@
.companies.paginated_content style="margin-top:20px;"
= table_builder CompanyDecorator.decorate_collection(@companies),
- [:name, :edited_at, :published_at, :validity_period, :linecount, :transporter, :status] ["show", "delete"],
+ [:name, :edited_at, :published_at, :validity_period, :linecount, :transporter, :status],
+ ["show", "delete"],
'table table-bordered'
.pagination
--
cgit v1.2.3
From 8bf58bfada05c61dbd773b74e9e6d91f01d3aae1 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Fri, 7 Oct 2016 15:57:34 +0200
Subject: Policy Chouette::StopArea
Refs #1780
---
app/views/stop_areas/_stop_area.html.slim | 10 ++++++----
app/views/stop_areas/index.html.slim | 9 +++++----
app/views/stop_areas/show.html.slim | 9 ++++++---
3 files changed, 17 insertions(+), 11 deletions(-)
(limited to 'app/views')
diff --git a/app/views/stop_areas/_stop_area.html.slim b/app/views/stop_areas/_stop_area.html.slim
index 15f9e4452..39cb09660 100644
--- a/app/views/stop_areas/_stop_area.html.slim
+++ b/app/views/stop_areas/_stop_area.html.slim
@@ -2,11 +2,13 @@
.panel-heading
.panel-title.clearfix
span.pull-right
- = link_to edit_stop_area_referential_stop_area_path(@stop_area_referential, stop_area), class: 'btn btn-default btn-sm' do
- span.fa.fa-pencil
+ - if policy(stop_area).update?
+ = link_to edit_stop_area_referential_stop_area_path(@stop_area_referential, stop_area), class: 'btn btn-default btn-sm' do
+ span.fa.fa-pencil
- = link_to stop_area_referential_stop_area_path(@stop_area_referential, stop_area), method: :delete, :data => { :confirm => t('stop_areas.actions.destroy_confirm') }, class: 'btn btn-danger btn-sm' do
- span.fa.fa-trash-o
+ - if policy(stop_area).destroy?
+ = link_to stop_area_referential_stop_area_path(@stop_area_referential, stop_area), method: :delete, :data => { :confirm => t('stop_areas.actions.destroy_confirm') }, class: 'btn btn-danger btn-sm' do
+ span.fa.fa-trash-o
h5
= link_to([@stop_area_referential, stop_area], class: 'preview', :title => t("area_types.label.#{stop_area.stop_area_type}") + " #{stop_area.name}") do
diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim
index 6a01bdcb3..b6328c6f9 100644
--- a/app/views/stop_areas/index.html.slim
+++ b/app/views/stop_areas/index.html.slim
@@ -8,7 +8,7 @@
.panel-heading
.input-group.col-md-9
= f.text_field :name_cont, placeholder: "#{t('.name')}", class: 'form-control'
-
+
.input-group-btn
button.btn.btn-default type="submit"
i.fa.fa-search
@@ -27,6 +27,7 @@
- content_for :sidebar do
ul.actions
- li = link_to t('stop_areas.actions.new'), new_stop_area_referential_stop_area_path(@stop_area_referential), class: 'add'
- li
- / = link_to t('stop_areas.actions.default_geometry'), default_geometry_referential_stop_areas_path(@stop_area_referential), :method => :put, :class => "calculator"
\ No newline at end of file
+ - if policy(Chouette::StopArea).create?
+ li = link_to t('stop_areas.actions.new'), new_stop_area_referential_stop_area_path(@stop_area_referential), class: 'add'
+
+ / = link_to t('stop_areas.actions.default_geometry'), default_geometry_referential_stop_areas_path(@stop_area_referential), :method => :put, :class => "calculator"
diff --git a/app/views/stop_areas/show.html.slim b/app/views/stop_areas/show.html.slim
index c9d0b67a3..50e535cb5 100644
--- a/app/views/stop_areas/show.html.slim
+++ b/app/views/stop_areas/show.html.slim
@@ -123,9 +123,12 @@ p.after_map
tr
td
ul.actions
- li = link_to t('stop_areas.actions.new'), new_stop_area_referential_stop_area_path(@stop_area_referential), class: 'add'
- li = link_to t('stop_areas.actions.edit'), edit_stop_area_referential_stop_area_path(@stop_area_referential, @stop_area), class: 'edit'
- li = link_to t('stop_areas.actions.destroy'), stop_area_referential_stop_area_path(@stop_area_referential, @stop_area), method: :delete, :data => {:confirm => t('stop_areas.actions.destroy_confirm')}, class: 'remove'
+ - if policy(Chouette::StopArea).new?
+ li = link_to t('stop_areas.actions.new'), new_stop_area_referential_stop_area_path(@stop_area_referential), class: 'add'
+ - if policy(@stop_area).update?
+ li = link_to t('stop_areas.actions.edit'), edit_stop_area_referential_stop_area_path(@stop_area_referential, @stop_area), class: 'edit'
+ - if policy(@stop_area).destroy?
+ li = link_to t('stop_areas.actions.destroy'), stop_area_referential_stop_area_path(@stop_area_referential, @stop_area), method: :delete, :data => {:confirm => t('stop_areas.actions.destroy_confirm')}, class: 'remove'
- if manage_itl #Fixme
--
cgit v1.2.3
From fc25c675b21524d722f3e0e2ae34db43392f1651 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Mon, 10 Oct 2016 10:55:34 +0200
Subject: Line policy
Refs #1780
---
app/views/lines/_line.html.slim | 6 +++---
app/views/lines/show.html.slim | 17 ++++++++++-------
2 files changed, 13 insertions(+), 10 deletions(-)
(limited to 'app/views')
diff --git a/app/views/lines/_line.html.slim b/app/views/lines/_line.html.slim
index 552e9d29b..07275e043 100644
--- a/app/views/lines/_line.html.slim
+++ b/app/views/lines/_line.html.slim
@@ -14,11 +14,11 @@
li
.btn-group
- - if edit
+ - if edit && policy(Chouette::Line).update?
= link_to edit_line_referential_line_path(line.line_referential, line), class: 'btn btn-default btn-sm' do
span.fa.fa-pencil
- - if delete
+ - if delete && policy(Chouette::Line).destroy?
= link_to line_referential_line_path(line.line_referential, line), method: :delete, data: { confirm: t('lines.actions.destroy_confirm') }, class: 'btn btn-danger btn-sm' do
span.fa.fa-trash-o
@@ -50,4 +50,4 @@
= line.human_attribute_name('group_of_line')
= link_to_if( line.group_of_lines.first, line.group_of_lines.first.name, line_referential_group_of_line_path(line.line_referential, line.group_of_lines.first), :title => "#{line.human_attribute_name('group_of_line')} #{line.group_of_lines.first.name}")
- else
- = t('lines.form.several_group_of_lines', :count => line.group_of_lines.count)
\ No newline at end of file
+ = t('lines.form.several_group_of_lines', :count => line.group_of_lines.count)
diff --git a/app/views/lines/show.html.slim b/app/views/lines/show.html.slim
index 590f35a27..af9a72b15 100644
--- a/app/views/lines/show.html.slim
+++ b/app/views/lines/show.html.slim
@@ -131,16 +131,19 @@ h3.routes = t('.itineraries')
- content_for :sidebar do
ul.actions
- li
- = link_to t('lines.actions.new'), new_line_referential_line_path(@line_referential), class: 'add'
- li
- = link_to t('lines.actions.edit'), edit_line_referential_line_path(@line_referential, @line), class: 'edit'
- li
- = link_to t('lines.actions.destroy'), line_referential_line_path(@line_referential, @line), method: :delete, :data => {:confirm => t('lines.actions.destroy_confirm')}, class: 'remove'
+ - if policy(Chouette::Line).create?
+ li
+ = link_to t('lines.actions.new'), new_line_referential_line_path(@line_referential), class: 'add'
+ - if policy(Chouette::Line).update?
+ li
+ = link_to t('lines.actions.edit'), edit_line_referential_line_path(@line_referential, @line), class: 'edit'
+ - if policy(Chouette::Line).destroy?
+ li
+ = link_to t('lines.actions.destroy'), line_referential_line_path(@line_referential, @line), method: :delete, :data => {:confirm => t('lines.actions.destroy_confirm')}, class: 'remove'
- if !@line.hub_restricted? || (@line.hub_restricted? && @line.routes.size < 2)
/ FIXME #825
li
/ = link_to t('routes.actions.new'), new_referential_line_route_path(@referential, @line), class: 'add'
- = creation_tag(@line)
\ No newline at end of file
+ = creation_tag(@line)
--
cgit v1.2.3
From 1cd01cc22e45710adf2efa080662d919daaaeed3 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Mon, 10 Oct 2016 11:25:10 +0200
Subject: GroupOfLine policy
---
app/views/group_of_lines/show.html.slim | 23 +++++++++++++----------
app/views/lines/show.html.slim | 4 ++--
2 files changed, 15 insertions(+), 12 deletions(-)
(limited to 'app/views')
diff --git a/app/views/group_of_lines/show.html.slim b/app/views/group_of_lines/show.html.slim
index c93f5277e..b934cb1ef 100644
--- a/app/views/group_of_lines/show.html.slim
+++ b/app/views/group_of_lines/show.html.slim
@@ -2,7 +2,7 @@
.group_of_line_show
= @map.to_html
-
+
.summary
p
label = "#{@group_of_line.human_attribute_name('registration_number')} : "
@@ -13,19 +13,22 @@
= @group_of_line.comment
p.after_map
-
+
h3.group_of_line_lines = t('.lines')
.lines_detail
- == render partial: "lines_detail"
+ == render partial: "lines_detail"
- content_for :sidebar do
ul.actions
- li
- = link_to t('group_of_lines.actions.new'), new_line_referential_group_of_line_path(@line_referential), class: 'add'
- li
- = link_to t('group_of_lines.actions.edit'), edit_line_referential_group_of_line_path(@line_referential, @group_of_line), class: 'edit'
- li
- = link_to t('group_of_lines.actions.destroy'), line_referential_group_of_line_path(@line_referential, @group_of_line), :method => :delete, :data => {:confirm => t('group_of_lines.actions.destroy_confirm')} , class: 'remove'
+ - if policy(Chouette::GroupOfLine).create?
+ li
+ = link_to t('group_of_lines.actions.new'), new_line_referential_group_of_line_path(@line_referential), class: 'add'
+ - if policy(@group_of_line).edit?
+ li
+ = link_to t('group_of_lines.actions.edit'), edit_line_referential_group_of_line_path(@line_referential, @group_of_line), class: 'edit'
+ - if policy(@group_of_line).destroy?
+ li
+ = link_to t('group_of_lines.actions.destroy'), line_referential_group_of_line_path(@line_referential, @group_of_line), :method => :delete, :data => {:confirm => t('group_of_lines.actions.destroy_confirm')} , class: 'remove'
br
- = creation_tag(@group_of_line)
\ No newline at end of file
+ = creation_tag(@group_of_line)
diff --git a/app/views/lines/show.html.slim b/app/views/lines/show.html.slim
index af9a72b15..cca0e395c 100644
--- a/app/views/lines/show.html.slim
+++ b/app/views/lines/show.html.slim
@@ -134,10 +134,10 @@ h3.routes = t('.itineraries')
- if policy(Chouette::Line).create?
li
= link_to t('lines.actions.new'), new_line_referential_line_path(@line_referential), class: 'add'
- - if policy(Chouette::Line).update?
+ - if policy(@line).update?
li
= link_to t('lines.actions.edit'), edit_line_referential_line_path(@line_referential, @line), class: 'edit'
- - if policy(Chouette::Line).destroy?
+ - if policy(@line).destroy?
li
= link_to t('lines.actions.destroy'), line_referential_line_path(@line_referential, @line), method: :delete, :data => {:confirm => t('lines.actions.destroy_confirm')}, class: 'remove'
--
cgit v1.2.3
From ab695004ec171a5730bf0cd0431084c76986742e Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Mon, 10 Oct 2016 12:35:15 +0200
Subject: Fix views spec pundit
---
app/views/networks/_network.html.slim | 13 +++++++------
app/views/networks/show.html.slim | 17 ++++++++++-------
2 files changed, 17 insertions(+), 13 deletions(-)
(limited to 'app/views')
diff --git a/app/views/networks/_network.html.slim b/app/views/networks/_network.html.slim
index ed216c4c7..94745ca3d 100644
--- a/app/views/networks/_network.html.slim
+++ b/app/views/networks/_network.html.slim
@@ -2,13 +2,14 @@
.panel-heading
.panel-title.clearfix
span.pull-right
- = link_to edit_line_referential_network_path(@line_referential, network), class: 'btn btn-default btn-sm' do
- span.fa.fa-pencil
-
- = link_to line_referential_network_path(@line_referential, network), method: :delete, :data => { :confirm => t('networks.actions.destroy_confirm') }, class: 'btn btn-danger btn-sm' do
- span.fa.fa-trash-o
+ - if policy(network).update?
+ = link_to edit_line_referential_network_path(@line_referential, network), class: 'btn btn-default btn-sm' do
+ span.fa.fa-pencil
+ - if policy(network).destroy?
+ = link_to line_referential_network_path(@line_referential, network), method: :delete, :data => { :confirm => t('networks.actions.destroy_confirm') }, class: 'btn btn-danger btn-sm' do
+ span.fa.fa-trash-o
h5
= link_to [@line_referential, network], class: 'preview', title: "#{Chouette::Network.model_name.human.capitalize} #{network.name}" do
span.name
- = truncate(network.name, :length => 20)
\ No newline at end of file
+ = truncate(network.name, :length => 20)
diff --git a/app/views/networks/show.html.slim b/app/views/networks/show.html.slim
index e6bf4e399..5d5b1cd74 100644
--- a/app/views/networks/show.html.slim
+++ b/app/views/networks/show.html.slim
@@ -36,12 +36,15 @@
- content_for :sidebar do
ul.actions
- li
- = link_to t('networks.actions.new'), new_line_referential_network_path(@line_referential), class: 'add'
- li
- = link_to t('networks.actions.edit'), edit_line_referential_network_path(@line_referential, @network), class: 'edit'
- li
- = link_to t('networks.actions.destroy'), line_referential_network_path(@line_referential, @network), method: :delete, data: { :confirm => t('networks.actions.destroy_confirm')}, class: 'remove'
+ - if policy(Chouette::Network).create?
+ li
+ = link_to t('networks.actions.new'), new_line_referential_network_path(@line_referential), class: 'add'
+ - if policy(@network).update?
+ li
+ = link_to t('networks.actions.edit'), edit_line_referential_network_path(@line_referential, @network), class: 'edit'
+ - if policy(@network).destroy?
+ li
+ = link_to t('networks.actions.destroy'), line_referential_network_path(@line_referential, @network), method: :delete, data: { :confirm => t('networks.actions.destroy_confirm')}, class: 'remove'
br
- = creation_tag(@network)
\ No newline at end of file
+ = creation_tag(@network)
--
cgit v1.2.3
From 765747615d237ffb0953ec86a57ddff54713f912 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Mon, 10 Oct 2016 14:26:37 +0200
Subject: Group of line policy in views
---
app/views/group_of_lines/_group_of_line.html.slim | 8 ++++----
app/views/group_of_lines/index.html.slim | 7 ++++---
app/views/networks/index.html.slim | 7 ++++---
3 files changed, 12 insertions(+), 10 deletions(-)
(limited to 'app/views')
diff --git a/app/views/group_of_lines/_group_of_line.html.slim b/app/views/group_of_lines/_group_of_line.html.slim
index 16ac4e252..fb9f95894 100644
--- a/app/views/group_of_lines/_group_of_line.html.slim
+++ b/app/views/group_of_lines/_group_of_line.html.slim
@@ -2,11 +2,11 @@
.panel-heading
.panel-title.clearfix
span.pull-right
- - if edit
+ - if edit && policy(group_of_line).update?
= link_to edit_line_referential_group_of_line_path(@line_referential, group_of_line), class: 'btn btn-default btn-sm' do
span.fa.fa-pencil
-
- = link_to(''.html_safe, line_referential_group_of_line_path(@line_referential, group_of_line), :method => :delete, :data => {:confirm => t('group_of_lines.actions.destroy_confirm')}, class: 'btn btn-danger btn-sm') if delete
+ - if delete && policy(group_of_line).destroy?
+ = link_to(''.html_safe, line_referential_group_of_line_path(@line_referential, group_of_line), :method => :delete, :data => {:confirm => t('group_of_lines.actions.destroy_confirm')}, class: 'btn btn-danger btn-sm')
h5
= link_to [@line_referential, group_of_line], :class => "preview", :title => "#{Chouette::GroupOfLine.model_name.human.capitalize} #{group_of_line.name}" do
@@ -16,4 +16,4 @@
.panel-body
p
= group_of_line.human_attribute_name('line_count')
- = group_of_line.lines.count
\ No newline at end of file
+ = group_of_line.lines.count
diff --git a/app/views/group_of_lines/index.html.slim b/app/views/group_of_lines/index.html.slim
index 8cd39407f..a684095f0 100644
--- a/app/views/group_of_lines/index.html.slim
+++ b/app/views/group_of_lines/index.html.slim
@@ -19,6 +19,7 @@
- content_for :sidebar do
ul.actions
- li
- = link_to t('group_of_lines.actions.new'), new_line_referential_group_of_line_path(@line_referential), class: 'add'
- br
\ No newline at end of file
+ - if policy(Chouette::GroupOfLine).create?
+ li
+ = link_to t('group_of_lines.actions.new'), new_line_referential_group_of_line_path(@line_referential), class: 'add'
+ br
diff --git a/app/views/networks/index.html.slim b/app/views/networks/index.html.slim
index bc32d273c..587552729 100644
--- a/app/views/networks/index.html.slim
+++ b/app/views/networks/index.html.slim
@@ -18,6 +18,7 @@
- content_for :sidebar do
ul.actions
- li
- = link_to t('networks.actions.new'), new_line_referential_network_path(@line_referential), class: 'add'
- br
\ No newline at end of file
+ - if policy(Chouette::Network).create?
+ li
+ = link_to t('networks.actions.new'), new_line_referential_network_path(@line_referential), class: 'add'
+ br
--
cgit v1.2.3
From 70bf7114e5c02e13487125f3083a3be7e23aa5bb Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Mon, 10 Oct 2016 14:41:34 +0200
Subject: Company policy
Refs #1780
---
app/views/companies/index.html.slim | 7 ++++---
app/views/companies/show.html.slim | 21 ++++++++++++---------
2 files changed, 16 insertions(+), 12 deletions(-)
(limited to 'app/views')
diff --git a/app/views/companies/index.html.slim b/app/views/companies/index.html.slim
index bf295dee7..1b616a6c8 100644
--- a/app/views/companies/index.html.slim
+++ b/app/views/companies/index.html.slim
@@ -20,6 +20,7 @@
- content_for :sidebar do
ul.actions
- li
- = link_to t('companies.actions.new'), new_line_referential_company_path(@line_referential), class: 'add'
- br
\ No newline at end of file
+ - if policy(Chouette::Company).create?
+ li
+ = link_to t('companies.actions.new'), new_line_referential_company_path(@line_referential), class: 'add'
+ br
diff --git a/app/views/companies/show.html.slim b/app/views/companies/show.html.slim
index 693cea352..1c244a53a 100644
--- a/app/views/companies/show.html.slim
+++ b/app/views/companies/show.html.slim
@@ -44,12 +44,15 @@
- content_for :sidebar do
ul.actions
- li
- = link_to t('companies.actions.new'), new_line_referential_company_path(@line_referential), class: 'add'
- li
- = link_to t('companies.actions.edit'), edit_line_referential_company_path(@line_referential, @company), class: 'edit'
- li
- = link_to t('companies.actions.destroy'), line_referential_company_path(@line_referential, @company), :method => :delete, :data => {:confirm => t('companies.actions.destroy_confirm')}, class: 'remove'
- br
-
- = creation_tag(@company)
\ No newline at end of file
+ - if policy(Chouette::Company).create?
+ li
+ = link_to t('companies.actions.new'), new_line_referential_company_path(@line_referential), class: 'add'
+ - if policy(@company).update?
+ li
+ = link_to t('companies.actions.edit'), edit_line_referential_company_path(@line_referential, @company), class: 'edit'
+ - if policy(@company).destroy?
+ li
+ = link_to t('companies.actions.destroy'), line_referential_company_path(@line_referential, @company), :method => :delete, :data => {:confirm => t('companies.actions.destroy_confirm')}, class: 'remove'
+ br
+
+ = creation_tag(@company)
--
cgit v1.2.3
From 4c728e7bfe71f03b30332e99ac4cce0e8e489e63 Mon Sep 17 00:00:00 2001
From: jpl
Date: Mon, 10 Oct 2016 15:32:54 +0200
Subject: updating sync historical views + i18n
---
app/views/line_referentials/show.html.slim | 22 +++++++++-------------
app/views/stop_area_referentials/show.html.slim | 22 +++++++++-------------
2 files changed, 18 insertions(+), 26 deletions(-)
(limited to 'app/views')
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index 152c919a8..ec1ff02d8 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -25,21 +25,17 @@
h3 Historique des synchronisations
ul.list-group width="75%"
- - 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
+ - @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) + " : "
+ = t("line_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
- content_for :sidebar do
ul.actions
li = link_to t('line_referentials.actions.edit'), edit_line_referential_path(@line_referential), class: 'edit'
li = link_to t('line_referentials.actions.sync'), sync_line_referential_path(@line_referential), class: 'sync', method: :post
- - if @line_referential.last_sync && @line_referential.last_sync.can_be_canceled?
- li = link_to t('line_referentials.actions.cancel_sync'), cancel_sync_line_referential_path(@line_referential), class: 'cancel_sync', method: :post
+ - if @line_referential.last_sync && @line_referential.last_sync.can_be_canceled?
+ li = link_to t('line_referentials.actions.cancel_sync'), cancel_sync_line_referential_path(@line_referential), class: 'cancel_sync', method: :post
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 30c7ddd62..625dcada9 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -13,20 +13,16 @@
h3 Historique des synchronisations
ul.list-group width="75%"
- - 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
+ - @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) + " : "
+ = t("stop_area_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!)
- 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
- - if @stop_area_referential.last_sync
- li = link_to t('stop_area_referentials.actions.cancel_sync'), cancel_sync_stop_area_referential_path(@stop_area_referential), class: 'cancel_sync', method: :post
+ - if @stop_area_referential.last_sync
+ li = link_to t('stop_area_referentials.actions.cancel_sync'), cancel_sync_stop_area_referential_path(@stop_area_referential), class: 'cancel_sync', method: :post
--
cgit v1.2.3
From b2001ba74720f7351fa14e84aba96434e18242d1 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Mon, 10 Oct 2016 16:27:49 +0200
Subject: Rename model OfferWorkbench to Workbench
Refs #1783
---
app/views/offer_workbenches/show.html.slim | 4 ++--
app/views/referentials/index.html.slim | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'app/views')
diff --git a/app/views/offer_workbenches/show.html.slim b/app/views/offer_workbenches/show.html.slim
index bed9205ba..49396a0e2 100644
--- a/app/views/offer_workbenches/show.html.slim
+++ b/app/views/offer_workbenches/show.html.slim
@@ -1,5 +1,5 @@
-= title_tag "#{@offer_workbench.name} - Tableau de bord"
+= title_tag "#{@workbench.name} - Tableau de bord"
.referentials.paginated_content
h4 Liste des jeux de données
- = paginated_content @offer_workbench.referentials
\ No newline at end of file
+ = paginated_content @workbench.referentials
diff --git a/app/views/referentials/index.html.slim b/app/views/referentials/index.html.slim
index d9c5376a1..e37f157de 100644
--- a/app/views/referentials/index.html.slim
+++ b/app/views/referentials/index.html.slim
@@ -1,5 +1,5 @@
/ FIXME #827
-- current_organisation.offer_workbenches.each do |workbench|
+- current_organisation.workbenches.each do |workbench|
h2 = link_to workbench.name, workbench
p = "#{workbench.referentials.count} jeu(x) de données à l'heure actuelle"
@@ -22,4 +22,4 @@
/ FIXME #824
/ Don't blame me. See #824
- li = link_to 'Données CodifLigne', line_referential_path(1)
\ No newline at end of file
+ li = link_to 'Données CodifLigne', line_referential_path(1)
--
cgit v1.2.3
From 1e5230e9d3366516763a43197a63da51762282d9 Mon Sep 17 00:00:00 2001
From: jpl
Date: Mon, 10 Oct 2016 17:22:56 +0200
Subject: updating sync historical views + i18n
---
app/views/line_referentials/show.html.slim | 4 ++++
app/views/stop_area_referentials/show.html.slim | 4 ++++
2 files changed, 8 insertions(+)
(limited to 'app/views')
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index ec1ff02d8..0ad88ecc8 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -31,6 +31,10 @@
- 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
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 625dcada9..e9fa17fa6 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -19,6 +19,10 @@
- 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!)
- content_for :sidebar do
--
cgit v1.2.3
From 4655372a601bbdf90d352abe8fefed094b866d69 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Tue, 11 Oct 2016 12:04:46 +0200
Subject: Remove cancel sync link
---
app/views/line_referentials/show.html.slim | 2 --
app/views/stop_area_referentials/show.html.slim | 4 +---
2 files changed, 1 insertion(+), 5 deletions(-)
(limited to 'app/views')
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index 0ad88ecc8..3073c3d5a 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -41,5 +41,3 @@
ul.actions
li = link_to t('line_referentials.actions.edit'), edit_line_referential_path(@line_referential), class: 'edit'
li = link_to t('line_referentials.actions.sync'), sync_line_referential_path(@line_referential), class: 'sync', method: :post
- - if @line_referential.last_sync && @line_referential.last_sync.can_be_canceled?
- li = link_to t('line_referentials.actions.cancel_sync'), cancel_sync_line_referential_path(@line_referential), class: 'cancel_sync', method: :post
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index e9fa17fa6..9cceed5e5 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -22,11 +22,9 @@
/ [: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!)
- 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
- - if @stop_area_referential.last_sync
- li = link_to t('stop_area_referentials.actions.cancel_sync'), cancel_sync_stop_area_referential_path(@stop_area_referential), class: 'cancel_sync', method: :post
--
cgit v1.2.3
From 3c585b26cf7705b371f7798061df7c6c225f381f Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Tue, 11 Oct 2016 14:32:48 +0200
Subject: Reflex:sync - restore cancel button for testing
---
app/views/stop_area_referentials/show.html.slim | 2 ++
1 file changed, 2 insertions(+)
(limited to 'app/views')
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 9cceed5e5..584f53410 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -28,3 +28,5 @@
- 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
+ - if @stop_area_referential.last_sync
+ li = link_to t('stop_area_referentials.actions.cancel_sync'), cancel_sync_stop_area_referential_path(@stop_area_referential), class: 'cancel_sync', method: :post
--
cgit v1.2.3
From ff6467f636ec6976bd00818e5cb986e43d9b4d3b Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Tue, 11 Oct 2016 16:13:48 +0200
Subject: Hide group of line link
Refs #1794
---
app/views/line_referentials/show.html.slim | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'app/views')
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index 3073c3d5a..408a07c2d 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -13,9 +13,9 @@
span.badge = @line_referential.networks.size
= link_to Referential.human_attribute_name("networks"), line_referential_networks_path(@line_referential)
- li.list-group-item
- span.badge = @line_referential.group_of_lines.size
- = link_to Referential.human_attribute_name("group_of_lines"), line_referential_group_of_lines_path(@line_referential)
+ / li.list-group-item
+ / span.badge = @line_referential.group_of_lines.size
+ / = link_to Referential.human_attribute_name("group_of_lines"), line_referential_group_of_lines_path(@line_referential)
li.list-group-item
span.badge = @line_referential.lines.size
--
cgit v1.2.3
From d66abf8f9b58ddeeabc4e53e8ed1fd382b9f1907 Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Wed, 12 Oct 2016 14:36:21 +0200
Subject: Remove cancel sync link
---
app/views/stop_area_referentials/show.html.slim | 2 --
1 file changed, 2 deletions(-)
(limited to 'app/views')
diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim
index 584f53410..9cceed5e5 100644
--- a/app/views/stop_area_referentials/show.html.slim
+++ b/app/views/stop_area_referentials/show.html.slim
@@ -28,5 +28,3 @@
- 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
- - if @stop_area_referential.last_sync
- li = link_to t('stop_area_referentials.actions.cancel_sync'), cancel_sync_stop_area_referential_path(@stop_area_referential), class: 'cancel_sync', method: :post
--
cgit v1.2.3