aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/referentials_controller.rb
AgeCommit message (Collapse)Author
2018-05-02Refs #6572; Crete Referentials in a pending stateZog
And fix a bug preventing the deletion of referentials without a schema
2018-04-27Refs #6572; Fix referentials policiesZog
2018-03-29Refs #4658; Remove `current_functional_scope`Zog
2018-02-21Refs #5865 @1h; Ensure user is allowed to duplicate a referential before ↵Zog
doing so I also changed the way 403 errors are handled, to properly respond with a 403 HTTP code
2018-02-20Refs #5863 @6h; Remove workbench id from the querystringZog
Infer it when possible, and use a nested otherwise
2018-01-25ReferentialLineDecorator: Convert action links to new interfaceTeddy Wing
Refs #5586
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-05Refs #5468 Change redirect after Referential#validatecedricnjanga
2018-01-03Merge branch 'master' into ↵Luc Donnet
5024-prevent-duplicate-referentials-from-being-created-during-parallel-db-transactions--rb201711271659
2018-01-02Fixes redirect on Referential creation (without cloning). Refs #5452. Refs #5297Alban Peignier
2017-12-28Add log messages when Referential can't be created. Remove useless ↵Alban Peignier
build_referenial invocation in ReferentialsController#create. Refs #5297
2017-12-28Fix referential create redirect when invalidXinhui
Refs #5297
2017-12-18Referentials#create: Add flash message on referential duplicationTeddy Wing
When a "duplicate referential" action is initiated, show a flash message to let users know that it started and is in progress (and will take a while since it's an asynchronous task). Refs #5317
2017-12-18Referentials#validate: Remove `I18n.` prefixTeddy Wing
Call `#t` directly since we can and because the rest of the controller does this without the `I18n.` prefix. Refs #5317
2017-12-18Referentials#validate: Update flash messageTeddy Wing
* Luc specified a new flash message string to use here. Update the old one with the new version. * Move the translation key to `notice.referentials.validate` because we have multiple "operation_in_progress" messages (this one for validation, and another for referential cloning/duplication). * Add a test to confirm that the flash message is set. Refs #5317
2017-12-05Merge remote-tracking branch 'origin/master' into ↵Teddy Wing
5024-prevent-duplicate-referentials-from-being-created-during-parallel-db-transactions--rb201711271659 Conflicts: app/models/referential.rb A whitespace conflict in a place I don't even remember editing? Okaay.
2017-11-28Refactoring move referentialSupport from chouetteController into childrensXinhui
2017-11-27ReferentialsController: Fix typo in `build_referenial` nameTeddy Wing
Rename the method to `build_referential`. Saw it because my project grep didn't work. Refs #5024
2017-11-08filter compliance_control_set by organisation on valisate referential and ↵Guillaume
add specs
2017-11-06add validate method in referentials_controller for call ↵Guillaume
ComplianceControlSetCopyWorker, and change routes/views for select compliance_control_set
2017-10-26Remove breadcrumb_controllerXinhui
2017-10-18Remove legacy breadcrumb method in controllersXinhui
Refs #4741
2017-09-11Update of ReferentialsController#new :cedricnjanga
- Add some context to referential and workbench decorator to access current_referential and assign it to the cloned referential - Add a build_referential method to avoir duplicates of code (in the controller and in the model), need to clean a bit more - Need to add some Spec features to take into account the functional scope of the current_user
2017-09-05Referential#new_from :cedricnjanga
Added params to certains paths to have the workbench_id in it. The goal is to have the current workbench_id to assign it when do a Referential#new_from Then I finished the use of the functional scope to avoid potential errors I skipped some tests that hve a #TODO so we can easily find them
2017-09-05Delete call to pry in referential destroyLuc Donnet
2017-09-04add some change for the Referential#new_from to only have a line collection ↵cedricnjanga
regarding the functional scope of the current organozation
2017-07-21Fix cloned ref should belong to current user organisationXinhui
Refs #4132
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-09Refs: #3478@1h; fixes a view error in references#show(format: js)Robert
2017-07-05Refs: #3478@1.5h;Robert
- PolicyChecker authorizes(*) all now - Untied ApplicationPolicy#index? from show? - mv access_point_policy.rb to access_point_policy.rb fixing an invisible name curruption (local problem?) * to authorize: to allow (not here), to undergo the process of authorization (here)
2017-06-19Merge remote-tracking branch 'origin/master' into ↵Teddy Wing
3479-refactor-table_builder-helper
2017-06-16Add auto assign of slug and prefix for referential#createXinhui
Refs #3657
2017-06-16Remove fields from referential newXinhui
Refs #3657
2017-06-14ReferentialsController#show: Use short syntax to decorate @referentialTeddy Wing
I hadn't used this syntax before because I think I had tried: @referential.decorate without the assignment. Of course it didn't work at the time, but I didn't notice so I switched to this syntax which did work. Use the shorter one because it's a bit cleaner. Refs #3479
2017-06-12referentials/show.html.slim: Extract header buttons to a decoratorTeddy Wing
Add a new `ReferentialDecorator` that we can use to define the links that appear as buttons in the header of the `/referentials/:id` page. The idea is that these links will take the place of the existing view code and in the view, we'll instead loop over the links provided by the decorator and render them as buttons. I decided to do it this way because there's a requirement that the links in the gear menu in tables show the same links that appear in the header of the page. So the Workbenches#show page would show a table of referentials, and their gear menu links should ostensibly be the same as the header links in the Referentials#show page. My goal was to abstract links, and try to separate them from the presentation layer. Still having trouble with this though. I created a new `Link` class to represent a link. We can then use this in the template to create a `link_to`. It becomes messy, though, when we want to put other elements inside a certain link, as evidenced by the `:delete` link. Don't like how that's done, but still working out the best approach to make it cleaner. Refs #3479
2017-06-12ReferentialsController#show: Fix whitespaceTeddy Wing
Method was indented by three spaces. Should be two. Refs #3479
2017-05-02 Refs #3053Robert
passes current_organization down from the controller into Reference.new_from adds joint models *ReferenceMemeberships to excluded Apartment models
2017-04-13Refs #3128 : Modify ReferentialPolicy to check user permissionsVlatka Pavisic
2017-03-22Refs #2902 : Return reverted partVlatka Pavisic
2017-03-22Revert "Refs #2912 : Drop translations cascade"Luc Donnet
This reverts commit 3c97164c390c3001f656d174b80f8a87d57d60ef.
2017-03-22Refs #2912 : Drop translations cascadeVlatka Pavisic
2017-03-21Find Referential in Organisation#find_referential. Use it in ↵Alban Peignier
ReferentialSupport and ReferentialsController. Refs #2900
2017-03-16Wip sort issue on table listXinhui
Refs #2858
2017-02-09Refs #2482: updating referentials#show table column namesjpl
2017-02-08Refs #2482: fix testsjpl
2017-02-08Refs #2482: updating referentials#show with new layoutjpl
2017-02-07Fix undefined method current_referential on referential#showXinhui
2017-02-07Refs #2476 : Disable modification and deletion of resources from another ↵Vlatka Pavisic
referential; in progress
2017-01-27Refs #2469 : Referential#readyVlatka Pavisic
2017-01-03Refs #2236: display lines on referentialjpl