Faq.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <f:comment><!-- Widget flux par Site N'Go: FAQ --></f:comment>
  2. {namespace v=FluidTYPO3\Vhs\ViewHelpers}
  3. {namespace flux=FluidTYPO3\Flux\ViewHelpers}
  4. <div xmlns="http://www.w3.org/1999/xhtml"
  5. xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
  6. xmlns:v="http://fedext.net/ns/vhs/ViewHelpers"
  7. xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
  8. <f:layout name="{settings.template}/CustomContent"/>
  9. <f:section name="Configuration">
  10. <flux:form id="Faq"
  11. label="{f:translate(key: 'faq')}"
  12. description="{f:translate(key: 'make_your_faq_section')}"
  13. extensionName="OtTemplating"
  14. >
  15. <flux:form.option.group value="ot_widgets" />
  16. <flux:form.option.icon value="EXT:ot_templating/Resources/Public/Icons/opentalent-144x144.png" />
  17. <flux:form.section name="faq">
  18. <flux:form.object name="item" label="{f:translate(key: 'question')}">
  19. <flux:field.input name="question" label="{f:translate(key: 'question')}"/>
  20. <flux:field.text name="reponse" label="{f:translate(key: 'answer')}" defaultExtras="richtext[]:rte_transform[mode=ts_css]"/>
  21. <flux:field.checkbox name="open" label="{f:translate(key: 'unfolded')} ?"/>
  22. </flux:form.object>
  23. </flux:form.section>
  24. </flux:form>
  25. </f:section>
  26. <f:section name="Preview">
  27. <table style="width: 100%;" class="table table-condensed table-hover">
  28. <thead>
  29. <tr>
  30. <th>#</th>
  31. <th>{f:translate(key: 'question')}Question</th>
  32. <th>{f:translate(key: 'answer')}Réponse</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. <f:for each="{faq}" as="element" iteration="iteration">
  37. <f:for each="{element}" key="elementType" as="elementData">
  38. <tr valign="middle">
  39. <td style="vertical-align: middle;">{iteration.cycle}</td>
  40. <td style="vertical-align: middle;">{elementData.question}</td>
  41. <td style="vertical-align: middle;"><f:format.raw>{elementData.reponse}</f:format.raw></td>
  42. </tr>
  43. </f:for>
  44. </f:for>
  45. </tbody>
  46. </table>
  47. </f:section>
  48. <f:section name="Main">
  49. <div class="faq">
  50. <f:for each="{faq}" as="element" iteration="iteration">
  51. <f:for each="{element}" key="elementType" as="elementData">
  52. <div class="full-width faq-item {f:if(condition:'{iteration.isOdd}',then:'highlight')}">
  53. <div class="container">
  54. <div class="row">
  55. <div class="edito {f:if(condition:'{elementData.open}',else:'panel-close')}">
  56. <h3>{elementData.question}</h3>
  57. <div class="content collapse {f:if(condition:'{elementData.open}',then:'show')}">
  58. <f:format.html>{elementData.reponse}</f:format.html>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </f:for>
  65. </f:for>
  66. </div>
  67. </f:section>
  68. </div>