aboutsummaryrefslogtreecommitdiffstats
path: root/lib/html_element.rb
AgeCommit message (Collapse)Author
2017-07-10Fixes: #3478@2.5hRobert
- Decorator Spec Setup `spec/support/decortor_helpers.rb` - Speced - Fixed
2017-06-15ReferentialDecorator: Handle non-`Link` buttonsTeddy Wing
Referentials#show has a button "Purger" that isn't a link. Instead, it's a `<button>` element that opens a modal. Previously, we only knew how to put `Link`s in the `#action_links`, and only these could then be rendered in the header bar as buttons. This change allows us to accept non-Link objects. Since the button is rather simple, I decided to create a simple `HTMLElement` class to represent it and output it in the resulting HTML. The class uses the `#content_tag` `ActionView` helper to render the final HTML. Update "referentials/show.html.slim" to output the button correctly in addition to the normal links. Update `TableBuilderHelper#build_links` to not add anything that's not a `Link` to the gear menu. This allows us to display the "Purger" button on the Referentials#show page but not in the table on Workbenches#show. Refs #3479