Initial commit
This commit is contained in:
75
pma/templates/database/routines/index.twig
Normal file
75
pma/templates/database/routines/index.twig
Normal file
@ -0,0 +1,75 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<fieldset id="tableFilter">
|
||||
<legend>{% trans "Filters" %}</legend>
|
||||
<div class="formelement">
|
||||
<label for="filterText">{% trans "Containing the word:" %}</label>
|
||||
<input name="filterText" type="text" id="filterText" value="">
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="rteListForm" class="ajax" action="{{ url('/database/routines') }}">
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
{% trans 'Routines' %}
|
||||
{{ show_mysql_docu('STORED_ROUTINES') }}
|
||||
</legend>
|
||||
|
||||
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
|
||||
{% trans 'There are no routines to display.' %}
|
||||
</div>
|
||||
|
||||
<table id="routinesTable" class="table table-light table-striped table-hover{{ items is empty ? ' hide' }} data w-auto">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% trans 'Name' %}</th>
|
||||
<th colspan="4">{% trans 'Action' %}</th>
|
||||
<th>{% trans 'Type' %}</th>
|
||||
<th>{% trans 'Returns' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="hide">{% for i in 0..7 %}<td></td>{% endfor %}</tr>
|
||||
|
||||
{{ rows|raw }}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if items is not empty %}
|
||||
<div class="withSelected">
|
||||
<img class="selectallarrow" src="{{ select_all_arrow_src }}" width="38" height="22" alt="{% trans 'With selected:' %}">
|
||||
<input type="checkbox" id="rteListForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
|
||||
<label for="rteListForm_checkall">{% trans 'Check all' %}</label>
|
||||
<em class="with-selected">{% trans 'With selected:' %}</em>
|
||||
|
||||
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="export" title="{% trans 'Export' %}">
|
||||
{{ get_icon('b_export', 'Export'|trans) }}
|
||||
</button>
|
||||
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="drop" title="{% trans 'Drop' %}">
|
||||
{{ get_icon('b_drop', 'Drop'|trans) }}
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<fieldset class="left">
|
||||
<legend>{% trans %}New{% context %}Create new routine{% endtrans %}</legend>
|
||||
<div class='wrap'>
|
||||
{% if has_privilege %}
|
||||
<a class="ajax add_anchor" href="{{ url('/database/routines', {'db': db, 'table': table, 'add_item': true}) }}">
|
||||
{{ get_icon('b_routine_add') }}
|
||||
{% trans 'Add routine' %}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_routine_add') }}
|
||||
{% trans 'Add routine' %}
|
||||
{% endif %}
|
||||
{{ show_mysql_docu('CREATE_PROCEDURE') }}
|
||||
</div>
|
||||
</fieldset>
|
54
pma/templates/database/routines/parameter_row.twig
Normal file
54
pma/templates/database/routines/parameter_row.twig
Normal file
@ -0,0 +1,54 @@
|
||||
<tr>
|
||||
<td class="dragHandle">
|
||||
<span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
|
||||
</td>
|
||||
<td class="routine_direction_cell{{ class }}">
|
||||
<select name="item_param_dir[{{ index }}]">
|
||||
{% for value in param_directions %}
|
||||
<option value="{{ value }}"{{ item_param_dir == value ? ' selected' }}>{{ value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input name="item_param_name[{{ index }}]" type="text" value="{{ item_param_name|raw }}">
|
||||
</td>
|
||||
<td>
|
||||
<select name="item_param_type[{{ index }}]">
|
||||
{{ supported_datatypes|raw }}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input id="item_param_length_{{ index }}" name="item_param_length[{{ index }}]" type="text" value="{{ item_param_length|raw }}">
|
||||
<div class="enum_hint">
|
||||
<a href="#" class="open_enum_editor">
|
||||
{{ get_image('b_edit', '', {'title': 'ENUM/SET editor'|trans}) }}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hide no_len">---</td>
|
||||
<td class="routine_param_opts_text">
|
||||
<select lang="en" dir="ltr" name="item_param_opts_text[{{ index }}]">
|
||||
<option value="">{% trans 'Charset' %}</option>
|
||||
<option value=""></option>
|
||||
{% for charset in charsets %}
|
||||
<option value="{{ charset.name }}" title="{{ charset.description }}"{{ charset.is_selected ? ' selected' }}>
|
||||
{{- charset.name -}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td class="hide no_opts">---</td>
|
||||
<td class="routine_param_opts_num">
|
||||
<select name="item_param_opts_num[{{ index }}]">
|
||||
<option value=""></option>
|
||||
{% for value in param_opts_num %}
|
||||
<option value="{{ value }}"{{ item_param_opts_num == value ? ' selected' }}>{{ value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td class="routine_param_remove{{ drop_class }}">
|
||||
<a href="#" class="routine_param_remove_anchor">
|
||||
{{ get_icon('b_drop', 'Drop'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
82
pma/templates/database/routines/row.twig
Normal file
82
pma/templates/database/routines/row.twig
Normal file
@ -0,0 +1,82 @@
|
||||
<tr{% if row_class is not empty %} class="{{ row_class }}"{% endif %} data-filter-row="{{ routine.name|upper }}">
|
||||
<td>
|
||||
<input type="checkbox" class="checkall" name="item_name[]" value="{{ routine.name }}">
|
||||
</td>
|
||||
<td>
|
||||
<span class="drop_sql hide">{{ sql_drop }}</span>
|
||||
<strong>{{ routine.name }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{% if has_edit_privilege %}
|
||||
<a class="ajax edit_anchor" href="{{ url('/database/routines', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'edit_item': true,
|
||||
'item_name': routine.name,
|
||||
'item_type': routine.type
|
||||
}) }}">
|
||||
{{ get_icon('b_edit', 'Edit'|trans) }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_edit', 'Edit'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if has_execute_privilege and execute_action is not empty %}
|
||||
{% if execute_action == 'execute_routine' %}
|
||||
<a class="ajax exec_anchor" href="{{ url('/database/routines', {'db': db, 'table': table}) }}" data-post="{{ get_common({
|
||||
'execute_routine': true,
|
||||
'item_name': routine.name,
|
||||
'item_type': routine.type
|
||||
}, '') }}">
|
||||
{{ get_icon('b_nextpage', 'Execute'|trans) }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="ajax exec_anchor" href="{{ url('/database/routines', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'execute_dialog': true,
|
||||
'item_name': routine.name,
|
||||
'item_type': routine.type
|
||||
}) }}">
|
||||
{{ get_icon('b_nextpage', 'Execute'|trans) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ get_icon('bd_nextpage', 'Execute'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if has_export_privilege %}
|
||||
<a class="ajax export_anchor" href="{{ url('/database/routines', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'export_item': true,
|
||||
'item_name': routine.name,
|
||||
'item_type': routine.type
|
||||
}) }}">
|
||||
{{ get_icon('b_export', 'Export'|trans) }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_export', 'Export'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ link_or_button(
|
||||
url('/sql', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'sql_query': sql_drop,
|
||||
'goto': url('/database/routines', {'db': db})
|
||||
}),
|
||||
get_icon('b_drop', 'Drop'|trans),
|
||||
{'class': 'ajax drop_anchor'}
|
||||
) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ routine.type }}
|
||||
</td>
|
||||
<td dir="ltr">
|
||||
{{ routine.returns }}
|
||||
</td>
|
||||
</tr>
|
Reference in New Issue
Block a user