|  | 
| 1 |  | -{% macro containerBlock(title, cta, description, body) %} | 
| 2 |  | -  <div class="container-block"> | 
|  | 1 | +{% macro containerBlock(title, cta, description, body, class = null) %} | 
|  | 2 | +  <div class="container-block {{ class }}"> | 
| 3 | 3 |     <div class="container-block-header"> | 
| 4 | 4 |       <span class="container-block-title">{{ title|title }}</span> | 
| 5 | 5 |       <span class="container-block-cta">{{ cta|raw }}</span> | 
|  | 
| 12 | 12 |     {% endif %} | 
| 13 | 13 |   </div> | 
| 14 | 14 | {% endmacro %} | 
|  | 15 | + | 
|  | 16 | +{% macro containerBlockToggle(id, title, body, class = null) %} | 
|  | 17 | +  <div class="container-block js-toggle-container {{ class }}" id="{{ id }}"> | 
|  | 18 | +    <div class="container-block-header"> | 
|  | 19 | +      <span class="container-block-title js-toggle-button"> | 
|  | 20 | +        <span class="zmdi zmdi-chevron-down"></span> | 
|  | 21 | +        {{ title|title }} | 
|  | 22 | +      </span> | 
|  | 23 | +    </div> | 
|  | 24 | +    <div class="container-block-body js-toggle-content hide"> | 
|  | 25 | +      {{ body|raw }} | 
|  | 26 | +    </div> | 
|  | 27 | +  </div> | 
|  | 28 | +{% endmacro %} | 
|  | 29 | + | 
|  | 30 | +{% macro renderTable(titles, rows, isBordered = true, class = null, rowsClass = null, id = null, data = {}) %} | 
|  | 31 | +  <div class="settings-content-table {{ class }}" | 
|  | 32 | +    {% if id %} | 
|  | 33 | +      id="{{ id }}" | 
|  | 34 | +    {% endif %} | 
|  | 35 | + | 
|  | 36 | +    {% for key, value in data %} | 
|  | 37 | +      data-{{ key }}="{{ value }}" | 
|  | 38 | +    {% endfor %} | 
|  | 39 | +    > | 
|  | 40 | +    <div class="settings-content-table-block {% if isBordered %}is-bordered{% endif %}"> | 
|  | 41 | +      <div class="settings-content-table-header"> | 
|  | 42 | +        {% for title in titles %} | 
|  | 43 | +          {{ title|raw }} | 
|  | 44 | +        {% endfor %} | 
|  | 45 | +      </div> | 
|  | 46 | + | 
|  | 47 | +      <div class="{{ rowsClass }}"> | 
|  | 48 | +        {% for row in rows %} | 
|  | 49 | +          {{ row|raw }} | 
|  | 50 | +        {% endfor %} | 
|  | 51 | +      </div> | 
|  | 52 | +    </div> | 
|  | 53 | +  </div> | 
|  | 54 | +{% endmacro %} | 
|  | 55 | + | 
|  | 56 | +{% macro renderRow(items, data = {}, class = null) %} | 
|  | 57 | +  <div class="settings-content-table-item {{ class }}" | 
|  | 58 | +    {% for key, value in data %} | 
|  | 59 | +      data-{{ key }}="{{ value }}" | 
|  | 60 | +    {% endfor %} | 
|  | 61 | +  > | 
|  | 62 | +    {% for item in items %} | 
|  | 63 | +      {{ item|raw }} | 
|  | 64 | +    {% endfor %} | 
|  | 65 | +  </div> | 
|  | 66 | +{% endmacro %} | 
|  | 67 | + | 
|  | 68 | +{% macro renderDragIcon(isHeader = false) %} | 
|  | 69 | +  <div class="settings-content-table-item-drag-icon"> | 
|  | 70 | +    {% if not isHeader %} | 
|  | 71 | +      <i class="material-icons drag-handle">drag_handle</i> | 
|  | 72 | +    {% endif %} | 
|  | 73 | +  </div> | 
|  | 74 | +{% endmacro %} | 
|  | 75 | + | 
|  | 76 | +{% macro renderLabel(items, isHeader = false, isFixed = false, class = null) %} | 
|  | 77 | +  <div class="settings-content-table-item-label {% if isHeader %}is-header{% endif %} {% if isFixed %}is-fixed{% endif %} {{ class }}"> | 
|  | 78 | +    {% for item in items %} | 
|  | 79 | +      {{ item|raw }} | 
|  | 80 | +    {% endfor %} | 
|  | 81 | +  </div> | 
|  | 82 | +{% endmacro %} | 
|  | 83 | + | 
|  | 84 | +{% macro renderLabelFixed(items, isHeader = false, class = null) %} | 
|  | 85 | +  {{ _self.renderLabel(items, isHeader, true, class) }} | 
|  | 86 | +{% endmacro %} | 
|  | 87 | + | 
|  | 88 | +{% macro addLabel(label, class = null) %} | 
|  | 89 | +  <div class="settings-content-table-item-label-content {{ class }}">{{ label|raw }}</div> | 
|  | 90 | +{% endmacro %} | 
|  | 91 | + | 
|  | 92 | +{% macro addLabelSearch(placeholder = 'Search') %} | 
|  | 93 | +  <div class="settings-content-table-item-label-content"> | 
|  | 94 | +    <div class="popup-container js-toggle-container" data-toggle="tooltip" data-placement="bottom" title="Search"> | 
|  | 95 | +      <i class="button button-toggle zmdi zmdi-search js-toggle-button" data-toggle-open-class="active" data-toggle-focus=".list-search>.input-text"></i> | 
|  | 96 | + | 
|  | 97 | +      <div class="popup-content list-search open-right bg-transparent js-toggle-content"> | 
|  | 98 | +        <input type="text" placeholder="{{ placeholder }}" class="search input-text pt-0" autocomplete="off" /> | 
|  | 99 | +      </div> | 
|  | 100 | +    </div> | 
|  | 101 | +  </div> | 
|  | 102 | +{% endmacro %} | 
|  | 103 | + | 
|  | 104 | +{% macro addLabelIcon(icon, isHeader = false) %} | 
|  | 105 | +  <div class="settings-content-table-item-icon"> | 
|  | 106 | +    {% if not isHeader %} | 
|  | 107 | +      <i class="{{ icon }}"></i> | 
|  | 108 | +    {% endif %} | 
|  | 109 | +  </div> | 
|  | 110 | +{% endmacro %} | 
|  | 111 | + | 
|  | 112 | +{% macro renderColumn(items, isHeader = false, isNarrow = false, class = null, ignore = false) %} | 
|  | 113 | +  {% if not ignore %} | 
|  | 114 | +    <div class="settings-content-table-item-column {% if isHeader %}is-header{% endif %} {% if isNarrow %}is-narrow{% endif %} {{ class }}"> | 
|  | 115 | +      {% for item in items %} | 
|  | 116 | +        {{ item|raw }} | 
|  | 117 | +      {% endfor %} | 
|  | 118 | +    </div> | 
|  | 119 | +  {% endif %} | 
|  | 120 | +{% endmacro %} | 
|  | 121 | + | 
|  | 122 | +{% macro renderColumnNarrow(items, isHeader = false, class = null, ignore = false) %} | 
|  | 123 | +  {{ _self.renderColumn(items, isHeader, true, class, ignore) }} | 
|  | 124 | +{% endmacro %} | 
|  | 125 | + | 
|  | 126 | +{% macro addColumnHtml(html) %} | 
|  | 127 | +  {{ html|raw }} | 
|  | 128 | +{% endmacro %} | 
|  | 129 | + | 
|  | 130 | +{% macro addColumnHelpIcon(icon, title) %} | 
|  | 131 | +  <span class="help-icon" data-toggle="tooltip" data-placement="top" title="{{ title }}"> | 
|  | 132 | +    <i class="{{ icon }}"></i> | 
|  | 133 | +  </span> | 
|  | 134 | +{% endmacro %} | 
|  | 135 | + | 
|  | 136 | +{% macro renderActions(actions = [], length = null, class = null) %} | 
|  | 137 | +  <div class="settings-content-table-item-actions {{ class }}" data-icons="{{ length|default(actions|length) }}"> | 
|  | 138 | +    {% for action in actions %} | 
|  | 139 | +      {{ action|raw }} | 
|  | 140 | +    {% endfor %} | 
|  | 141 | +  </div> | 
|  | 142 | +{% endmacro %} | 
|  | 143 | + | 
|  | 144 | +{% macro addActionGroup(actions, hide = false, class = null) %} | 
|  | 145 | +  <div class="{{ class }} {% if hide %}hide{% endif %}"> | 
|  | 146 | +    {% for action in actions %} | 
|  | 147 | +      {{ action|raw }} | 
|  | 148 | +    {% endfor %} | 
|  | 149 | +  </div> | 
|  | 150 | +{% endmacro %} | 
|  | 151 | + | 
|  | 152 | +{% macro addActionLink(title, icon, endpoint, data = {}, class = null, ignore = false) %} | 
|  | 153 | +  {% import '@SymfonyAdmin/macros.html.twig' as UI %} | 
|  | 154 | + | 
|  | 155 | +  {% if not ignore %} | 
|  | 156 | +    {{ UI.link({ | 
|  | 157 | +      iCss: icon, | 
|  | 158 | +      iTooltip: { | 
|  | 159 | +        title: title | 
|  | 160 | +      }, | 
|  | 161 | +      class: 'settings-content-table-item-action-icon', | 
|  | 162 | +      aCss: class, | 
|  | 163 | +      data: data|merge({ | 
|  | 164 | +        endpoint: endpoint | 
|  | 165 | +      }) | 
|  | 166 | +    }) }} | 
|  | 167 | +  {% endif %} | 
|  | 168 | +{% endmacro %} | 
|  | 169 | + | 
|  | 170 | +{% macro addActionModal(title, icon, endpoint, data = {}, ignore = false) %} | 
|  | 171 | +  {% import '@SymfonyAdmin/macros.html.twig' as UI %} | 
|  | 172 | + | 
|  | 173 | +  {% if not ignore %} | 
|  | 174 | +    {{ UI.link({ | 
|  | 175 | +      iCss: icon, | 
|  | 176 | +      iTooltip: { | 
|  | 177 | +        title: title | 
|  | 178 | +      }, | 
|  | 179 | +      class: 'settings-content-table-item-action-icon', | 
|  | 180 | +      aCss: 'js-entity-modal', | 
|  | 181 | +      data: data|merge({ | 
|  | 182 | +        endpoint: endpoint | 
|  | 183 | +      }) | 
|  | 184 | +    }) }} | 
|  | 185 | +  {% endif %} | 
|  | 186 | +{% endmacro %} | 
|  | 187 | + | 
|  | 188 | +{% macro addActionModalTemplate(title, icon, template, arguments, ignore = false) %} | 
|  | 189 | +  {% import '@SymfonyAdmin/macros.html.twig' as UI %} | 
|  | 190 | + | 
|  | 191 | +  {% if not ignore %} | 
|  | 192 | +    {{ UI.link({ | 
|  | 193 | +      iCss: icon, | 
|  | 194 | +      iTooltip: { | 
|  | 195 | +        title: title | 
|  | 196 | +      }, | 
|  | 197 | +      class: 'settings-content-table-item-action-icon', | 
|  | 198 | +      aCss: 'js-entity-modal-template', | 
|  | 199 | +      data: { | 
|  | 200 | +        template: template, | 
|  | 201 | +        arguments: arguments|json_encode | 
|  | 202 | +      } | 
|  | 203 | +    }) }} | 
|  | 204 | +  {% endif %} | 
|  | 205 | +{% endmacro %} | 
|  | 206 | + | 
|  | 207 | +{% macro addActionToggleObject(title, icon, data = {}, ignore = false) %} | 
|  | 208 | +  {% import '@SymfonyAdmin/macros.html.twig' as UI %} | 
|  | 209 | + | 
|  | 210 | +  {% if not ignore %} | 
|  | 211 | +    {{ UI.link({ | 
|  | 212 | +      iCss: icon, | 
|  | 213 | +      iTooltip: { | 
|  | 214 | +        title: title | 
|  | 215 | +      }, | 
|  | 216 | +      class: 'settings-content-table-item-action-icon', | 
|  | 217 | +      aCss: 'js-toggle-object', | 
|  | 218 | +      data: data | 
|  | 219 | +    }) }} | 
|  | 220 | +  {% endif %} | 
|  | 221 | +{% endmacro %} | 
|  | 222 | + | 
|  | 223 | +{% macro renderUserLabel(user) %} | 
|  | 224 | +  {% import '@SymfonyAdmin/macros.html.twig' as UI %} | 
|  | 225 | + | 
|  | 226 | +  <div class="settings-content-company-user-list-item-thumbnail media"> | 
|  | 227 | +    <span class="settings-content-company-user-picture media-left"> | 
|  | 228 | +      {{ UI.profileImageComponentEntity(user) }} | 
|  | 229 | +    </span> | 
|  | 230 | +    <div class="settings-content-main-content media-body"> | 
|  | 231 | +      <a href="{{ path('admin_settings_users_profile_edit', {id: user.id}) }}" class="settings-content-company-user-text name">{{ user }}</a> | 
|  | 232 | +      <div class="settings-content-secondary-content email">{{ user.email }}</div> | 
|  | 233 | +    </div> | 
|  | 234 | +  </div> | 
|  | 235 | +{% endmacro %} | 
0 commit comments