aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-07-12RoutingConstraintZones#show: Match decorator context from #indexTeddy Wing
Just wrote the `#index` method and saw that the `#show` method's `context` hash contents are a bit verbose. Shorten them to match the `#index` method. These mean the same thing but are a bit cleaner. Refs #3479
2017-07-12RoutingConstraintZones#index: Use new table builder helperTeddy Wing
Render table of `RoutingConstraintZones` using the new table builder. Refs #3479
2017-07-12RoutingConstraintZones#show: Fix breadcrumbTeddy Wing
I had broken the breadcrumb by overriding `#show` here. Add in the `build_breadcrumb` call to make it appear again. Refs #3479
2017-07-12ReferentialLines#show: Render links from ReferentialLineDecoratorTeddy Wing
Leverage our newly created `ReferentialLineDecorator` to render the header links, allowing us to use them both here and in the table of lines on the Referentials#show page. Used the extended decoration syntax to allow us to specify the `ReferentialLineDecorator`, otherwise Draper will infer `LineDecorator`, which is not what we want in this case. Refs #3479
2017-07-12Referentials#show: Use new table builder helperTeddy Wing
Needed to add a new decorator to provide links to this table's gear menu. The links correspond to those in the header on the "referential_lines/show.html.slim" page. Call `#human_attribute_name` on the model directly instead of the collection because the decorated collection doesn't expose that method. Refs #3479
2017-07-12#4028 Clean Up end date must be greater than begin datecedricnjanga
2017-07-12#4015 adjust Tag filter to be strictcedricnjanga
2017-07-12#4024 Select Calendars with one charcedricnjanga
2017-07-12Remove ReferentialLines#indexTeddy Wing
Delete this route and associated template files. Wasn't sure if using `exclude:` in the routes file was the best way to do this, as I'm not sure if there are other routes we want to exclude from here also. I visited the page because I'm migrating templates to the new table builder helper and this one uses table builder. Upon visiting the page, it looked pretty wonky, and after consulting with Jean-Paul and Luc, it turns out this page isn't used any more because the table of `Chouette::Line`s rendered there is now instead displayed on the Referentials#show page, obviating the need for this page. Refs #3479
2017-07-12CompanyDecorator#action_links: Rename `line_referential` context paramTeddy Wing
Rename this to `referential` to be more generic. This is because we could be passing both `Referential`s and `LineReferential`s into this parameter. In `CompaniesController`, we use a `LineReferential` while in `ReferentialCompaniesController` we use `Referential`. Refs #3479
2017-07-12ReferentialCompanies#index: Use new table builder helperTeddy Wing
TODO: Rename `line_referential` context parameter in `CompanyDecorator` to `referential` since the name needs to make sense both for `Referential` and for `LineReferential`. Refs #3479
2017-07-12Companies#index: Use new table builder helperTeddy Wing
Refs #3479
2017-07-12CustomLinks: Pass referential directly when initialisingTeddy Wing
Instead of getting the referential to use when building the polymorphic URL from the `UserContext`, pass in a referential directly. The old code that used `user_context.context[:referential]` relied on the fact that `ApplicationController#pundit_user` was defined as follows: def pundit_user UserContext.new(current_user, referential: self.try(:current_referential)) end (We pass `pundit_user` into `CustomLinks` from `TableBuilderHelper#build_links`.) However, Robert's change 747d333ffbcc8ee0c9f1daf93ccca32799434e04 removes the `current_referential` call from `#pundit_user`. In `CustomLinks`, we actually always want to be using `current_referential`. For example, on `Companies#index` (/line_referentials/:id/companies), `CustomLinks` fails to build a correct #show link because `user_context.context[:referential]` is `nil`, when it should instead be a `LineReferential` object, that gets returned by the `#current_referential` helper method. Sure, `#current_referential` is hard to understand, so maybe we'll change that around in the future, but this at least allows us to use the current referential in `CustomLinks`. Refs #3479
2017-07-12TableBuilderHelper: Move `referential` variable to methodTeddy Wing
At Robert's recommendation, use `try` instead of `respond_to?` because it's shorter. Also at Robert's recommendation, move the `referential` variable to a method to memoize it. This allows us to use it in other places without re-getting it and without having to do the `if` check again. He had suggested: def referential return @__referential__ if instance_variable_defined?(:@__referential__) @__referential__ = try(:current_referential) end but I think the `||=` version works the same way and is shorter. Still need to find out from him what our style guide rules for __variables__ are and why I should be using one here. Refs #3479
2017-07-12CustomLinks spec: Update method name in spec describeTeddy Wing
The name of this method changed, but wasn't updated in the `describe` label.
2017-07-12Merge branch 'staging' of github.com:AF83/stif-boiv into stagingLuc Donnet
2017-07-11Merge branch 'master' of github.com:af83/stif-boivRobert
2017-07-11hotfix to open all non standard actions on ApplicationControllerRobert
2017-07-11Refs #4030: Adding error detection (no def. msg yet) on JPjpl
2017-07-11Refs #4030: Adding error detection (no def. msg yet) on VJjpl
2017-07-11Refs #4030: fix cptary spaces (margin) on alert comp.jpl
2017-07-11coherent spec file; no require (as in .rspec) and explicit RSpec.describeRobert
2017-07-11Refs #2646: fix route view testjpl
2017-07-11Merge branch 'master' into stagingRobert
2017-07-11Merge branch 'master' of github.com:AF83/stif-boivFlorent Peyraud
2017-07-11update install scripts and tasksFlorent Peyraud
2017-07-11Fix JP policy edit/update key change...jpl
2017-07-11Refs #4023: fix VJ policy edit/update key change...jpl
2017-07-10Merge branch 'staging' of github.com:AF83/stif-boiv into stagingLuc Donnet
2017-07-10Merge branch 'master' into stagingRobert
2017-07-10Refs: #4021@1.5h; Added spec for incorrectly shown `Créer` button on ↵Robert
calenders#index view and made them pass
2017-07-10Merge branch 'master' into stagingRobert
2017-07-10Refs: #4021@0.15h; Fixes Policy TestsRobert
2017-07-10Merge branch 'master' into stagingRobert
2017-07-10hotfixRobert
2017-07-10Merge branch 'master' into stagingRobert
2017-07-10hotfixRobert
2017-07-10Merge branch 'master' into stagingRobert
2017-07-10Merge branch 'master' of github.com:af83/stif-boivRobert
2017-07-10hotfix calendars permissionsRobert
2017-07-10Action Mailer Previews for CalendarMailerXinhui
Refs #2263
2017-07-10Templating CalendarMailerXinhui
Refs #2263
2017-07-10Set active job queue adapter to sidekiqXinhui
Refs #2263
2017-07-10Updated Webmock gem from 3.0.0 to 3.0.1 -- both have been released the same ↵Robert
day, there should be something wrong with 3.0.0
2017-07-10Merge branch 'master' into stagingRobert
2017-07-10Hotfix login blockedRobert
2017-07-10Merge branch 'master' of github.com:AF83/stif-boiv into stagingLuc Donnet
2017-07-10Fixes: #3478@2.5hRobert
- Decorator Spec Setup `spec/support/decortor_helpers.rb` - Speced - Fixed
2017-07-10Merge branch 'master' into stagingLuc Donnet
2017-07-09debugging referential decoratorRobert