aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
AgeCommit message (Collapse)Author
2018-01-31Refs #5750; Fix validationZog
2018-01-30Make some changes to avoid unnacessaty lines of codecedricnjanga
2018-01-30Merge pull request #254 from af83/developer-toolbarLuc Donnet
Add a toolbar for devs to easily manage permissions and features
2018-01-30Merge branch 'master' into 5683-add_workgroup_id_to_calendarscedricnjanga
2018-01-29Refs #5750 @1h; Manage non-commercial StopAreasZog
- Add a `kind` attribute - Hide irrelevant fields in the form
2018-01-25ImportResources#index: Get rid of `ImportResourceDecorator`Teddy Wing
Seems like the object decorator for `ImportResource` isn't needed here. It doesn't contain anything except for an empty `action_links` method, which I'm guessing was to appease the table builder which used to expect one. Get rid of that decorator because it doesn't seem to be needed. Also get rid of the `links` argument to the table builder because we don't need it any more with the new action links interface. Refs #5586
2018-01-25ComplianceCheckSets#executed: Don't decorate `ComplianceCheck`sTeddy Wing
No action links are used on these objects and the decorator isn't being used for anything else. Seems to me like this collection doesn't need to be decorated at all. Get rid of the decorator. Add a `decorates` to `ComplianceCheckSetDecorator` because http://stif-boiv.dev:3000/workbenches/1/compliance_check_sets/14/executed causes an uninferrable thing error. Refs #5586
2018-01-25ComplianceCheckSetDecorator: Convert to new action links interfaceTeddy Wing
Refs #5586
2018-01-25ComplianceControlDecorator: Convert to new action links interfaceTeddy Wing
* Decorate the `ComplianceControl` so we can show the action links from the decorator in the header. * Add a `decorates` to get `object_class` to work inside the decorator. * Define `AF83::Decorator.define_instance_class_method` in order to enable the `@compliance_control.class.METHOD` calls in the view to work. Thanks very much to Johan for figuring out a way to do that. Refs #5586
2018-01-25ComplianceControlDecorator: Convert to new action links interfaceTeddy Wing
I was getting this error: ActionView::Template::Error (undefined method `split' for nil:NilClass Did you mean? split_all): 16: 17: / compliance controls without block 18: = render_compliance_control_block 19: = render_compliance_controls(@direct_compliance_controls) 20: 21: / compliance controls with block 22: - if params[:q] && params[:q][:compliance_control_block_id_eq_any].try(:present?) app/helpers/table_builder_helper.rb:110:in `item_row_class_name' app/helpers/table_builder_helper.rb:290:in `tbody' app/helpers/table_builder_helper.rb:97:in `table_builder_2' app/helpers/compliance_control_sets_helper.rb:79:in `block in render_table_builder' app/helpers/compliance_control_sets_helper.rb:78:in `render_table_builder' app/helpers/compliance_control_sets_helper.rb:71:in `block (2 levels) in render_compliance_controls' app/helpers/compliance_control_sets_helper.rb:70:in `block in render_compliance_controls' app/helpers/compliance_control_sets_helper.rb:69:in `render_compliance_controls' app/views/compliance_control_sets/show.html.slim:19:in `_app_views_compliance_control_sets_show_html_slim___3528509151208629266_70279137561480' The model name wasn't accessible from the view because this collection is set up in an unorthodox way without a decorated collection. Got help from Johan, and we ended up using the `model` param passed into the table builder for this. It looks terrible with `model` all over the place, but at least it gets us past the problem. Refs #5586
2018-01-25ComplianceControlSetDecorator: Convert to new action links interfaceTeddy Wing
Refs #5586
2018-01-25StopPointDecorator: Convert to new action links interfaceTeddy Wing
Subtleties were that the links need to reference `StopArea`s. In particular, the `edit` link goes to the `StopAreaReferential` path instead of the referential-StopArea path. Refs #5586
2018-01-25StopAreaDecorator: Convert to new action links interfaceTeddy Wing
Refs #5586
2018-01-25PurchaseWindowDecorator: Convert to new action links interfaceTeddy Wing
Also add a new method `AF83::Decorator.define_instance_method`. Thanks to Johan for suggesting that and walking me through writing it. This new method allows us to define methods on the instance decorator. We need this to preserve the `#bounding_dates` method that was defined in `PurchaseWindowDecorator`. Refs #5586
2018-01-25RoutingConstraintZoneDecorator: Convert action links to new interfaceTeddy Wing
Refs #5586
2018-01-25ReferentialLineDecorator: Convert action links to new interfaceTeddy Wing
Refs #5586
2018-01-25RouteDecorator: Convert to new action links interfaceTeddy Wing
Important to add the `action: :index` argument on the table builder in the `ReferentialLines#show` page so that the gear menu links render correctly. Refs #5586
2018-01-25ReferentialNetworkDecorator: Convert to new action links interfaceTeddy Wing
Need to add a `collection_name` method to `ReferentialNetworksController` because `ApplicationController#decorated_collection` can't infer the `Network` model from the controller name. Refs #5586
2018-01-25NetworkDecorator: Convert to new action links interfaceTeddy Wing
And remove the "create" link from the gear menu and header links of the :show page because it didn't make sense there. Leave a "create" link on the index page though. Refs #5586
2018-01-25Imports#index: Move 'New import' button to action linksTeddy Wing
Begin the process of converting the `ImportDecorator` to the new action links interface. For now, only the "New import" button on the top right of the index page is converted. The rest of the links are commented out for now and will be treated in a subsequent commit. Add a new `#class?` method to `AF83::Decorator::Link` that tells callers whether a CSS class has been defined on the link. This allows us to determine whether we should force a class or use the one provided in `_page_header.html.slim`. We need a way to specify the class of the link in the header because the "New import" button is supposed to be blue (`.btn-primary`), but the default for primary action links is white. Refs #5586
2018-01-25Refs #5586 @2h; Fix specsZog
2018-01-25Refs 5586; CR #1Zog
2018-01-25Refs #5586 @1h; Refactor ReferentialDecoratorZog
Plus: - Fix a bug on `html_options` in AF83::Decorator::Link - Add a `t` helper in AF83::Decorator to handle i18n
2018-01-25Refs #5586 @1.5h; Migrate more decoratorsZog
- Remove ApiKeyDecorator (never used) - Migrate CalendarDecorator - Migrate CompanyDecorator - Migrate TimeTableDecorator
2018-01-25Refs #5586 @1h; Migrate TimeTableDecoratorZog
2018-01-25Refs #5586 @2h; Refactor the whole thingZog
We now have a ModelDecorator and an "instance" decorator, all in the same file, with the same API.
2018-01-25Refs #5718; Show times at stops in ReferentialVehicleJourneys#index5718-show-times-in-vehiclejourneys-indexZog
When 1 or 2 stops have been selected
2018-01-24update calendar build_links for table buildercedricnjanga
2018-01-24Add a toolbar for devs to easily manage permissions and featuresZog
2018-01-23First draft for including calendars into workgroup for having appropriate ↵cedricnjanga
scoping
2018-01-22Fix bug on VJs indexZog
2018-01-19Merge pull request #239 from af83/5568-fix-vjs-editorLuc Donnet
5568 Fix VJs editor when a stop has an invalid TZ
2018-01-19Fix compliance check sets breadcrumb, locales and datas displayLuc Donnet
2018-01-16Finalize CSV export for ComplianceCheckMessage and Import<essagecedricnjanga
2018-01-12Refs #5163cedricnjanga
Add compliance check resource status helper Add small changes for CSV export
2018-01-12First draft for ComplianceCheckMessage & ImportMessage CSV exportscedricnjanga
2018-01-12Refs #5571 @0.25h; Let the user select the number of items per page5571-remove-pagination-on-referential-vjs-indexZog
on ReferentialVehicleJourneys#index
2018-01-12Refs #5568 @0.25h; Fix VJs editor when a stop has an invalid TZ5568-fix-vjs-editorZog
2018-01-11Refs #5535; Apply timezones during schedule calculationZog
2018-01-11Merge pull request #227 from af83/5551-handle-custom-fields-in-vjs-editorLuc Donnet
5551 Handle custom fields in VJs editor
2018-01-11Merge pull request #234 from af83/5493-use-tz-for-time-displayAlban Peignier
Use local time in the Journeys editor. Refs #5493
2018-01-11Add Referential#merged_at and make Referentials archived and merged. Refs #5559Alban Peignier
2018-01-11Refs #5493; Show Timezone on JPs editor5493-use-tz-for-time-displayZog
2018-01-11Refs #5493 @1h; Use local time in the Journeys editorZog
We store UTC times in the database though
2018-01-11Fix VJ creation with full schedule when JourneyPatterns are not loaded ↵fix-vj-creation-with-full-scheduleZog
through an ajax call
2018-01-11Refs #5551 @0.5h; Implement the custom fields in the creation modalZog
And Refactor the component in the process
2018-01-11Merge pull request #211 from af83/5500-add-filter-on-stopsteddywing
5500 Add filters on ReferentialVJ#index
2018-01-11Merge pull request #225 from af83/5535-compute-vehicle-journeys-timesLuc Donnet
5535 compute vehicle journeys times
2018-01-11Refs #5500 @3h; Add filters on ReferentialVJ#indexZog
To enable users to filter on stop areas
2018-01-10Merge pull request #217 from af83/5502-remove-search-from-selectsAlban Peignier
Don't use Ajax in JP selector in VJs editor. Refs #5502