Structures.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. {namespace v=FluidTYPO3\Vhs\ViewHelpers}
  2. {namespace ot=Opentalent\OtTemplating\ViewHelpers}
  3. <f:comment><!-- Special layout for the Members page --></f:comment>
  4. <f:layout name="Structures" />
  5. <f:comment><!-- Render the header defined in partial/header.html--></f:comment>
  6. <f:render partial="Classic/Header" arguments="{_all}" />
  7. <div class="main">
  8. <f:comment><!-- Central column --></f:comment>
  9. <div class="content">
  10. <f:comment><!-- All members --></f:comment>
  11. <ot:organizations.getFederationStructures as="structuresCollection"
  12. parentId="{settings.organizationId}"
  13. itemsPerPage="all">
  14. <f:comment><!-- The data is stored as an attribute, then templated with JS for performance reasons --></f:comment>
  15. <div class="ot-structures map-view" data-structures="{v:format.json.encode(value:structuresCollection.members)}">
  16. <div class="structure-col structure-col-map">
  17. <div id="structure-map-wrapper">
  18. <div id="structure-map">
  19. </div>
  20. </div>
  21. <div id="structure-map-bar">
  22. <div class="btn">{f:translate(key: 'click-on-land-to-go-there')}</div>
  23. <ul id="overseas-provinces-list">
  24. <li><f:image src="EXT:ot_templating/Resources/Public/media/metropole.png" alt="Metropole" data="{map-fit: '51.03,-5.78;41.2,9.70'}"/></li>
  25. <li><f:image src="EXT:ot_templating/Resources/Public/media/guadeloupe.png" alt="Guadeloupe" data="{map-fit: '16.62,-62.03;15.74,-60.97'}"/></li>
  26. <li><f:image src="EXT:ot_templating/Resources/Public/media/martinique.png" alt="Martinique" data="{map-fit: '14.95,-61.43;14.28,-60.60'}"/></li>
  27. <li><f:image src="EXT:ot_templating/Resources/Public/media/mayotte.png" alt="Mayotte" data="{map-fit: '-12.51,44.86;-13.19,45.45'}"/></li>
  28. <li><f:image src="EXT:ot_templating/Resources/Public/media/la_reunion.png" alt="La Réunion" data="{map-fit: '-20.65,54.92;-21.65,56.15'}"/></li>
  29. <li><f:image src="EXT:ot_templating/Resources/Public/media/guyane.png" alt="Guyane" data="{map-fit: '6.24,-54.62;1.87,-50.59'}"/></li>
  30. </ul>
  31. </div>
  32. </div>
  33. <div class="structure-col structure-col-results">
  34. <header>
  35. <h2><f:translate key="member-companies"/></h2>
  36. <a href="#" class="activate-map-view"><f:translate key="map"/></a>
  37. <a href="#" class="activate-list-view"><f:translate key="list"/></a>
  38. </header>
  39. <div class="structure-search">
  40. <form>
  41. <div class="search-loc-wrapper">
  42. <input type="text"
  43. name="search-loc"
  44. value="{ot:request.getArgument(argument: 'search-loc')}"/>
  45. <button type="submit" class="search-submit">
  46. <i class="fas fa-search"></i>
  47. </button>
  48. </div>
  49. <div class="filters">
  50. <select class="search-type">
  51. <option value="-1">Type</option>
  52. <option value="0">Harmonie</option>
  53. <option value="0">Orchestre</option>
  54. <option value="0">Chorale</option>
  55. <option value="0">Ecole de musique</option>
  56. </select>
  57. <select class="search-province">
  58. <option value="-1">Région</option>
  59. <option value="0">Alsace</option>
  60. </select>
  61. <select class="search-federation">
  62. <option value="-1">Fédération</option>
  63. <option value="0">CMF</option>
  64. </select>
  65. <select class="search-distance-max">
  66. <option value="-1">Distance</option>
  67. <option value="0">100</option>
  68. </select>
  69. <button class="reset-search">Réinitialiser</button>
  70. </div>
  71. <f:comment><!--
  72. Important: if the cache is not disabled,
  73. then the results won't be updated even after submitting this form
  74. --></f:comment>
  75. <input type="hidden" name="no_cache" value="1">
  76. </form>
  77. </div>
  78. <div class="structure-results">
  79. <f:if condition="{structuresCollection.totalItems} == 0">
  80. <span><f:translate key="no-result"/></span>
  81. </f:if>
  82. <v:variable.set name="pagedStructures" value="{ot:utilities.paginateArray(array:structuresCollection.members)}" />
  83. <f:for each="{pagedStructures}" as="page_items" iteration="it">
  84. <div class="structures-page"
  85. style="{f:if(condition: '{it.cycle}!=1', then: 'display:none;')}"
  86. data-page="{it.cycle}"
  87. >
  88. <f:for each="{page_items}" as="structure">
  89. <div class="structure-card" data-id="{structure.id}">
  90. <div class="structure-poster">
  91. <f:if condition="{structure.logoId}">
  92. <f:then>
  93. <img src='{structure.logoId}' alt="poster" />
  94. </f:then>
  95. <f:else>
  96. <f:image src="EXT:ot_templating/Resources/Public/media/event-default.jpg" alt="poster" />
  97. </f:else>
  98. </f:if>
  99. </div>
  100. <div class="structure-details">
  101. <f:comment>
  102. <!-- <div class="structure-categories">-->
  103. <!-- <f:for each="{structure.categories}" as="category">-->
  104. <!-- <span class="structure-category">-->
  105. <!-- <f:translate key="{category}"/>-->
  106. <!-- </span>-->
  107. <!-- </f:for>-->
  108. <!-- </div>--></f:comment>
  109. <div class="structure-name">
  110. {structure.name}
  111. </div>
  112. <table class="structure-details-table">
  113. <tr class="structure-details-entry structure-address">
  114. <td><i class="fas fa-map-marker-alt"></i></td>
  115. <td>
  116. <f:if condition="{structure.streetAddress}">
  117. {structure.streetAddress} -
  118. </f:if>
  119. {structure.postalCode} {structure.addressCity}
  120. </td>
  121. </tr>
  122. <tr class="structure-details-entry structure-federation">
  123. <td><i class="fas fa-project-diagram"></i></td>
  124. <td>{structure.parentName}</td>
  125. </tr>
  126. </table>
  127. </div>
  128. <div class="spacer"></div>
  129. <a target="_blank" class="btn structure-see" href="https://{structure.subdomain}.opentalent.fr">
  130. <span><f:translate key="see-more"/></span>
  131. <i class="fa fa-caret-right" style="margin-left: 5px;"></i>
  132. </a>
  133. </div>
  134. </f:for>
  135. </div>
  136. </f:for>
  137. <div class="pagination-bar">
  138. <v:variable.set name="lastPage" value="{ot:utilities.count(array:pagedStructures)}" />
  139. <a class="goto-page" data-page="1" href="#page-1" title="{f:translate(key:'go-to-first-page')}">
  140. <i class="fa fa-angle-double-left"></i>
  141. </a>
  142. <ul>
  143. <f:for each="{pagedStructures}" as="_" iteration="it">
  144. <li class="{f:if(condition:'{it.cycle}==1',then:'current',else:'')}"
  145. style="{f:if(condition:'{it.cycle}>10',then:'display:none;',else:'')}"
  146. data-page="{it.cycle}"
  147. >
  148. <a class="goto-page" data-page="{it.cycle}" href="#page-{it.cycle}" title="{f:translate(key:'go-to-page')}{it.cycle}">
  149. {it.cycle}
  150. </a>
  151. </li>
  152. </f:for>
  153. </ul>
  154. <a class="goto-page" data-page="{lastPage}" href="#page-{lastPage}" title="{f:translate(key:'go-to-last-page')}">
  155. <i class="fa fa-angle-double-right"></i>
  156. </a>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </ot:organizations.getFederationStructures>
  162. </div>
  163. </div>
  164. <f:comment><!-- Render the footer defined in partial/footer.html--></f:comment>
  165. <f:render partial="Classic/Footer" />