aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorBruno Perles2015-10-28 11:35:08 +0100
committerBruno Perles2015-10-28 11:35:08 +0100
commit5b4136b2907ffc918210495d8f9a29c1e7d681fb (patch)
tree6b73ff915c90d450572f5eb9599d3bc0d8938678 /app/helpers
parent843bec92850de6f4b46498611842f894a78e7d3d (diff)
downloadchouette-core-5b4136b2907ffc918210495d8f9a29c1e7d681fb.tar.bz2
Merge Timeband feature and revert Gemfile
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb2
-rw-r--r--app/helpers/breadcrumb_helper.rb8
-rw-r--r--app/helpers/timebands_helper.rb2
3 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 058e30732..37b9d7a63 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -69,6 +69,8 @@ module ApplicationHelper
"connection_links"
when path.include?("/time_tables")
"time_tables"
+ when path.include?("/timebands")
+ "timebands"
when path.include?("/rule_parameter_set")
"parametersets"
when path.include?("/import_tasks")
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb
index fc5721452..cb259baf7 100644
--- a/app/helpers/breadcrumb_helper.rb
+++ b/app/helpers/breadcrumb_helper.rb
@@ -30,6 +30,8 @@ module BreadcrumbHelper
connection_link_breadcrumb action
when "Chouette::TimeTable"
time_table_breadcrumb action
+ when "Chouette::Timeband"
+ timeband_breadcrumb action
when "StopAreaCopy"
stop_area_copy_breadcrumb action
when "Import"
@@ -104,6 +106,12 @@ module BreadcrumbHelper
add_breadcrumb breadcrumb_label(@time_table), referential_time_table_path(@referential, @time_table),:title => breadcrumb_tooltip(@time_table) if action == :edit
end
+ def timeband_breadcrumb(action)
+ referential_breadcrumb
+ add_breadcrumb Chouette::Timeband.model_name.human(:count => 2), referential_timebands_path(@referential) unless action == :index
+ add_breadcrumb breadcrumb_label(@timeband), referential_timeband_path(@referential, @timeband),:title => breadcrumb_tooltip(@timeband) if action == :edit
+ end
+
def line_breadcrumb(action)
referential_breadcrumb
add_breadcrumb Chouette::Line.model_name.human(:count => 2), referential_lines_path(@referential) unless action == :index
diff --git a/app/helpers/timebands_helper.rb b/app/helpers/timebands_helper.rb
new file mode 100644
index 000000000..51251e46f
--- /dev/null
+++ b/app/helpers/timebands_helper.rb
@@ -0,0 +1,2 @@
+module TimebandsHelper
+end