A list of links is a very common pattern in the web, and we use it in many places. Here we're applying it to one of the most simple ones; the help page. Generally speaking, I'm not a big fan of helpers, but there are methods which IMHO qualify as helpers when: * They do not deal with application objects but mainly strings and arrays * They return text or an HTML tag * Their logic is simple and splitting it into several methods is not necessary Many Rails helpers, like `tag`, follow these principles.
48 lines
1.0 KiB
Plaintext
48 lines
1.0 KiB
Plaintext
<div class="row">
|
|
<div class="small-12 column">
|
|
<%= link_list(
|
|
(
|
|
[
|
|
t("pages.help.menu.debates"),
|
|
"#debates",
|
|
class: "button hollow expanded"
|
|
] if feature?(:debates)
|
|
),
|
|
(
|
|
[
|
|
t("pages.help.menu.proposals"),
|
|
"#proposals",
|
|
class: "button hollow expanded"
|
|
] if feature?(:proposals)
|
|
),
|
|
(
|
|
[
|
|
t("pages.help.menu.budgets"),
|
|
"#budgets",
|
|
class: "button hollow expanded"
|
|
] if feature?(:budgets)
|
|
),
|
|
(
|
|
[
|
|
t("pages.help.menu.polls"),
|
|
"#polls",
|
|
class: "button hollow expanded"
|
|
] if feature?(:polls)
|
|
),
|
|
(
|
|
[
|
|
t("pages.help.menu.processes"),
|
|
"#processes",
|
|
class: "button hollow expanded"
|
|
]
|
|
),
|
|
[
|
|
t("pages.help.menu.other"),
|
|
"#other",
|
|
class: "button hollow expanded"
|
|
],
|
|
class: "menu-pages", "data-magellan": true
|
|
) %>
|
|
</div>
|
|
</div>
|