Refactor #14566
Replace show_console_action with a simple if statement
Description
The show_console_action in the CR helper is simply checks a condition and displays the link if the condition is met.
This causes the link to be generated in any case so it can be passed into the function, instead of just checking the condition.
When fixing this, need to check if any CR plugin uses this helper.
Associated revisions
History
#1
Updated by The Foreman Bot about 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Tomer Brisker
- Pull request https://github.com/theforeman/foreman/pull/3418 added
#2
Updated by Anonymous about 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 46adbbbab03d827163dc723d9601561d06111c33.
#3
Updated by Dominic Cleal about 6 years ago
- Legacy Backlogs Release (now unused) set to 136
Fixes #14566 - remove show_console_action function
The `show_console_action` function is just a trenary operator, no sense
making this a function. This also causes the link to be generated even
if it is not needed, as it is passed to the function as a parameter.