Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

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: 02.04.2025, 15:04 - Dateigröße: 5.70 KiB


001  {% use "bootstrap_base_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 button_widget -%}
013      {%- set attr = attr|merge({class: (attr.class|default('btn-default') ~ ' btn')|trim}) -%}
014      {{- parent() -}}
015  {%- endblock button_widget %}
016   
017  {% block money_widget -%}
018      {% set prepend = not (money_pattern starts with '{{') %}
019      {% set append = not (money_pattern ends with '}}') %}
020      {% if prepend or append %}
021          <div class="input-group">
022              {% if prepend %}
023                  <span class="input-group-addon">{{ money_pattern|form_encode_currency }}</span>
024              {% endif %}
025              {{- block('form_widget_simple') -}}
026              {% if append %}
027                  <span class="input-group-addon">{{ money_pattern|form_encode_currency }}</span>
028              {% endif %}
029          </div>
030      {% else %}
031          {{- block('form_widget_simple') -}}
032      {% endif %}
033  {%- endblock money_widget %}
034   
035  {% block checkbox_widget -%}
036      {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
037      {% if 'checkbox-inline' in parent_label_class %}
038          {{- form_label(form, null, { widget: parent() }) -}}
039      {% else -%}
040          <div class="checkbox">
041              {{- form_label(form, null, { widget: parent() }) -}}
042          </div>
043      {%- endif -%}
044  {%- endblock checkbox_widget %}
045   
046  {% block radio_widget -%}
047      {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
048      {%- if 'radio-inline' in parent_label_class -%}
049          {{- form_label(form, null, { widget: parent() }) -}}
050      {%- else -%}
051          <div class="radio">
052              {{- form_label(form, null, { widget: parent() }) -}}
053          </div>
054      {%- endif -%}
055  {%- endblock radio_widget %}
056   
057  {# Labels #}
058   
059  {% block form_label -%}
060      {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' control-label')|trim}) -%}
061      {{- parent() -}}
062  {%- endblock form_label %}
063   
064  {% block choice_label -%}
065      {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #}
066      {%- set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) -%}
067      {{- block('form_label') -}}
068  {% endblock %}
069   
070  {% block checkbox_label -%}
071      {%- set label_attr = label_attr|merge({'for': id}) -%}
072   
073      {{- block('checkbox_radio_label') -}}
074  {%- endblock checkbox_label %}
075   
076  {% block radio_label -%}
077      {%- set label_attr = label_attr|merge({'for': id}) -%}
078   
079      {{- block('checkbox_radio_label') -}}
080  {%- endblock radio_label %}
081   
082  {% block checkbox_radio_label -%}
083      {# Do not display the label if widget is not defined in order to prevent double label rendering #}
084      {%- if widget is defined -%}
085          {%- if required -%}
086              {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%}
087          {%- endif -%}
088          {%- if parent_label_class is defined -%}
089              {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) -%}
090          {%- endif -%}
091          {%- if label is not same as(false) and label is empty -%}
092              {%- if label_format is not empty -%}
093                  {%- set label = label_format|replace({
094                      '%name%': name,
095                      '%id%': id,
096                  }) -%}
097              {%- else -%}
098                  {% set label = name|humanize %}
099              {%- endif -%}
100          {%- endif -%}
101          <label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
102              {{- widget|raw }} {{ label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}}
103          </label>
104      {%- endif -%}
105  {%- endblock checkbox_radio_label %}
106   
107  {# Rows #}
108   
109  {% block form_row -%}
110      <div class="form-group{% if (not compound or force_error|default(false)) and not valid %} has-error{% endif %}">
111          {{- form_label(form) }} {# -#}
112          {{ form_widget(form) }} {# -#}
113          {{ form_errors(form) }} {# -#}
114      </div> {# -#}
115  {%- endblock form_row %}
116   
117  {% block button_row -%}
118      <div class="form-group">
119          {{- form_widget(form) -}}
120      </div>
121  {%- endblock button_row %}
122   
123  {% block choice_row -%}
124      {% set force_error = true %}
125      {{- block('form_row') }}
126  {%- endblock choice_row %}
127   
128  {% block date_row -%}
129      {% set force_error = true %}
130      {{- block('form_row') }}
131  {%- endblock date_row %}
132   
133  {% block time_row -%}
134      {% set force_error = true %}
135      {{- block('form_row') }}
136  {%- endblock time_row %}
137   
138  {% block datetime_row -%}
139      {% set force_error = true %}
140      {{- block('form_row') }}
141  {%- endblock datetime_row %}
142   
143  {% block checkbox_row -%}
144      <div class="form-group{% if not valid %} has-error{% endif %}">
145          {{- form_widget(form) -}}
146          {{- form_errors(form) -}}
147      </div>
148  {%- endblock checkbox_row %}
149   
150  {% block radio_row -%}
151      <div class="form-group{% if not valid %} has-error{% endif %}">
152          {{- form_widget(form) -}}
153          {{- form_errors(form) -}}
154      </div>
155  {%- endblock radio_row %}
156   
157  {# Errors #}
158   
159  {% block form_errors -%}
160      {% if errors|length > 0 -%}
161      {% if form is not rootform %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %}
162      <ul class="list-unstyled">
163          {%- for error in errors -%}
164              <li><span class="glyphicon glyphicon-exclamation-sign"></span> {{ error.message }}</li>
165          {%- endfor -%}
166      </ul>
167      {% if form is not rootform %}</span>{% else %}</div>{% endif %}
168      {%- endif %}
169  {%- endblock form_errors %}
170