Skip to content

Commit

Permalink
Convert Results Operations to Bootstrap's card
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Mar 13, 2022
1 parent d5287b1 commit 12ff485
Showing 1 changed file with 41 additions and 39 deletions.
80 changes: 41 additions & 39 deletions templates/display/results/table.twig
Expand Up @@ -251,54 +251,56 @@
{{ navigation_html }}

{% if operations is not empty %}
<fieldset class="pma-fieldset d-print-none">
<legend>{% trans 'Query results operations' %}</legend>

{% if operations.has_print_link %}
<button type="button" class="btn btn-link jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>

{{ link_or_button(
'#',
null,
get_icon('b_insrow', 'Copy to clipboard'|trans, true),
{'id': 'copyToClipBoard', 'class': 'btn'}
) }}
{% endif %}
<div class="card d-print-none">
<div class="card-header">{% trans 'Query results operations' %}</div>

{% if not operations.has_procedure %}
{% if operations.has_export_link %}
{{ link_or_button(
url('/table/export'),
operations.url_params,
get_icon('b_tblexport', 'Export'|trans, true),
{'class': 'btn'}
) }}
<div class="card-body">
{% if operations.has_print_link %}
<button type="button" class="btn btn-link jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>

{{ link_or_button(
url('/table/chart'),
operations.url_params,
get_icon('b_chart', 'Display chart'|trans, true),
{'class': 'btn'}
'#',
null,
get_icon('b_insrow', 'Copy to clipboard'|trans, true),
{'id': 'copyToClipBoard', 'class': 'btn'}
) }}
{% endif %}

{% if not operations.has_procedure %}
{% if operations.has_export_link %}
{{ link_or_button(
url('/table/export'),
operations.url_params,
get_icon('b_tblexport', 'Export'|trans, true),
{'class': 'btn'}
) }}

{% if operations.has_geometry %}
{{ link_or_button(
url('/table/gis-visualization'),
url('/table/chart'),
operations.url_params,
get_icon('b_globe', 'Visualize GIS data'|trans, true),
get_icon('b_chart', 'Display chart'|trans, true),
{'class': 'btn'}
) }}

{% if operations.has_geometry %}
{{ link_or_button(
url('/table/gis-visualization'),
operations.url_params,
get_icon('b_globe', 'Visualize GIS data'|trans, true),
{'class': 'btn'}
) }}
{% endif %}
{% endif %}
{% endif %}

<span>
{{ link_or_button(
url('/view/create'),
{'db': db, 'table': table, 'sql_query': sql_query, 'printview': true},
get_icon('b_view_add', 'Create view'|trans, true),
{'class': 'btn create_view ajax'}
) }}
</span>
{% endif %}
</fieldset>
<span>
{{ link_or_button(
url('/view/create'),
{'db': db, 'table': table, 'sql_query': sql_query, 'printview': true},
get_icon('b_view_add', 'Create view'|trans, true),
{'class': 'btn create_view ajax'}
) }}
</span>
{% endif %}
</div>
</div>
{% endif %}

0 comments on commit 12ff485

Please sign in to comment.