Commit Graph

4 Commits

Author SHA1 Message Date
Javi Martín
1d955b7a20 Simplify using helper methods in components
The `use_helpers` method was added in ViewComponent 3.8.0, and it's
included by default in all components since version 3.11.0.

Note we sometimes delegated the `can?` method to the controller instead
of the helpers, for no particularly reason. We're unifying that code as
well.
2024-03-02 17:34:25 +01:00
decabeza
1ff2144830 Show always poll officer menu to officers
Since the change on commit cbbe188d6 we added a Poll.current.any?
condition to show the officing link on admin menu to officers.

That condition doesn't have much sense since Poll results only can be
added after a poll has ended, and there may be only one active poll.
2023-02-17 14:07:02 +01:00
Javi Martín
967bb4d097 Use link_list to render admin login items
This way it's easier to customize this menu.
2023-01-16 14:44:05 +01:00
Javi Martín
c40c6e04e7 Move login links to components
We're trying to be consistent; in the past, we had the partials
"shared/admin_login_items", "layouts/notification_item" and
"devise/menu/login_items". Now we're moving all these partials to
components in the `Layout` namespace.
2023-01-16 14:44:05 +01:00