aboutsummaryrefslogtreecommitdiffstats
path: root/lib/af83/decorator
AgeCommit message (Collapse)Author
2018-04-10Refs #6426; Disable "Create opposite route" action instead of hiding itZog
2018-02-09Refs #5669 @2h; Fix SpecsZog
2018-01-31Refs #5683 @2H; Fix specs and refactor action_linksZog
Note: Did not fix the missing workgroup in the calendar mailer
2018-01-25AF83::Decorator::Link: Add `data-method` to HTML optionsTeddy Wing
Previously, we weren't correctly adding the HTTP method to the links in the header. This is because it's called `link_method` in the class. Put this value in `method`/`data-method` when converting the link to HTML so that the links work properly. Discovered this when deactivating and activating stop areas on http://stif-boiv.dev:3000/stop_area_referentials/1/stop_areas/139429 . Refs #5586
2018-01-25AF83::Decorator::Link: Delete `#default_class`Teddy Wing
This method was overriding classes that were added by `#add_class` in addition to those added by `#class`. Obviously, the argument to `#add_class` should be appended to the default. That seemed like a pain to do, so instead I'm getting rid of the concept of a default class. Instead, we're going to force all links to use the template-defined styles for now. That goes in line with Luc's desire to be more consistent in the links, as he stated yesterday. Refs #5586
2018-01-25AF83::Decorator::Link: Change #class? to #default_classTeddy Wing
Instead of checking for an existing class and then setting the class, provide a method to set a default class when one hasn't been defined. This does effectively the same thing but moves the condition inside the method. Thanks Johan for the suggestion! 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; CR #2Zog
2018-01-25Refs #5586 @2h; Fix specsZog
2018-01-25Refs 5586; CR #1Zog
2018-01-25Refs #5586; Add more specs on AF83::Decorator::LinkZog