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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
bootstrap_base_layout.html.twig
001 {% use "form_div_layout.html.twig" %}
002
003 {# Widgets #}
004
005 {% block textarea_widget -%}
006 {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) %}
007 {{- parent() -}}
008 {%- endblock textarea_widget %}
009
010 {% block money_widget -%}
011 {% set prepend = not (money_pattern starts with '{{') %}
012 {% set append = not (money_pattern ends with '}}') %}
013 {% if prepend or append %}
014 <div class="input-group{{ group_class|default('') }}">
015 {% if prepend %}
016 <span class="input-group-addon">{{ money_pattern|form_encode_currency }}</span>
017 {% endif %}
018 {{- block('form_widget_simple') -}}
019 {% if append %}
020 <span class="input-group-addon">{{ money_pattern|form_encode_currency }}</span>
021 {% endif %}
022 </div>
023 {% else %}
024 {{- block('form_widget_simple') -}}
025 {% endif %}
026 {%- endblock money_widget %}
027
028 {% block percent_widget -%}
029 <div class="input-group">
030 {{- block('form_widget_simple') -}}
031 <span class="input-group-addon">%</span>
032 </div>
033 {%- endblock percent_widget %}
034
035 {% block datetime_widget -%}
036 {%- if widget == 'single_text' -%}
037 {{- block('form_widget_simple') -}}
038 {%- else -%}
039 {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
040 <div {{ block('widget_container_attributes') }}>
041 {{- form_errors(form.date) -}}
042 {{- form_errors(form.time) -}}
043
044 <div class="sr-only">
045 {%- if form.date.year is defined %}{{ form_label(form.date.year) }}{% endif -%}
046 {%- if form.date.month is defined %}{{ form_label(form.date.month) }}{% endif -%}
047 {%- if form.date.day is defined %}{{ form_label(form.date.day) }}{% endif -%}
048 {%- if form.time.hour is defined %}{{ form_label(form.time.hour) }}{% endif -%}
049 {%- if form.time.minute is defined %}{{ form_label(form.time.minute) }}{% endif -%}
050 {%- if form.time.second is defined %}{{ form_label(form.time.second) }}{% endif -%}
051 </div>
052
053 {{- form_widget(form.date, { datetime: true } ) -}}
054 {{- form_widget(form.time, { datetime: true } ) -}}
055 </div>
056 {%- endif -%}
057 {%- endblock datetime_widget %}
058
059 {% block date_widget -%}
060 {%- if widget == 'single_text' -%}
061 {{- block('form_widget_simple') -}}
062 {%- else -%}
063 {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
064 {%- if datetime is not defined or not datetime -%}
065 <div {{ block('widget_container_attributes') -}}>
066 {%- endif %}
067 <div class="sr-only">
068 {{ form_label(form.year) }}
069 {{ form_label(form.month) }}
070 {{ form_label(form.day) }}
071 </div>
072
073 {{- date_pattern|replace({
074 '{{ year }}': form_widget(form.year),
075 '{{ month }}': form_widget(form.month),
076 '{{ day }}': form_widget(form.day),
077 })|raw -}}
078 {%- if datetime is not defined or not datetime -%}
079 </div>
080 {%- endif -%}
081 {%- endif -%}
082 {%- endblock date_widget %}
083
084 {% block time_widget -%}
085 {%- if widget == 'single_text' -%}
086 {{- block('form_widget_simple') -}}
087 {%- else -%}
088 {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
089 {%- if datetime is not defined or false == datetime -%}
090 <div {{ block('widget_container_attributes') -}}>
091 {%- endif -%}
092 <div class="sr-only">{{ form_label(form.hour) }}</div>
093 {{- form_widget(form.hour) -}}
094 {%- if with_minutes -%}:<div class="sr-only">{{ form_label(form.minute) }}</div>{{ form_widget(form.minute) }}{%- endif -%}
095 {%- if with_seconds -%}:<div class="sr-only">{{ form_label(form.second) }}</div>{{ form_widget(form.second) }}{%- endif -%}
096 {%- if datetime is not defined or false == datetime -%}
097 </div>
098 {%- endif -%}
099 {%- endif -%}
100 {%- endblock time_widget %}
101
102 {%- block dateinterval_widget -%}
103 {%- if widget == 'single_text' -%}
104 {{- block('form_widget_simple') -}}
105 {%- else -%}
106 {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
107 <div {{ block('widget_container_attributes') }}>
108 {{- form_errors(form) -}}
109 <div class="table-responsive">
110 <table class="table {{ table_class|default('table-bordered table-condensed table-striped') }}" role="presentation">
111 <thead>
112 <tr>
113 {%- if with_years %}<th>{{ form_label(form.years) }}</th>{% endif -%}
114 {%- if with_months %}<th>{{ form_label(form.months) }}</th>{% endif -%}
115 {%- if with_weeks %}<th>{{ form_label(form.weeks) }}</th>{% endif -%}
116 {%- if with_days %}<th>{{ form_label(form.days) }}</th>{% endif -%}
117 {%- if with_hours %}<th>{{ form_label(form.hours) }}</th>{% endif -%}
118 {%- if with_minutes %}<th>{{ form_label(form.minutes) }}</th>{% endif -%}
119 {%- if with_seconds %}<th>{{ form_label(form.seconds) }}</th>{% endif -%}
120 </tr>
121 </thead>
122 <tbody>
123 <tr>
124 {%- if with_years %}<td>{{ form_widget(form.years) }}</td>{% endif -%}
125 {%- if with_months %}<td>{{ form_widget(form.months) }}</td>{% endif -%}
126 {%- if with_weeks %}<td>{{ form_widget(form.weeks) }}</td>{% endif -%}
127 {%- if with_days %}<td>{{ form_widget(form.days) }}</td>{% endif -%}
128 {%- if with_hours %}<td>{{ form_widget(form.hours) }}</td>{% endif -%}
129 {%- if with_minutes %}<td>{{ form_widget(form.minutes) }}</td>{% endif -%}
130 {%- if with_seconds %}<td>{{ form_widget(form.seconds) }}</td>{% endif -%}
131 </tr>
132 </tbody>
133 </table>
134 </div>
135 {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%}
136 </div>
137 {%- endif -%}
138 {%- endblock dateinterval_widget -%}
139
140 {% block choice_widget_collapsed -%}
141 {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%}
142 {{- parent() -}}
143 {%- endblock choice_widget_collapsed %}
144
145 {% block choice_widget_expanded -%}
146 {%- if '-inline' in label_attr.class|default('') -%}
147 {%- for child in form %}
148 {{- form_widget(child, {
149 parent_label_class: label_attr.class|default(''),
150 translation_domain: choice_translation_domain,
151 }) -}}
152 {% endfor -%}
153 {%- else -%}
154 <div {{ block('widget_container_attributes') }}>
155 {%- for child in form %}
156 {{- form_widget(child, {
157 parent_label_class: label_attr.class|default(''),
158 translation_domain: choice_translation_domain,
159 }) -}}
160 {%- endfor -%}
161 </div>
162 {%- endif -%}
163 {%- endblock choice_widget_expanded %}
164
165 {# Labels #}
166
167 {% block choice_label -%}
168 {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #}
169 {%- set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': '', 'checkbox-custom': '', 'radio-custom': ''})|trim}) -%}
170 {{- block('form_label') -}}
171 {% endblock choice_label %}
172
173 {% block checkbox_label -%}
174 {{- block('checkbox_radio_label') -}}
175 {%- endblock checkbox_label %}
176
177 {% block radio_label -%}
178 {{- block('checkbox_radio_label') -}}
179 {%- endblock radio_label %}
180
181 {# Rows #}
182
183 {% block button_row -%}
184 <div class="form-group">
185 {{- form_widget(form) -}}
186 </div>
187 {%- endblock button_row %}
188
189 {% block choice_row -%}
190 {%- set force_error = true -%}
191 {{- block('form_row') -}}
192 {%- endblock choice_row %}
193
194 {% block date_row -%}
195 {%- set force_error = true -%}
196 {{- block('form_row') -}}
197 {%- endblock date_row %}
198
199 {% block time_row -%}
200 {%- set force_error = true -%}
201 {{- block('form_row') -}}
202 {%- endblock time_row %}
203
204 {% block datetime_row -%}
205 {%- set force_error = true -%}
206 {{- block('form_row') -}}
207 {%- endblock datetime_row %}
208