aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/time_tables_controller.rb
AgeCommit message (Collapse)Author
2018-04-17Refs #6549; Fix timetables specs6549-fix-tiletables-specsZog
2018-04-10Refs #6448; Make timetables sortable on bouding_dates and journeys countZog
2018-02-02Refs #5835; Timetables inherit application days from calendars5835-fix-timetable-creationZog
2018-01-25Refs #5586 @1h; Migrate TimeTableDecoratorZog
2017-11-28Refactoring move referentialSupport from chouetteController into childrensXinhui
2017-10-18Remove legacy breadcrumb method in controllersXinhui
Refs #4741
2017-10-17Fix time_tables#index tags form should display searched tags on submitXinhui
Refs #4711
2017-10-03Refs #4665cedricnjanga
Adapt date filters helpers according to this new concern Try to correct build error : "ransack period range undefined" All tests pass on my machine Refs #4661 Remove string column from ComplianceCheckSet
2017-10-02Refs #4665cedricnjanga
Add a controller concern to deal with date filters
2017-08-02Fix date filters for Timetable and workbenchescedricnjanga
2017-07-31Refs #4005 Period filters for time_table and referentialscedricnjanga
2017-07-25Hot fix Timetable#create - from Calendarcedricnjanga
2017-07-24Update Tietable#merge! to manage more edge casescedricnjanga
2017-07-24Check tt_params[:calendar_id] in Timetable#createcedricnjanga
2017-07-21Refs #4134: fix autocomplete on TT edit tagsjpl
2017-07-19Fix errors from JS-formatted templates using the table_builderTeddy Wing
We were getting errors like these: Started GET "/referentials/4/networks?_=1500482065840" for 127.0.0.1 at 2017-07-19 18:34:27 +0200 Processing by ReferentialNetworksController#index as JS Parameters: {"_"=>"1500482065840", "referential_id"=>"4"} User Load (3.6ms) SELECT "public"."users".* FROM "public"."users" WHERE "public"."users"."id" = $1 ORDER BY "public"."users"."id" ASC LIMIT 1 [["id", 1]] locale set to :fr Organisation Load (5.6ms) SELECT "public"."organisations".* FROM "public"."organisations" WHERE "public"."organisations"."id" = $1 LIMIT 1 [["id", 1]] Referential Load (1.0ms) SELECT "public"."referentials".* FROM "public"."referentials" WHERE "public"."referentials"."organisation_id" = $1 AND "public"."referentials"."id" = $2 LIMIT 1 [["organisation_id", 1], ["id", 4]] Workbench Load (0.7ms) SELECT "public"."workbenches".* FROM "public"."workbenches" WHERE "public"."workbenches"."id" = $1 LIMIT 1 [["id", 1]] (1.3ms) SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1 [["id", 1]] CACHE (0.0ms) SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1 [["id", 1]] Chouette::Network Load (2.3ms) SELECT DISTINCT "public"."networks".* FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1 ORDER BY name asc LIMIT 12 OFFSET 0 [["id", 1]] CACHE (0.0ms) SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1 [["id", 1]] Chouette::Network Exists (1.2ms) SELECT 1 AS one FROM "public"."networks" WHERE "public"."networks"."id" = $1 LIMIT 1 [["id", 118]] Rendered referential_networks/index.html.slim (48.9ms) Completed 500 Internal Server Error in 184ms (ActiveRecord: 17.4ms) ActionView::Template::Error (undefined method `action_links' for #<Chouette::Network:0x007ffea2148b08>): 22: - if @networks.any? 23: .row 24: .col-lg-12 25: = table_builder_2 @networks, 26: [ \ 27: TableBuilderHelper::Column.new( \ 28: name: 'ID Codifligne', \ app/helpers/table_builder_helper.rb:161:in `block in build_links' app/helpers/table_builder_helper.rb:158:in `build_links' app/helpers/table_builder_helper.rb:138:in `block (3 levels) in tbody' app/helpers/table_builder_helper.rb:110:in `block (2 levels) in tbody' app/helpers/table_builder_helper.rb:108:in `block in tbody' app/helpers/table_builder_helper.rb:107:in `tbody' app/helpers/table_builder_helper.rb:72:in `table_builder_2' app/views/referential_networks/index.html.slim:25:in `_app_views_referential_networks_index_html_slim___1557411244315414919_70366016986820' app/controllers/referential_networks_controller.rb:27:in `index' Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb (1.8ms) Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb (2.5ms) Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb (76.0ms) on the following pages: - http://stif-boiv.dev:3000/referentials/4/time_tables - http://stif-boiv.dev:3000/line_referentials/1/companies - http://stif-boiv.dev:3000/line_referentials/1/networks - http://stif-boiv.dev:3000/referentials/4/companies - http://stif-boiv.dev:3000/referentials/4/networks This was caused by the request of a JS-formatted view that rendered the HTML template, since the collection decoration only happened in the HTML format section. Do the decoration in both the HTML format and JS format for the relevant controllers in order to eliminate this error. Maybe there's a cleaner way to do this than just duplicating the decoration in both `format.X` blocks, but I don't know of it. Wanted to make sure not to decorate when it wasn't necessary, like when rendering other formats (XML, etc.). Refs #4105
2017-07-19Refs 4131 Change Timetable#create to fetch all Calendars (new_from)cedricnjanga
2017-07-12Remove wild option in timetable tag filtercedricnjanga
2017-07-12#4015 adjust Tag filter to be strictcedricnjanga
2017-07-07TimeTables#index: Use new table builder helperTeddy Wing
Additionally convert the `#human_attribute_name` calls to call it on the class because this is more correct and because that method doesn't exist on the decorated collection of `@time_tables`. TODO: There's a bug here where the #show and #edit links don't link correctly, they go to `/referentials/:id` instead of `/referentials/:id/time_tables/:id`. Refs #3479
2017-07-06Refs:#3478@10h;Robert
Policy Refactoring and Policy Test Completion - All policies (and all permissions) under test. - Common patterns and potential problems identified... - ... and documented in DEVNOTES.md - some simply refactorings
2017-07-03Adapt test & controller according to convert_to_timetable fixaf83
2017-06-19TimeTables#show: Render header buttons from #action_linksTeddy Wing
This enables us to reuse these links in other parts of the application. Get the links from `TimeTableDecorator#action_links`. Refs #3479
2017-05-23Fix create time_table with calendar associationXinhui
Refs #2347
2017-05-22TimeTables#actualize retrieve dates & periods from calendarXinhui
Refs #3445
2017-05-16Filter TimeTable by overlapping periodXinhui
Refs #3384
2017-05-02Duplicate TimeTableXinhui
Refs #3188
2017-04-27Refs #3185: refacto/upd tt#createjpl
2017-04-27Wip TimeTables#update save TimeTableDateXinhui
Refs #2899
2017-04-26Wip TimeTables#update save day_typesXinhui
Refs #2899
2017-04-26Wip timetables#update stateXinhui
Refs #2899
2017-04-25Refs #3172: fix bouding_dates filter on tt#indexjpl
2017-04-11TimeTables#index fix filter by periodeXinhui
Refs #2909
2017-04-11TimeTable#index fix search by comment_contXinhui
Refs #2909
2017-04-11Refs #2909: working on tt#index filters/searchjpl
2017-04-10Refs #3092 #2909: adding color attribute, adding colorSelector componentjpl
2017-04-10Refs #2909: Fix tests, updating table builderjpl
2017-04-07New route timetables#month return days in a monthXinhui
2017-04-04Refs #2892: adding simpleform builder for acts-as-taggable (for timetable#edit)jpl
2017-02-13Refs #2596 : Replace creation_time with timestampsVlatka Pavisic
2017-02-07Refs #2476 : Disable modification and deletion of resources from another ↵Vlatka Pavisic
referential; in progress
2017-01-23Refs #2428 #2427 : User permissionsVlatka Pavisic
2017-01-06Refs #2347 : TimeTable with CalendarVlatka Pavisic
2015-06-04Fix permitted parameters for time tablesLuc Donnet
2015-01-15Fix tests and merge masterLuc Donnet
2015-01-07Fix spec and update devise usageLuc Donnet
2015-01-06Fix features and views specLuc Donnet
2014-10-03duplicate calendar will open new form and not edit form , Mantis 29110Michel Etienne
2014-09-22Merge branch 'sismo' of github.com:afimb/chouette2 into sismoMarc Florisson
2014-09-22extend tag selectionMarc Florisson