$links = array();
foreach (diff_available_states('node') as $alternative_state => $label) {
if ($alternative_state == $state) {
// @todo: Should we show both or just alternatives?
}
$links[$alternative_state] = array(
'title' => $label,
'href' => ...,
);
}
That @todo item seems to have been placed there in order to skip adding the currently selected diff mode as a link, but I think that we should still show it, but denote the active vs available diff modes differently. I propose that we make them look like secondary buttons instead.
I've filed a PR with some initial work, but we should wait until #17 gets fixed before working further on this. Then also make sure that this looks nice in both Seven and Basis.
I'm splitting this from #16
There's a
@todo
item in https://github.com/backdrop-contrib/diff/blob/1.x-1.x/diff.pages.inc#L250That
@todo
item seems to have been placed there in order to skip adding the currently selected diff mode as a link, but I think that we should still show it, but denote the active vs available diff modes differently. I propose that we make them look like secondary buttons instead.Rough mockup:
...or with smaller buttons: