aboutsummaryrefslogtreecommitdiffstats
path: root/config/breadcrumbs.rb
blob: d2edb7d5ec6735ab2a045d955fb012b25ffe4064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
crumb :root do
  link I18n.t('layouts.home'), root_path
end

crumb :workbench do |workbench|
  link workbench.name, workbench_path(workbench)
end

crumb :workbench_configure do |workbench|
  link I18n.t('workbenches.edit.title'), edit_workbench_path(workbench)
  parent :workbench, workbench
end

crumb :workbench_output do |workbench|
  link I18n.t('workbench_outputs.show.title'), workbench_output_path(workbench)
  parent :workbench, mutual_workbench(workbench)
end

crumb :merges do |workbench|
  link I18n.t('merges.index.title'), workbench_output_path(workbench)
  parent :workbench, workbench
end

crumb :merge do |merge|
  link breadcrumb_name(merge), workbench_merge_path(merge.workbench, merge)
  parent :merges, merge.workbench
end

crumb :referential do |referential|
  link breadcrumb_name(referential), referential_path(referential)
  parent :workbench, mutual_workbench(referential.workbench)
end

crumb :referentials do |referential|
  link I18n.t('referentials.index.title'), workbench_path(current_workbench)
  parent :workbench, mutual_workbench(current_workbench)
end

crumb :referential_companies do |referential|
  link I18n.t('companies.index.title'), referential_companies_path(referential)
  parent :referential, referential
end

crumb :referential_company do |referential, company|
  link breadcrumb_name(company), referential_company_path(referential, company)
  parent :referential_companies, referential
end

crumb :referential_networks do |referential|
  link I18n.t('networks.index.title'), referential_networks_path
  parent :referential, referential
end

crumb :referential_network do |referential, network|
  link  breadcrumb_name(network), referential_network_path(referential, network)
  parent :referential_networks, referential
end

crumb :referential_group_of_lines do |referential|
  link I18n.t('group_of_lines.index.title'), referential_networks_path(referential)
  parent :referential, referential
end

crumb :referential_group_of_line do |referential, group_of_line|
  link  breadcrumb_name(group_of_line), referential_group_of_line_path(referential, group_of_line)
  parent :referential_group_of_lines, referential
end

crumb :referential_vehicle_journeys do |referential|
  link I18n.t('referential_vehicle_journeys.index.title'), referential_vehicle_journeys_path(referential)
  parent :referential, referential
end

crumb :time_tables do |referential|
  link I18n.t('time_tables.index.title'), referential_time_tables_path(referential)
  parent :referential, referential
end

crumb :time_table do |referential, time_table|
  link breadcrumb_name(time_table, 'comment'), referential_time_table_path(referential, time_table)
  parent :time_tables, referential
end

crumb :timebands do |referential|
  link I18n.t('timebands.index.title'), referential_timebands_path(referential)
  parent :referential, referential
end

crumb :timeband do |referential, timeband|
  link breadcrumb_name(timeband), referential_timeband_path(referential, timeband)
  parent :timebands, referential
end

crumb :compliance_check_sets do |workbench|
  link I18n.t('compliance_check_sets.index.title'), workbench_compliance_check_sets_path(workbench)
  parent :workbench, workbench
end

crumb :compliance_check_set do |workbench, compliance_check_set|
  link breadcrumb_name(compliance_check_set), workbench_compliance_check_set_path(workbench, compliance_check_set)
  parent :compliance_check_sets, workbench
end

crumb :compliance_check do |workbench, compliance_check|
  link breadcrumb_name(compliance_check), workbench_compliance_check_set_compliance_check_path(workbench, compliance_check.compliance_check_set, compliance_check)
  parent :compliance_check_set_executed, workbench, compliance_check.compliance_check_set
end

crumb :compliance_check_set_executed do |workbench, compliance_check_set|
  link I18n.t('compliance_check_sets.executed.title', name: compliance_check_set.name), executed_workbench_compliance_check_set_path(workbench, compliance_check_set)
  parent :compliance_check_sets, workbench
end

crumb :imports do |workbench|
  link I18n.t('imports.index.title'), workbench_imports_path(workbench)
  parent :workbench, workbench
end

crumb :exports do |workbench|
  link I18n.t('exports.index.title'), workbench_exports_path(workbench)
  parent :workbench, workbench
end

crumb :import do |workbench, import|
  link breadcrumb_name(import), workbench_import_path(workbench, import)
  parent :imports, workbench
end

crumb :netex_import do |workbench, netex_import|
  link breadcrumb_name(netex_import), workbench_import_path(workbench, netex_import)
  parent :import, workbench, netex_import.parent
end

crumb :gtfs_import do |workbench, gtfs_import|
  link breadcrumb_name(gtfs_import), workbench_import_path(workbench, gtfs_import)
  parent :import, workbench, gtfs_import.parent
end

crumb :export do |workbench, export|
  link breadcrumb_name(export), workbench_export_path(workbench, export)
  parent :exports, workbench
end

crumb :import_resources do |import, import_resources|
  link I18n.t('import.resources.index.title'), workbench_import_import_resources_path(import.workbench, import.parent)
  parent :import, import.workbench, import.parent
end

crumb :import_resource do |import_resource|
  link I18n.t('import.resources.index.title'), workbench_import_import_resource_path(import_resource.root_import.workbench, import_resource.root_import, import_resource)
  parent :import, import_resource.root_import.workbench, import_resource.root_import
