diff options
| author | Teddy Wing | 2017-09-01 16:47:10 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-09-01 17:22:41 +0200 |
| commit | e115d2cf86c285f66af37aa8ca66d63eb4144294 (patch) | |
| tree | 608476779efc882d7ca6eb459f72c4d90cea0639 /app/views/calendars | |
| parent | 28db706443a912e8355e4c48488dc40c403e7f76 (diff) | |
| download | chouette-core-e115d2cf86c285f66af37aa8ca66d63eb4144294.tar.bz2 | |
table_builder_2: Use `Column#link_to` in all table builder calls
Rewrite table builder calls to work with the new
`TableBuilderHelper::Column#link_to` mechanism for defining the linked
column and what it points to. This takes the link out of the
`TableBuilderHelper`, and puts it into the hands of the view.
It gives us more flexibility with regards to what can be defined as a
link in our tables and what those links point to.
This will be used in a more meaningful way in the `imports#show` page to
list `NetexImport`s and provide links to both the referential associated
with a Netex import and the imported file status page from a table row.
Diffstat (limited to 'app/views/calendars')
| -rw-r--r-- | app/views/calendars/index.html.slim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/calendars/index.html.slim b/app/views/calendars/index.html.slim index 757ade89b..1e38786b9 100644 --- a/app/views/calendars/index.html.slim +++ b/app/views/calendars/index.html.slim @@ -21,7 +21,10 @@ [ \ TableBuilderHelper::Column.new( \ key: :name, \ - attribute: 'name' \ + attribute: 'name', \ + link_to: lambda do |calendar| \ + calendar_path(calendar) \ + end \ ), \ TableBuilderHelper::Column.new( \ key: :short_name, \ |
