Skip to content

Commit 12ff485

Browse files
committed
Convert Results Operations to Bootstrap's card
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent d5287b1 commit 12ff485

File tree

1 file changed

+41
-39
lines changed

1 file changed

+41
-39
lines changed

templates/display/results/table.twig

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -251,54 +251,56 @@
251251
{{ navigation_html }}
252252

253253
{% if operations is not empty %}
254-
<fieldset class="pma-fieldset d-print-none">
255-
<legend>{% trans 'Query results operations' %}</legend>
256-
257-
{% if operations.has_print_link %}
258-
<button type="button" class="btn btn-link jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
259-
260-
{{ link_or_button(
261-
'#',
262-
null,
263-
get_icon('b_insrow', 'Copy to clipboard'|trans, true),
264-
{'id': 'copyToClipBoard', 'class': 'btn'}
265-
) }}
266-
{% endif %}
254+
<div class="card d-print-none">
255+
<div class="card-header">{% trans 'Query results operations' %}</div>
267256

268-
{% if not operations.has_procedure %}
269-
{% if operations.has_export_link %}
270-
{{ link_or_button(
271-
url('/table/export'),
272-
operations.url_params,
273-
get_icon('b_tblexport', 'Export'|trans, true),
274-
{'class': 'btn'}
275-
) }}
257+
<div class="card-body">
258+
{% if operations.has_print_link %}
259+
<button type="button" class="btn btn-link jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
276260

277261
{{ link_or_button(
278-
url('/table/chart'),
279-
operations.url_params,
280-
get_icon('b_chart', 'Display chart'|trans, true),
281-
{'class': 'btn'}
262+
'#',
263+
null,
264+
get_icon('b_insrow', 'Copy to clipboard'|trans, true),
265+
{'id': 'copyToClipBoard', 'class': 'btn'}
282266
) }}
267+
{% endif %}
268+
269+
{% if not operations.has_procedure %}
270+
{% if operations.has_export_link %}
271+
{{ link_or_button(
272+
url('/table/export'),
273+
operations.url_params,
274+
get_icon('b_tblexport', 'Export'|trans, true),
275+
{'class': 'btn'}
276+
) }}
283277

284-
{% if operations.has_geometry %}
285278
{{ link_or_button(
286-
url('/table/gis-visualization'),
279+
url('/table/chart'),
287280
operations.url_params,
288-
get_icon('b_globe', 'Visualize GIS data'|trans, true),
281+
get_icon('b_chart', 'Display chart'|trans, true),
289282
{'class': 'btn'}
290283
) }}
284+
285+
{% if operations.has_geometry %}
286+
{{ link_or_button(
287+
url('/table/gis-visualization'),
288+
operations.url_params,
289+
get_icon('b_globe', 'Visualize GIS data'|trans, true),
290+
{'class': 'btn'}
291+
) }}
292+
{% endif %}
291293
{% endif %}
292-
{% endif %}
293294

294-
<span>
295-
{{ link_or_button(
296-
url('/view/create'),
297-
{'db': db, 'table': table, 'sql_query': sql_query, 'printview': true},
298-
get_icon('b_view_add', 'Create view'|trans, true),
299-
{'class': 'btn create_view ajax'}
300-
) }}
301-
</span>
302-
{% endif %}
303-
</fieldset>
295+
<span>
296+
{{ link_or_button(
297+
url('/view/create'),
298+
{'db': db, 'table': table, 'sql_query': sql_query, 'printview': true},
299+
get_icon('b_view_add', 'Create view'|trans, true),
300+
{'class': 'btn create_view ajax'}
301+
) }}
302+
</span>
303+
{% endif %}
304+
</div>
305+
</div>
304306
{% endif %}

0 commit comments

Comments
 (0)