end

crumb :organisation do |organisation|
  link breadcrumb_name(organisation), organisation_path(organisation)
end

crumb :compliance_control_sets do
  link I18n.t('compliance_control_sets.index.title'), compliance_control_sets_path
end

crumb :compliance_control_set do |compliance_control_set|
  link breadcrumb_name(compliance_control_set), compliance_control_set_path(compliance_control_set)
  parent :compliance_control_sets
end

crumb :compliance_control do |compliance_control|
  link breadcrumb_name(compliance_control), compliance_control_set_compliance_control_path(compliance_control.compliance_control_set, compliance_control)
  parent :compliance_control_set, compliance_control.compliance_control_set
end

crumb :stop_area_referential do |stop_area_referential|
  link I18n.t('stop_area_referentials.show.title'), stop_area_referential_path(stop_area_referential)
end

crumb :stop_areas do |stop_area_referential|
  link I18n.t('stop_areas.index.title'), stop_area_referential_stop_areas_path(stop_area_referential)
end

crumb :stop_area do |stop_area_referential, stop_area|
  link breadcrumb_name(stop_area), stop_area_referential_stop_area_path(stop_area_referential, stop_area)
  parent :stop_areas, stop_area_referential
end

crumb :line_referential do |line_referential|
  link I18n.t('line_referentials.show.title'), line_referential_path(line_referential)
end

crumb :companies do |line_referential|
  link I18n.t('companies.index.title'), line_referential_companies_path(line_referential)
end

crumb :company do |company|
  link breadcrumb_name(company), line_referential_company_path(company.line_referential, company)
  parent :companies, company.line_referential
end

crumb :networks do |line_referential|
  link I18n.t('networks.index.title'), line_referential_networks_path(line_referential)
end

crumb :network do |network|
  link breadcrumb_name(network), line_referential_network_path(network.line_referential, network)
  parent :networks, network.line_referential
end

crumb :group_of_lines do |line_referential|
  link I18n.t('group_of_lines.index.title'), line_referential_group_of_lines_path(line_referential)
end

crumb :group_of_line do |group_of_line|
  link breadcrumb_name(group_of_line), line_referential_group_of_line_path(group_of_line.line_referential, group_of_line)
  parent :group_of_lines, group_of_line.line_referential
end

crumb :lines do |line_referential|
  link I18n.t('lines.index.title'), line_referential_lines_path
end

crumb :line do |line|
  link breadcrumb_name(line), line_referential_line_path(line.line_referential, line)
  parent :lines, line.line_referential
end

crumb :purchase_windows do |referential|
  link I18n.t('purchase_windows.index.title'), referential_purchase_windows_path(referential)
  parent :referential, referential
end

crumb :purchase_window do |referential, purchase_window|
  link breadcrumb_name(purchase_window), referential_purchase_window_path(referential, purchase_window)
  parent :purchase_windows, referential
end

crumb :calendars do |workgroup|
  link I18n.t('calendars.index.title'), workgroup_calendars_path(workgroup)
end

crumb :calendar do |workgroup, calendar|
  link breadcrumb_name(calendar), workgroup_calendar_path(workgroup, calendar)
  parent :calendars, workgroup
end

crumb :referential_line do |referential, line|
  link breadcrumb_name(line), referential_line_path(referential, line)
  parent :referential, referential
end

crumb :line_footnotes do |referential, line|
  link breadcrumb_name(line), referential_line_footnotes_path(referential, line)
  parent :referential_line, referential, line
end

crumb :routing_constraint_zones do |referential, line|
  link I18n.t('routing_constraint_zones.index.title'), referential_line_routing_constraint_zones_path(referential, line)
  parent :referential_line, referential, line
end

crumb :routing_constraint_zone do |referential, line, routing_constraint_zone|
  link breadcrumb_name(routing_constraint_zone), referential_line_routing_constraint_zone_path(referential, line, routing_constraint_zone)
  parent :routing_constraint_zones, referential, line
end

crumb :route do |referential, route|
  link I18n.t('routes.index.title', route: route.name), referential_line_route_path(referential, route.line, route)
  parent :referential_line, referential, route.line
end

crumb :journey_patterns do |referential, route|
  link I18n.t('journey_patterns.index.title', route: route.name), referential_line_route_journey_patterns_collection_path(referential, route.line, route)
  parent :route, referential, route
end

crumb :vehicle_journeys do |referential, route|
  link I18n.t('vehicle_journeys.index.title', route: route.name), referential_line_route_vehicle_journeys_path(referential, route.line, route)
  parent :route, referential, route
end

crumb :workgroup do |w|
  link I18n.t('workgroups.edit.title')
end

# crumb :compliance_controls do|compliance_control_sets|
#   link
#   parent :compliance_control_sets, compliance_control_sets
# end

# crumb :project do |project|
#   link project.name, project_path(project)
#   parent :projects
# end

# crumb :project_issues do |project|
#   link "Issues", project_issues_path(project)
#   parent :project, project
# end

# crumb :issue do |issue|
#   link issue.title, issue_path(issue)
#   parent :project_issues, issue.project
# end

# If you want to split your breadcrumbs configuration over multiple files, you
# can create a folder named `config/breadcrumbs` and put your configuration
# files there. All *.rb files (e.g. `frontend.rb` or `products.rb`) in that
# folder are loaded and reloaded automatically when you change them, just like
# this file (`config/breadcrumbs.rb`).