|
| 1 | +<% content_for(:title, t('.meta_title')) -%> |
| 2 | + |
| 3 | +<div class="fr-container fr-my-4w"> |
| 4 | + <%= render partial: "breadcrumb" %> |
| 5 | + <div class="fr-grid-row"> |
| 6 | + <div class="fr-col-12 fr-col-md-10"> |
| 7 | + <h1><%= t('.title', app_name: Current.application_name) %></h1> |
| 8 | + |
| 9 | + <% @faqs.each do |category, subcategories| -%> |
| 10 | + <h2><%= t(:name, scope: [:faq, :categories, category], raise: true) %><%# i18n-tasks-use t("faq.categories.#{category}.name") %></h2> |
| 11 | + <p><%= t(:description, scope: [:faq, :categories, category], raise: true) %><%# i18n-tasks-use t("faq.categories.#{category}.description") %></p> |
| 12 | + |
| 13 | + <div class="fr-accordions-group fr-mb-6w"> |
| 14 | + <% subcategories.each_with_index do |(subcategory, faqs), index| -%> |
| 15 | + <section class="fr-accordion"> |
| 16 | + <h3 class="fr-accordion__title"> |
| 17 | + <button class="fr-accordion__btn" aria-expanded="false" aria-controls="accordion-<%= category %>-<%= index %>"> |
| 18 | + <%= t(:name, scope: [:faq, :subcategories, subcategory], raise: true) %><%# i18n-tasks-use t("faq.subcategories.#{subcategory}.name") %> |
| 19 | + </button> |
| 20 | + </h3> |
| 21 | + |
| 22 | + <div class="fr-collapse" id="accordion-<%= category %>-<%= index %>"> |
| 23 | + <% description = t(:description, scope: [:faq, :subcategories, subcategory], default: nil) %><%# i18n-tasks-use t("faq.subcategories.#{subcategory}.description") %> |
| 24 | + <%- if description -%> |
| 25 | + <p><%= description %></p> |
| 26 | + <%- end -%> |
| 27 | + |
| 28 | + <ul> |
| 29 | + <% faqs.each do |faq| -%> |
| 30 | + <li><%= link_to faq[:title], faq_path(category: faq[:category], slug: faq[:slug]), class: "fr-link" %></li> |
| 31 | + <% end -%> |
| 32 | + </ul> |
| 33 | + </div> |
| 34 | + </section> |
| 35 | + <% end -%> |
| 36 | + </div> |
| 37 | + <% end -%> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | +</div> |
0 commit comments