Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

bootstrap_3_layout.html.twig

Zuletzt modifiziert: 09.10.2024, 12:58 - Dateigröße: 8.49 KiB


001  {% use "form_div_layout.html.twig" %}
002   
003  {# Widgets #}
004   
005  {% block form_widget_simple -%}
006      {% if type is not defined or type not in ['file', 'hidden'] %}
007          {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%}
008      {% endif %}
009      {{- parent() -}}
010  {%- endblock form_widget_simple %}
011   
012  {% block textarea_widget -%}
013      {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) %}
014      {{- parent() -}}
015  {%- endblock textarea_widget %}
016   
017  {% block button_widget -%}
018      {% set attr = attr|merge({class: (attr.class|default('btn-default') ~ ' btn')|trim}) %}
019      {{- parent() -}}
020  {%- endblock %}
021   
022  {% block money_widget -%}
023      <div class="input-group">
024          {% set append = money_pattern starts with '{{' %}
025          {% if not append %}
026              <span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
027          {% endif %}
028          {{- block('form_widget_simple') -}}
029          {% if append %}
030              <span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
031          {% endif %}
032      </div>
033  {%- endblock money_widget %}
034   
035  {% block percent_widget -%}
036      <div class="input-group">
037          {{- block('form_widget_simple') -}}
038          <span class="input-group-addon">%</span>
039      </div>
040  {%- endblock percent_widget %}
041   
042  {% block datetime_widget -%}
043      {% if widget == 'single_text' %}
044          {{- block('form_widget_simple') -}}
045      {% else -%}
046          {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
047          <div {{ block('widget_container_attributes') }}>
048              {{- form_errors(form.date) -}}
049              {{- form_errors(form.time) -}}
050              {{- form_widget(form.date, { datetime: true } ) -}}
051              {{- form_widget(form.time, { datetime: true } ) -}}
052          </div>
053      {%- endif %}
054  {%- endblock datetime_widget %}
055   
056  {% block date_widget -%}
057      {% if widget == 'single_text' %}
058          {{- block('form_widget_simple') -}}
059      {% else -%}
060          {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
061          {% if datetime is not defined or not datetime -%}
062              <div {{ block('widget_container_attributes') -}}>
063          {%- endif %}
064              {{- date_pattern|replace({
065                  '{{ year }}': form_widget(form.year),
066                  '{{ month }}': form_widget(form.month),
067                  '{{ day }}': form_widget(form.day),
068              })|raw -}}
069          {% if datetime is not defined or not datetime -%}
070              </div>
071          {%- endif -%}
072      {% endif %}
073  {%- endblock date_widget %}
074   
075  {% block time_widget -%}
076      {% if widget == 'single_text' %}
077          {{- block('form_widget_simple') -}}
078      {% else -%}
079          {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
080          {% if datetime is not defined or false == datetime -%}
081              <div {{ block('widget_container_attributes') -}}>
082          {%- endif -%}
083          {{- form_widget(form.hour) }}{% if with_minutes %}:{{ form_widget(form.minute) }}{% endif %}{% if with_seconds %}:{{ form_widget(form.second) }}{% endif %}
084          {% if datetime is not defined or false == datetime -%}
085              </div>
086          {%- endif -%}
087      {% endif %}
088  {%- endblock time_widget %}
089   
090  {% block choice_widget_collapsed -%}
091      {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) %}
092      {{- parent() -}}
093  {%- endblock %}
094   
095  {% block choice_widget_expanded -%}
096      {% if '-inline' in label_attr.class|default('') -%}
097          {%- for child in form %}
098              {{- form_widget(child, {
099                  parent_label_class: label_attr.class|default(''),
100                  translation_domain: choice_translation_domain,
101              }) -}}
102          {% endfor -%}
103      {%- else -%}
104          <div {{ block('widget_container_attributes') }}>
105              {%- for child in form %}
106                  {{- form_widget(child, {
107                      parent_label_class: label_attr.class|default(''),
108                      translation_domain: choice_translation_domain,
109                  }) -}}
110              {% endfor -%}
111          </div>
112      {%- endif %}
113  {%- endblock choice_widget_expanded %}
114   
115  {% block checkbox_widget -%}
116      {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
117      {% if 'checkbox-inline' in parent_label_class %}
118          {{- form_label(form, null, { widget: parent() }) -}}
119      {% else -%}
120          <div class="checkbox">
121              {{- form_label(form, null, { widget: parent() }) -}}
122          </div>
123      {%- endif %}
124  {%- endblock checkbox_widget %}
125   
126  {% block radio_widget -%}
127      {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
128      {% if 'radio-inline' in parent_label_class %}
129          {{- form_label(form, null, { widget: parent() }) -}}
130      {% else -%}
131          <div class="radio">
132              {{- form_label(form, null, { widget: parent() }) -}}
133          </div>
134      {%- endif %}
135  {%- endblock radio_widget %}
136   
137  {# Labels #}
138   
139  {% block form_label -%}
140      {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' control-label')|trim}) -%}
141      {{- parent() -}}
142  {%- endblock form_label %}
143   
144  {% block choice_label -%}
145      {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #}
146      {%- set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) -%}
147      {{- block('form_label') -}}
148  {% endblock %}
149   
150  {% block checkbox_label -%}
151      {{- block('checkbox_radio_label') -}}
152  {%- endblock checkbox_label %}
153   
154  {% block radio_label -%}
155      {{- block('checkbox_radio_label') -}}
156  {%- endblock radio_label %}
157   
158  {% block checkbox_radio_label %}
159      {# Do not display the label if widget is not defined in order to prevent double label rendering #}
160      {% if widget is defined %}
161          {% if required %}
162              {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %}
163          {% endif %}
164          {% if parent_label_class is defined %}
165              {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) %}
166          {% endif %}
167          {% if label is not same as(false) and label is empty %}
168              {%- if label_format is not empty -%}
169                  {% set label = label_format|replace({
170                      '%name%': name,
171                      '%id%': id,
172                  }) %}
173              {%- else -%}
174                  {% set label = name|humanize %}
175              {%- endif -%}
176          {% endif %}
177          <label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
178              {{- widget|raw }} {{ label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}}
179          </label>
180      {% endif %}
181  {% endblock checkbox_radio_label %}
182   
183  {# Rows #}
184   
185  {% block form_row -%}
186      <div class="form-group{% if (not compound or force_error|default(false)) and not valid %} has-error{% endif %}">
187          {{- form_label(form) -}}
188          {{- form_widget(form) -}}
189          {{- form_errors(form) -}}
190      </div>
191  {%- endblock form_row %}
192   
193  {% block button_row -%}
194      <div class="form-group">
195          {{- form_widget(form) -}}
196      </div>
197  {%- endblock button_row %}
198   
199  {% block choice_row -%}
200      {% set force_error = true %}
201      {{- block('form_row') }}
202  {%- endblock choice_row %}
203   
204  {% block date_row -%}
205      {% set force_error = true %}
206      {{- block('form_row') }}
207  {%- endblock date_row %}
208   
209  {% block time_row -%}
210      {% set force_error = true %}
211      {{- block('form_row') }}
212  {%- endblock time_row %}
213   
214  {% block datetime_row -%}
215      {% set force_error = true %}
216      {{- block('form_row') }}
217  {%- endblock datetime_row %}
218   
219  {% block checkbox_row -%}
220      <div class="form-group{% if not valid %} has-error{% endif %}">
221          {{- form_widget(form) -}}
222          {{- form_errors(form) -}}
223      </div>
224  {%- endblock checkbox_row %}
225   
226  {% block radio_row -%}
227      <div class="form-group{% if not valid %} has-error{% endif %}">
228          {{- form_widget(form) -}}
229          {{- form_errors(form) -}}
230      </div>
231  {%- endblock radio_row %}
232   
233  {# Errors #}
234   
235  {% block form_errors -%}
236      {% if errors|length > 0 -%}
237      {% if form.parent %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %}
238      <ul class="list-unstyled">
239          {%- for error in errors -%}
240              <li><span class="glyphicon glyphicon-exclamation-sign"></span> {{ error.message }}</li>
241          {%- endfor -%}
242      </ul>
243      {% if form.parent %}</span>{% else %}</div>{% endif %}
244      {%- endif %}
245  {%- endblock form_errors %}
246