aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/time_tables/show.rabl
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/time_tables/show.rabl')
-rw-r--r--app/views/time_tables/show.rabl18
1 files changed, 8 insertions, 10 deletions
diff --git a/app/views/time_tables/show.rabl b/app/views/time_tables/show.rabl
index 1e57e069e..a4434c518 100644
--- a/app/views/time_tables/show.rabl
+++ b/app/views/time_tables/show.rabl
@@ -1,26 +1,24 @@
object @time_table
+attributes :id, :comment
node do |tt|
{
time_table_bounding: tt.presenter.time_table_bounding,
- composition_info: tt.presenter.composition_info,
- day_types: %w(monday tuesday wednesday thursday friday saturday sunday).select{ |d| tt.send(d) }.map{ |d| tt.human_attribute_name(d).first(2)}.join('')
+ tags: tt.tags.map(&:name),
+ day_types: %w(monday tuesday wednesday thursday friday saturday sunday).select{ |d| tt.send(d) }.map{ |d| tt.human_attribute_name(d).first(2)}.join(''),
+ current_month: tt.month_inspect(Date.today),
+ periode_range: month_periode_enum(3),
}
end
-attributes :id, :comment
child(:periods, object_root: false) do
- attributes :id, :period_start, :period_end, :position
+ attributes :id, :period_start, :period_end
end
child(:dates, object_root: false) do
- attributes :id, :date, :position, :in_out
+ attributes :id, :date, :in_out
end
child(:calendar) do
- attributes :id, :name, :short_name
-end
-
-child(:tags, object_root: false) do
- attributes :name
+ attributes :id, :name
end