Update website
This commit is contained in:
parent
a0b0d3dae7
commit
ae7ef6ad45
3151 changed files with 566766 additions and 48 deletions
|
@ -0,0 +1,22 @@
|
|||
<form id="multi_edit_central_columns">
|
||||
<table id="table_columns" class="pma-table noclick">
|
||||
<caption class="tblHeaders">{% trans 'Structure' %}</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans 'Name' %}</th>
|
||||
<th>{% trans 'Type' %}</th>
|
||||
<th>{% trans 'Length/Values' %}</th>
|
||||
<th>{% trans 'Default' %}</th>
|
||||
<th>{% trans 'Collation' %}</th>
|
||||
<th>{% trans 'Attributes' %}</th>
|
||||
<th>{% trans 'Null' %}</th>
|
||||
<th>{% trans %}A_I{% context %}Auto Increment{% endtrans %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{ rows|raw }}
|
||||
</table>
|
||||
|
||||
<fieldset class="tblFooters">
|
||||
<input class="btn btn-primary" type="submit" name="save_multi_central_column_edit" value="{% trans 'Save' %}">
|
||||
</fieldset>
|
||||
</form>
|
|
@ -0,0 +1,85 @@
|
|||
<tr>
|
||||
<input name="orig_col_name[{{ row_num }}]" type="hidden" value="{{ row['col_name'] }}">
|
||||
<td name="col_name" class="nowrap">
|
||||
{% include 'columns_definitions/column_name.twig' with {
|
||||
'column_number': row_num,
|
||||
'ci': 0,
|
||||
'ci_offset': 0,
|
||||
'column_meta': {'Field': row['col_name']},
|
||||
'cfg_relation': {'centralcolumnswork': false},
|
||||
'max_rows': max_rows
|
||||
} only %}
|
||||
</td>
|
||||
|
||||
<td name="col_type" class="nowrap">
|
||||
<select class="column_type" name="field_type[{{ row_num }}]" id="field_{{ row_num }}_1">
|
||||
{{ get_supported_datatypes(true, row['col_type']|upper) }}
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td class="nowrap" name="col_length">
|
||||
<input id="field_{{ row_num }}_2" type="text" name="field_length[{{ row_num }}]" size="8" value="{{ row['col_length'] }}" class="textfield">
|
||||
<p class="enum_notice" id="enum_notice_{{ row_num }}_2">
|
||||
<a href="#" class="open_enum_editor">{% trans 'Edit ENUM/SET values' %}</a>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<td class="nowrap" name="col_default">
|
||||
<select name="field_default_type[{{ row_num }}]" id="field_{{ row_num }}_3" class="default_type">
|
||||
<option value="NONE"{{ meta['DefaultType'] is defined and meta['DefaultType'] == 'NONE' ? ' selected' }}>
|
||||
{% trans %}None{% context %}for default{% endtrans %}
|
||||
</option>
|
||||
<option value="USER_DEFINED"{{ meta['DefaultType'] is defined and meta['DefaultType'] == 'USER_DEFINED' ? ' selected' }}>
|
||||
{% trans 'As defined:' %}
|
||||
</option>
|
||||
<option value="NULL"{{ meta['DefaultType'] is defined and meta['DefaultType'] == 'NULL' ? ' selected' }}>
|
||||
NULL
|
||||
</option>
|
||||
<option value="CURRENT_TIMESTAMP"{{ meta['DefaultType'] is defined and meta['DefaultType'] == 'CURRENT_TIMESTAMP' ? ' selected' }}>
|
||||
CURRENT_TIMESTAMP
|
||||
</option>
|
||||
</select>
|
||||
{% if char_editing == 'textarea' %}
|
||||
<textarea name="field_default_value[{{ row_num }}]" cols="15" class="textfield default_value"></textarea>
|
||||
{% else %}
|
||||
<input type="text" name="field_default_value[{{ row_num }}]" size="12" value="" class="textfield default_value">
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td name="collation" class="nowrap">
|
||||
<select lang="en" dir="ltr" name="field_collation[{{ row_num }}]" id="field_{{ row_num }}_4">
|
||||
<option value=""></option>
|
||||
{% for charset in charsets %}
|
||||
<optgroup label="{{ charset.getName() }}" title="{{ charset.getDescription() }}">
|
||||
{% for collation in collations[charset.getName()] %}
|
||||
<option value="{{ collation.getName() }}" title="{{ collation.getDescription() }}"{{ row['col_collation'] == collation.getName() ? ' selected' }}>
|
||||
{{ collation.getName() }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td class="nowrap" name="col_attribute">
|
||||
{% include 'columns_definitions/column_attribute.twig' with {
|
||||
'column_number': row_num,
|
||||
'ci': 5,
|
||||
'ci_offset': 0,
|
||||
'column_meta': [],
|
||||
'extracted_columnspec': {'attribute': row['col_attribute']},
|
||||
'submit_attribute': false,
|
||||
'attribute_types': attribute_types
|
||||
} only %}
|
||||
</td>
|
||||
|
||||
<td class="nowrap" name="col_isNull">
|
||||
<input name="field_null[{{ row_num }}]" id="field_{{ row_num }}_6" type="checkbox" value="YES" class="allow_null"
|
||||
{{- row['col_isNull'] is not empty and row['col_isNull'] != 'NO' and row['col_isNull'] != 'NOT NULL' ? ' checked' }}>
|
||||
</td>
|
||||
|
||||
<td class="nowrap" name="col_extra">
|
||||
<input name="col_extra[{{ row_num }}]" id="field_{{ row_num }}_7" type="checkbox" value="auto_increment"
|
||||
{{- row['col_extra'] is not empty and row['col_extra'] == 'auto_increment' }}>
|
||||
</td>
|
||||
</tr>
|
390
admin/phpMyAdmin/templates/database/central_columns/main.twig
Normal file
390
admin/phpMyAdmin/templates/database/central_columns/main.twig
Normal file
|
@ -0,0 +1,390 @@
|
|||
{# getHtmlForAddNewColumn #}
|
||||
<div id="add_col_div" class="topmargin">
|
||||
<a href="#">
|
||||
<span>{{ (total_rows > 0) ? '+' : '-' }}</span>{% trans 'Add new column' %}
|
||||
</a>
|
||||
<form id="add_new" class="new_central_col{{ (total_rows != 0) ? ' hide' : ''}}"
|
||||
method="post" action="{{ url('/database/central-columns') }}">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="add_new_column" value="add_new_column">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-light w-auto">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="" title="" data-column="name">
|
||||
{% trans 'Name' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="" title="" data-column="type">
|
||||
{% trans 'Type' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="" title="" data-column="length">
|
||||
{% trans 'Length/Value' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="" title="" data-column="default">
|
||||
{% trans 'Default' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="" title="" data-column="collation">
|
||||
{% trans 'Collation' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="" title="" data-column="attribute">
|
||||
{% trans 'Attribute' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="" title="" data-column="isnull">
|
||||
{% trans 'Null' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="" title="" data-column="extra">
|
||||
{% trans 'A_I' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td name="col_name" class="nowrap">
|
||||
{% include 'columns_definitions/column_name.twig' with {
|
||||
'column_number': 0,
|
||||
'ci': 0,
|
||||
'ci_offset': 0,
|
||||
'column_meta': {},
|
||||
'cfg_relation': {
|
||||
'centralcolumnswork': false
|
||||
},
|
||||
'max_rows': max_rows,
|
||||
} only %}
|
||||
</td>
|
||||
<td name="col_type" class="nowrap">
|
||||
<select class="column_type" name="field_type[0]" id="field_0_1">
|
||||
{{ get_supported_datatypes(true) }}
|
||||
</select>
|
||||
</td>
|
||||
<td class="nowrap" name="col_length">
|
||||
<input id="field_0_2" type="text" name="field_length[0]" size="8" value="" class="textfield">
|
||||
<p class="enum_notice" id="enum_notice_0_2">
|
||||
<a href="#" class="open_enum_editor">{% trans 'Edit ENUM/SET values' %}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td class="nowrap" name="col_default">
|
||||
<select name="field_default_type[0]" id="field_0_3" class="default_type">
|
||||
<option value="NONE">{% trans %}None{% context %}for default{% endtrans %}</option>
|
||||
<option value="USER_DEFINED">{% trans 'As defined:' %}</option>
|
||||
<option value="NULL">NULL</option>
|
||||
<option value="CURRENT_TIMESTAMP">CURRENT_TIMESTAMP</option>
|
||||
</select>
|
||||
{% if char_editing == 'textarea' %}
|
||||
<textarea name="field_default_value[0]" cols="15" class="textfield default_value"></textarea>
|
||||
{% else %}
|
||||
<input type="text" name="field_default_value[0]" size="12" value="" class="textfield default_value">
|
||||
{% endif %}
|
||||
</td>
|
||||
<td name="collation" class="nowrap">
|
||||
<select lang="en" dir="ltr" name="field_collation[0]" id="field_0_4">
|
||||
<option value=""></option>
|
||||
{% for charset in charsets %}
|
||||
<optgroup label="{{ charset.name }}" title="{{ charset.description }}">
|
||||
{% for collation in charset.collations %}
|
||||
<option value="{{ collation.name }}" title="{{ collation.description }}">
|
||||
{{- collation.name -}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td class="nowrap" name="col_attribute">
|
||||
{% include 'columns_definitions/column_attribute.twig' with {
|
||||
'column_number': 0,
|
||||
'ci': 5,
|
||||
'ci_offset': 0,
|
||||
'extracted_columnspec': {},
|
||||
'column_meta': {},
|
||||
'submit_attribute': false,
|
||||
'attribute_types': attribute_types,
|
||||
} only %}
|
||||
</td>
|
||||
<td class="nowrap" name="col_isNull">
|
||||
<input name="field_null[0]" id="field_0_6" type="checkbox" value="YES" class="allow_null">
|
||||
</td>
|
||||
<td class="nowrap" name="col_extra">
|
||||
<input name="col_extra[0]" id="field_0_7" type="checkbox" value="auto_increment">
|
||||
</td>
|
||||
<td>
|
||||
<input id="add_column_save" class="btn btn-primary" type="submit" value="Save">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% if total_rows <= 0 %}
|
||||
<fieldset>
|
||||
{% trans 'The central list of columns for the current database is empty' %}
|
||||
</fieldset>
|
||||
{% else %}
|
||||
<table class="table table-borderless table-sm w-auto d-inline-block navigation">
|
||||
<tr>
|
||||
<td class="navigation_separator"></td>
|
||||
{% if pos - max_rows >= 0 %}
|
||||
<td>
|
||||
<form action="{{ url('/database/central-columns') }}" method="post">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="pos" value="{{ pos - max_rows }}">
|
||||
<input type="hidden" name="total_rows" value="{{ total_rows }}">
|
||||
<input class="btn btn-secondary ajax" type="submit" name="navig" value="<">
|
||||
</form>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if tn_nbTotalPage > 1 %}
|
||||
<td>
|
||||
<form action="{{ url('/database/central-columns') }}" method="post">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="total_rows" value="{{ total_rows }}">
|
||||
{{ tn_page_selector | raw }}
|
||||
</form>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if pos + max_rows < total_rows %}
|
||||
<td>
|
||||
<form action="{{ url('/database/central-columns') }}" method="post">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="pos" value="{{ pos + max_rows }}">
|
||||
<input type="hidden" name="total_rows" value="{{ total_rows }}">
|
||||
<input class="btn btn-secondary ajax" type="submit" name="navig" value=">">
|
||||
</form>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="navigation_separator"></td>
|
||||
<td>
|
||||
<span>{% trans 'Filter rows' %}:</span>
|
||||
<input type="text" class="filter_rows" placeholder="{% trans 'Search this table' %}">
|
||||
</td>
|
||||
<td class="navigation_separator"></td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<table class="table table-borderless table-sm w-auto d-inline-block navigation">
|
||||
<tr>
|
||||
<td class="navigation_separator largescreenonly"></td>
|
||||
<td class="central_columns_navigation">
|
||||
{{ get_icon('centralColumns_add', 'Add column' | trans)|raw }}
|
||||
<form id="add_column" action="{{ url('/database/central-columns') }}" method="post">
|
||||
{{ get_hidden_inputs(db) | raw }}
|
||||
<input type="hidden" name="add_column" value="add">
|
||||
<input type="hidden" name="pos" value="{{ pos }}">
|
||||
<input type="hidden" name="total_rows" value="{{ total_rows }}">
|
||||
{# getHtmlForTableDropdown #}
|
||||
<select name="table-select" id="table-select">
|
||||
<option value="" disabled="disabled" selected="selected">
|
||||
{% trans 'Select a table' %}
|
||||
</option>
|
||||
{% for table in tables %}
|
||||
<option value="{{ table|e }}">{{ table|e }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select name="column-select" id="column-select">
|
||||
<option value="" selected="selected">{% trans 'Select a column.' %}</option>
|
||||
</select>
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Add' %}">
|
||||
</form>
|
||||
</td>
|
||||
<td class="navigation_separator largescreenonly"></td>
|
||||
</tr>
|
||||
</table>
|
||||
{% if total_rows > 0 %}
|
||||
<form method="post" id="del_form" action="{{ url('/database/central-columns') }}">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input id="del_col_name" type="hidden" name="col_name" value="">
|
||||
<input type="hidden" name="pos" value="{{ pos }}">
|
||||
<input type="hidden" name="delete_save" value="delete">
|
||||
</form>
|
||||
<div id="tableslistcontainer">
|
||||
<form name="tableslistcontainer">
|
||||
<table id="table_columns" class="table table-light table-striped table-hover tablesorter w-auto">
|
||||
{% set class = 'column_heading' %}
|
||||
{% set title = 'Click to sort.' | trans %}
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="{{ class }}"></th>
|
||||
<th class="hide"></th>
|
||||
<th class="column_action" colspan="2">{% trans 'Action' %}</th>
|
||||
<th class="{{ class }}" title="{{ title }}" data-column="name">
|
||||
{% trans 'Name' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="{{ class }}" title="{{ title }}" data-column="type">
|
||||
{% trans 'Type' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="{{ class }}" title="{{ title }}" data-column="length">
|
||||
{% trans 'Length/Value' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="{{ class }}" title="{{ title }}" data-column="default">
|
||||
{% trans 'Default' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="{{ class }}" title="{{ title }}" data-column="collation">
|
||||
{% trans 'Collation' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="{{ class }}" title="{{ title }}" data-column="attribute">
|
||||
{% trans 'Attribute' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="{{ class }}" title="{{ title }}" data-column="isnull">
|
||||
{% trans 'Null' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
<th class="{{ class }}" title="{{ title }}" data-column="extra">
|
||||
{% trans 'A_I' %}
|
||||
<div class="sorticon"></div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set row_num = 0 %}
|
||||
{% for row in rows_list %}
|
||||
{# getHtmlForTableRow #}
|
||||
<tr data-rownum="{{ row_num }}" id="{{ 'f_' ~ row_num }}">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="edit_save" value="save">
|
||||
<td class="nowrap">
|
||||
<input type="checkbox" class="checkall" name="selected_fld[]"
|
||||
value="{{ row['col_name'] }}" id="{{ 'checkbox_row_' ~ row_num }}">
|
||||
</td>
|
||||
<td id="{{ 'edit_' ~ row_num }}" class="edit text-center">
|
||||
<a href="#"> {{ get_icon('b_edit', 'Edit' | trans) | raw }}</a>
|
||||
</td>
|
||||
<td class="del_row" data-rownum = "{{ row_num }}">
|
||||
<a hrf="#">{{ get_icon('b_drop', 'Delete' | trans) }}</a>
|
||||
<input type="submit" data-rownum = "{{ row_num }}" class="btn btn-secondary edit_cancel_form" value="{{ 'Cancel'|trans }}">
|
||||
</td>
|
||||
<td id="{{ 'save_' ~ row_num }}" class="hide">
|
||||
<input type="submit" data-rownum="{{ row_num }}" class="btn btn-primary edit_save_form" value="{{ 'Save'|trans }}">
|
||||
</td>
|
||||
<td name="col_name" class="nowrap">
|
||||
<span>{{ row['col_name'] }}</span>
|
||||
<input name="orig_col_name" type="hidden" value="{{ row['col_name'] }}">
|
||||
{% include 'columns_definitions/column_name.twig' with {
|
||||
'column_number': row_num,
|
||||
'ci': 0,
|
||||
'ci_offset': 0,
|
||||
'column_meta': {
|
||||
'Field': row['col_name']
|
||||
},
|
||||
'cfg_relation': {
|
||||
'centralcolumnswork': false
|
||||
},
|
||||
'max_rows': max_rows
|
||||
} only %}
|
||||
</td>
|
||||
<td name = "col_type" class="nowrap">
|
||||
<span>{{ row['col_type'] }}</span>
|
||||
<select class="column_type" name="field_type[{{ row_num }}]" id="field_{{ row_num }}_1">
|
||||
{{ get_supported_datatypes(true, types_upper[row_num]) }}
|
||||
</select>
|
||||
</td>
|
||||
<td class="nowrap" name="col_length">
|
||||
<span>{{ (row['col_length']?(row['col_length']):'') }}</span>
|
||||
<input id="field_{{ row_num }}_2" type="text" name="field_length[{{ row_num }}]" size="8" value="{{ row['col_length'] }}" class="textfield">
|
||||
<p class="enum_notice" id="enum_notice_{{ row_num }}_2">
|
||||
<a href="#" class="open_enum_editor">{% trans 'Edit ENUM/SET values' %}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td class="nowrap" name="col_default">
|
||||
{% if row['col_default'] is defined %}
|
||||
<span>{{ row['col_default'] }}</span>
|
||||
{% else %}
|
||||
<span>{% trans 'None' %}</span>
|
||||
{% endif %}
|
||||
<select name="field_default_type[{{ row_num }}]" id="field_{{ row_num }}_3" class="default_type">
|
||||
<option value="NONE"{{ rows_meta[row_num]['DefaultType'] is defined and rows_meta[row_num]['DefaultType'] == 'NONE' ? ' selected' }}>
|
||||
{% trans %}None{% context %}for default{% endtrans %}
|
||||
</option>
|
||||
<option value="USER_DEFINED"{{ rows_meta[row_num]['DefaultType'] is defined and rows_meta[row_num]['DefaultType'] == 'USER_DEFINED' ? ' selected' }}>
|
||||
{% trans 'As defined:' %}
|
||||
</option>
|
||||
<option value="NULL"{{ rows_meta[row_num]['DefaultType'] is defined and rows_meta[row_num]['DefaultType'] == 'NULL' ? ' selected' }}>
|
||||
NULL
|
||||
</option>
|
||||
<option value="CURRENT_TIMESTAMP"{{ rows_meta[row_num]['DefaultType'] is defined and rows_meta[row_num]['DefaultType'] == 'CURRENT_TIMESTAMP' ? ' selected' }}>
|
||||
CURRENT_TIMESTAMP
|
||||
</option>
|
||||
</select>
|
||||
{% if char_editing == 'textarea' %}
|
||||
<textarea name="field_default_value[{{ row_num }}]" cols="15" class="textfield default_value">{{ default_values[row_num] }}</textarea>
|
||||
{% else %}
|
||||
<input type="text" name="field_default_value[{{ row_num }}]" size="12" value="{{ default_values[row_num] }}" class="textfield default_value">
|
||||
{% endif %}
|
||||
</td>
|
||||
<td name="collation" class="nowrap">
|
||||
<span>{{ row['col_collation'] }}</span>
|
||||
<select lang="en" dir="ltr" name="field_collation[{{ row_num }}]" id="field_{{ row_num }}_4">
|
||||
<option value=""></option>
|
||||
{% for charset in charsets %}
|
||||
<optgroup label="{{ charset.name }}" title="{{ charset.description }}">
|
||||
{% for collation in charset.collations %}
|
||||
<option value="{{ collation.name }}" title="{{ collation.description }}"
|
||||
{{- collation.name == row['col_collation'] ? ' selected' }}>
|
||||
{{- collation.name -}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td class="nowrap" name="col_attribute">
|
||||
<span>{{ row['col_attribute']?(row['col_attribute']):"" }}</span>
|
||||
{% include 'columns_definitions/column_attribute.twig' with {
|
||||
'column_number': row_num,
|
||||
'ci': 5,
|
||||
'ci_offset': 0,
|
||||
'extracted_columnspec': {},
|
||||
'column_meta': row['col_attribute'],
|
||||
'submit_attribute': false,
|
||||
'attribute_types': attribute_types,
|
||||
} only %}
|
||||
</td>
|
||||
<td class="nowrap" name="col_isNull">
|
||||
<span>{{ row['col_isNull'] ? 'Yes' | trans : 'No' | trans }}</span>
|
||||
<input name="field_null[{{ row_num }}]" id="field_{{ row_num }}_6" type="checkbox" value="YES" class="allow_null"
|
||||
{{- row['col_isNull'] is not empty and row['col_isNull'] != 'NO' and row['col_isNull'] != 'NOT NULL' ? ' checked' }}>
|
||||
</td>
|
||||
<td class="nowrap" name="col_extra">
|
||||
<span>{{ row['col_extra'] }}</span>
|
||||
<input name="col_extra[{{ row_num }}]" id="field_{{ row_num }}_7" type="checkbox" value="auto_increment"
|
||||
{{- row['col_extra'] is not empty and row['col_extra'] == 'auto_increment' ? ' checked' }}>
|
||||
</td>
|
||||
</tr>
|
||||
{% set row_num = row_num + 1 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% include 'select_all.twig' with {
|
||||
'theme_image_path': theme_image_path,
|
||||
'text_dir' : text_dir,
|
||||
'form_name' : 'tableslistcontainer',
|
||||
} only %}
|
||||
<button class="btn btn-link mult_submit change_central_columns" type="submit" name="edit_central_columns"
|
||||
value="edit central columns" title="{% trans 'Edit' %}">
|
||||
{{ get_icon('b_edit', 'Edit'|trans) }}
|
||||
</button>
|
||||
<button class="btn btn-link mult_submit" type="submit" name="delete_central_columns"
|
||||
value="remove_from_central_columns" title="{% trans 'Delete' %}">
|
||||
{{ get_icon('b_drop', 'Delete'|trans) }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
|
@ -0,0 +1,3 @@
|
|||
{% for column in columns %}
|
||||
<option value="{{ column }}">{{ column }}</option>
|
||||
{% endfor %}
|
23
admin/phpMyAdmin/templates/database/create_table.twig
Normal file
23
admin/phpMyAdmin/templates/database/create_table.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
<form id="create_table_form_minimal" method="post" action="{{ url('/table/create') }}" class="lock-page">
|
||||
<fieldset>
|
||||
<legend>
|
||||
{% if show_icons('ActionLinksMode') -%}
|
||||
{{ get_image('b_table_add') }}
|
||||
{%- endif %}
|
||||
{% trans "Create table" %}
|
||||
</legend>
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<div class="formelement">
|
||||
{% trans "Name" %}:
|
||||
<input type="text" name="table" maxlength="64" size="30" required="required">
|
||||
</div>
|
||||
<div class="formelement">
|
||||
{% trans "Number of columns" %}:
|
||||
<input type="number" min="1" name="num_fields" value="4" required="required">
|
||||
</div>
|
||||
<div class="clearfloat"></div>
|
||||
</fieldset>
|
||||
<fieldset class="tblFooters">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans "Go" %}">
|
||||
</fieldset>
|
||||
</form>
|
118
admin/phpMyAdmin/templates/database/data_dictionary/index.twig
Normal file
118
admin/phpMyAdmin/templates/database/data_dictionary/index.twig
Normal file
|
@ -0,0 +1,118 @@
|
|||
<h1>{{ database }}</h1>
|
||||
{% if comment is not empty %}
|
||||
<p>{% trans 'Database comment:' %} <em>{{ comment }}</em></p>
|
||||
{% endif %}
|
||||
|
||||
<div>
|
||||
{% for table in tables %}
|
||||
<div>
|
||||
<h2>{{ table.name }}</h2>
|
||||
{% if table.comment is not empty %}
|
||||
<p>{% trans 'Table comments:' %} <em>{{ table.comment }}</em></p>
|
||||
{% endif %}
|
||||
|
||||
<table class="pma-table print">
|
||||
<tr>
|
||||
<th>{% trans 'Column' %}</th>
|
||||
<th>{% trans 'Type' %}</th>
|
||||
<th>{% trans 'Null' %}</th>
|
||||
<th>{% trans 'Default' %}</th>
|
||||
{% if table.has_relation %}
|
||||
<th>{% trans 'Links to' %}</th>
|
||||
{% endif %}
|
||||
<th>{% trans 'Comments' %}</th>
|
||||
{% if table.has_mime %}
|
||||
<th>{% trans 'Media type' %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for column in table.columns %}
|
||||
<tr>
|
||||
<td class="nowrap">
|
||||
{{ column.name }}
|
||||
{% if column.has_primary_key %}
|
||||
<em>({% trans 'Primary' %})</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td lang="en" dir="ltr"{{ 'set' != column.type and 'enum' != column.type ? ' class="nowrap"' }}>
|
||||
{{ column.print_type }}
|
||||
</td>
|
||||
<td>{{ column.is_nullable ? 'Yes'|trans : 'No'|trans }}</td>
|
||||
<td class="nowrap">
|
||||
{% if column.default is null and column.is_nullable %}
|
||||
<em>NULL</em>
|
||||
{% else %}
|
||||
{{ column.default }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if table.has_relation %}
|
||||
<td>{{ column.relation }}</td>
|
||||
{% endif %}
|
||||
<td>{{ column.comment }}</td>
|
||||
{% if table.has_mime %}
|
||||
<td>{{ column.mime }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% if table.indexes is not empty %}
|
||||
<h3>{% trans 'Indexes' %}</h3>
|
||||
|
||||
<div class="responsivetable jsresponsive">
|
||||
<table class="pma-table" id="table_index">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans 'Keyname' %}</th>
|
||||
<th>{% trans 'Type' %}</th>
|
||||
<th>{% trans 'Unique' %}</th>
|
||||
<th>{% trans 'Packed' %}</th>
|
||||
<th>{% trans 'Column' %}</th>
|
||||
<th>{% trans 'Cardinality' %}</th>
|
||||
<th>{% trans 'Collation' %}</th>
|
||||
<th>{% trans 'Null' %}</th>
|
||||
<th>{% trans 'Comment' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for index in table.indexes %}
|
||||
{% set columns_count = index.getColumnCount() %}
|
||||
<tr>
|
||||
<td rowspan="{{ columns_count }}">{{ index.getName() }}</td>
|
||||
<td rowspan="{{ columns_count }}">{{ index.getType()|default(index.getChoice()) }}</td>
|
||||
<td rowspan="{{ columns_count }}">{{ index.isUnique() ? 'Yes'|trans : 'No'|trans }}</td>
|
||||
<td rowspan="{{ columns_count }}">{{ index.isPacked()|raw }}</td>
|
||||
|
||||
{% for column in index.getColumns() %}
|
||||
{% if column.getSeqInIndex() > 1 %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
<td>
|
||||
{{ column.getName() }}
|
||||
{% if column.getSubPart() is not empty %}
|
||||
({{ column.getSubPart() }})
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ column.getCardinality() }}</td>
|
||||
<td>{{ column.getCollation() }}</td>
|
||||
<td>{{ column.getNull(true) }}</td>
|
||||
|
||||
{% if column.getSeqInIndex() == 1 %}
|
||||
<td rowspan="{{ columns_count }}">{{ index.getComments() }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>{% trans 'No index defined!' %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<p class="print_ignore">
|
||||
<input type="button" class="btn btn-secondary button" id="print" value="{% trans 'Print' %}">
|
||||
</p>
|
|
@ -0,0 +1,121 @@
|
|||
{% for designerTable in tables %}
|
||||
{% set i = loop.index0 %}
|
||||
{% set t_n_url = designerTable.getDbTableString()|escape('url') %}
|
||||
{% set db = designerTable.getDatabaseName() %}
|
||||
{% set db_url = db|escape('url') %}
|
||||
{% set t_n = designerTable.getDbTableString() %}
|
||||
{% set table_name = designerTable.getTableName()|escape('html') %}
|
||||
<input name="t_x[{{ t_n_url }}]" type="hidden" id="t_x_{{ t_n_url }}_" />
|
||||
<input name="t_y[{{ t_n_url }}]" type="hidden" id="t_y_{{ t_n_url }}_" />
|
||||
<input name="t_v[{{ t_n_url }}]" type="hidden" id="t_v_{{ t_n_url }}_" />
|
||||
<input name="t_h[{{ t_n_url }}]" type="hidden" id="t_h_{{ t_n_url }}_" />
|
||||
<table id="{{ t_n_url }}"
|
||||
db_url="{{ designerTable.getDatabaseName()|escape('url') }}"
|
||||
table_name_url="{{ designerTable.getTableName()|escape('url') }}"
|
||||
cellpadding="0"
|
||||
cellspacing="0"
|
||||
class="pma-table designer_tab"
|
||||
style="position:absolute; {{ text_dir == 'rtl' ? 'right' : 'left' }}:
|
||||
{{- tab_pos[t_n] is defined ? tab_pos[t_n]['X'] : random(range(20, 700)) }}px; top:
|
||||
{{- tab_pos[t_n] is defined ? tab_pos[t_n]['Y'] : random(range(20, 550)) }}px; display:
|
||||
{{- tab_pos[t_n] is defined or display_page == -1 ? 'block' : 'none' }}; z-index: 1;"> <!--"-->
|
||||
<thead>
|
||||
<tr class="header">
|
||||
{% if has_query %}
|
||||
<td class="select_all">
|
||||
<input class="select_all_1"
|
||||
type="checkbox"
|
||||
style="margin: 0;"
|
||||
value="select_all_{{ t_n_url }}"
|
||||
id="select_all_{{ i }}"
|
||||
title="{% trans 'Select all' %}"
|
||||
table_name="{{ table_name }}"
|
||||
db_name="{{ db }}">
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="small_tab"
|
||||
title="{% trans 'Show/hide columns' %}"
|
||||
id="id_hide_tbody_{{ t_n_url }}"
|
||||
table_name="{{ t_n_url }}">{{ tab_pos[t_n] is not defined or tab_pos[t_n]['V'] is not empty ? 'v' : '>' }}</td>
|
||||
<td class="small_tab_pref small_tab_pref_1"
|
||||
db="{{ designerTable.getDatabaseName() }}"
|
||||
db_url="{{ designerTable.getDatabaseName()|escape('url') }}"
|
||||
table_name="{{ designerTable.getTableName() }}"
|
||||
table_name_url="{{ designerTable.getTableName()|escape('url') }}">
|
||||
<img src="{{ theme.getImgPath('designer/exec_small.png') }}"
|
||||
title="{% trans 'See table structure' %}">
|
||||
</td>
|
||||
<td id="id_zag_{{ t_n_url }}"
|
||||
class="tab_zag nowrap tab_zag_noquery"
|
||||
table_name="{{ t_n_url }}"
|
||||
query_set="{{ has_query ? 1 : 0 }}">
|
||||
<span class="owner">{{ designerTable.getDatabaseName() }}</span>
|
||||
{{ designerTable.getTableName() }}
|
||||
</td>
|
||||
{% if has_query %}
|
||||
<td class="tab_zag tab_zag_query"
|
||||
id="id_zag_{{ t_n_url }}_2"
|
||||
table_name="{{ t_n_url }}">
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="id_tbody_{{ t_n_url }}"
|
||||
{{- tab_pos[t_n] is defined and tab_pos[t_n]['V'] is empty ? ' style="display: none"' }}>
|
||||
{% set display_field = designerTable.getDisplayField() %}
|
||||
{% for j in 0..tab_column[t_n]['COLUMN_ID']|length - 1 %}
|
||||
{% set col_name = tab_column[t_n]['COLUMN_NAME'][j] %}
|
||||
{% set tmp_column = t_n ~ '.' ~ tab_column[t_n]['COLUMN_NAME'][j] %}
|
||||
{% set click_field_param = [
|
||||
designerTable.getTableName()|escape('url'),
|
||||
tab_column[t_n]['COLUMN_NAME'][j]|url_encode
|
||||
] %}
|
||||
{% if not designerTable.supportsForeignkeys() %}
|
||||
{% set click_field_param = click_field_param|merge([tables_pk_or_unique_keys[tmp_column] is defined ? 1 : 0]) %}
|
||||
{% else %}
|
||||
{# if foreign keys are supported, it's not necessary that the
|
||||
index is a primary key #}
|
||||
{% set click_field_param = click_field_param|merge([tables_all_keys[tmp_column] is defined ? 1 : 0]) %}
|
||||
{% endif %}
|
||||
{% set click_field_param = click_field_param|merge([db]) %}
|
||||
<tr id="id_tr_{{ designerTable.getTableName()|escape('url') }}.{{ tab_column[t_n]['COLUMN_NAME'][j] }}" class="tab_field
|
||||
{{- display_field == tab_column[t_n]['COLUMN_NAME'][j] ? '_3' }}" click_field_param="
|
||||
{{- click_field_param|join(',') }}">
|
||||
{% if has_query %}
|
||||
<td class="select_all">
|
||||
<input class="select_all_store_col"
|
||||
value="{{ t_n_url }}{{ tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}"
|
||||
type="checkbox"
|
||||
id="select_{{ t_n_url }}._{{ tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}"
|
||||
style="margin: 0;"
|
||||
title="{{ 'Select "%s"'|trans|format(col_name) }}"
|
||||
id_check_all="select_all_{{ i }}"
|
||||
db_name="{{ db }}"
|
||||
table_name="{{ table_name }}"
|
||||
col_name="{{ col_name }}">
|
||||
</td>
|
||||
{% endif %}
|
||||
<td width="10px" colspan="3" id="{{ t_n_url }}.
|
||||
{{- tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}">
|
||||
<div class="nowrap">
|
||||
{% set type = columns_type[t_n ~ '.' ~ tab_column[t_n]['COLUMN_NAME'][j]] %}
|
||||
<img src="{{ theme.getImgPath(type) }}.png" alt="*">
|
||||
{{ tab_column[t_n]['COLUMN_NAME'][j] }} : {{ tab_column[t_n]['TYPE'][j] }}
|
||||
</div>
|
||||
</td>
|
||||
{% if has_query %}
|
||||
<td class="small_tab_pref small_tab_pref_click_opt"
|
||||
{# Escaped 2 times to be able to use it in innerHtml #}
|
||||
option_col_name_modal="<strong>{{ 'Add an option for column "%s".'|trans|format(col_name)|escape('html')|escape('html') }}</strong>"
|
||||
db_name="{{ db }}"
|
||||
table_name="{{ table_name }}"
|
||||
col_name="{{ col_name }}"
|
||||
db_table_name_url="{{ t_n_url }}">
|
||||
<img src="{{ theme.getImgPath('designer/exec_small.png') }}" title="{% trans 'Options' %}" />
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
|
@ -0,0 +1,13 @@
|
|||
<form action="{{ url('/database/designer') }}" method="post" name="edit_delete_pages" id="edit_delete_pages" class="ajax">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<fieldset id="page_edit_delete_options">
|
||||
<input type="hidden" name="operation" value="{{ operation }}">
|
||||
<label for="selected_page">
|
||||
{{ operation == 'editPage' ? 'Page to open'|trans : 'Page to delete'|trans }}:
|
||||
</label>
|
||||
{% include 'database/designer/page_selector.twig' with {
|
||||
'pdfwork': pdfwork,
|
||||
'pages': pages
|
||||
} only %}
|
||||
</fieldset>
|
||||
</form>
|
1100
admin/phpMyAdmin/templates/database/designer/main.twig
Normal file
1100
admin/phpMyAdmin/templates/database/designer/main.twig
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,36 @@
|
|||
<form action="{{ url('/database/designer') }}" method="post" name="save_as_pages" id="save_as_pages" class="ajax">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<fieldset id="page_save_as_options">
|
||||
<table class="pma-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="operation" value="savePage">
|
||||
{% include 'database/designer/page_selector.twig' with {
|
||||
'pdfwork': pdfwork,
|
||||
'pages': pages
|
||||
} only %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<input type="radio" name="save_page" id="savePageSameRadio" value="same" checked>
|
||||
<label for="savePageSameRadio">{% trans 'Save to selected page' %}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" name="save_page" id="savePageNewRadio" value="new">
|
||||
<label for="savePageNewRadio">{% trans 'Create a page and save to it' %}</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="selected_value">{% trans 'New page name' %}</label>
|
||||
<input type="text" name="selected_value" id="selected_value">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
|
@ -0,0 +1,10 @@
|
|||
<select name="selected_page" id="selected_page">
|
||||
<option value="0">-- {% trans 'Select page' %} --</option>
|
||||
{% if pdfwork %}
|
||||
{% for nr, desc in pages %}
|
||||
<option value="{{ nr }}">
|
||||
{{ desc }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</select>
|
|
@ -0,0 +1,9 @@
|
|||
<form method="post" action="{{ url('/schema-export') }}" class="disableAjax" id="id_export_pages">
|
||||
<fieldset>
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<label>{% trans 'Select Export Relational Type' %}</label>
|
||||
{{ get_choice('Schema', 'export_type', export_list, 'format') }}
|
||||
<input type="hidden" name="page_number" value="{{ page }}">
|
||||
{{ get_options('Schema', export_list) }}
|
||||
</fieldset>
|
||||
</form>
|
110
admin/phpMyAdmin/templates/database/events/editor_form.twig
Normal file
110
admin/phpMyAdmin/templates/database/events/editor_form.twig
Normal file
|
@ -0,0 +1,110 @@
|
|||
<form class="rte_form" action="{{ url('/database/events') }}" method="post">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input name="{{ mode }}_item" type="hidden" value="1">
|
||||
{% if mode == 'edit' %}
|
||||
<input name="item_original_name" type="hidden" value="{{ event.item_original_name }}">
|
||||
{% endif %}
|
||||
|
||||
<fieldset>
|
||||
<legend>{% trans 'Details' %}</legend>
|
||||
<table class="rte_table table table-borderless table-sm">
|
||||
<tr>
|
||||
<td>{% trans 'Event name' %}</td>
|
||||
<td>
|
||||
<input type="text" name="item_name" value="{{ event.item_name }}" maxlength="64">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Status' %}</td>
|
||||
<td>
|
||||
<select name="item_status">
|
||||
{% for status in status_display %}
|
||||
<option value="{{ status }}"{{ status == event.item_status ? ' selected' }}>{{ status }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Event type' %}</td>
|
||||
<td>
|
||||
{% if is_ajax %}
|
||||
<select name="item_type">
|
||||
{% for type in event_type %}
|
||||
<option value="{{ type }}"{{ type == event.item_type ? ' selected' }}>{{ type }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% else %}
|
||||
<input name="item_type" type="hidden" value="{{ event.item_type }}">
|
||||
<div class="font_weight_bold text-center w-50">
|
||||
{{ event.item_type }}
|
||||
</div>
|
||||
<input type="submit" name="item_changetype" class="w-50" value="{{ 'Change to %s'|trans|format(event.item_type_toggle) }}">
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="onetime_event_row{{ event.item_type != 'ONE TIME' ? ' hide' }}">
|
||||
<td>{% trans 'Execute at' %}</td>
|
||||
<td class="nowrap">
|
||||
<input type="text" name="item_execute_at" value="{{ event.item_execute_at }}" class="datetimefield">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="recurring_event_row{{ event.item_type != 'RECURRING' ? ' hide' }}">
|
||||
<td>{% trans 'Execute every' %}</td>
|
||||
<td>
|
||||
<input class="w-50" type="text" name="item_interval_value" value="{{ event.item_interval_value }}">
|
||||
<select class="w-50" name="item_interval_field">
|
||||
{% for interval in event_interval %}
|
||||
<option value="{{ interval }}"{{ interval == event.item_interval_field ? ' selected' }}>{{ interval }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="recurring_event_row{{ event.item_type != 'RECURRING' ? ' hide' }}">
|
||||
<td>{% trans %}Start{% context %}Start of recurring event{% endtrans %}</td>
|
||||
<td class="nowrap">
|
||||
<input type="text" name="item_starts" value="{{ event.item_starts }}" class="datetimefield">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="recurring_event_row{{ event.item_type != 'RECURRING' ? ' hide' }}">
|
||||
<td>{% trans %}End{% context %}End of recurring event{% endtrans %}</td>
|
||||
<td class="nowrap">
|
||||
<input type="text" name="item_ends" value="{{ event.item_ends }}" class="datetimefield">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Definition' %}</td>
|
||||
<td>
|
||||
<textarea name="item_definition" rows="15" cols="40">
|
||||
{{- event.item_definition -}}
|
||||
</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'On completion preserve' %}</td>
|
||||
<td>
|
||||
<input type="checkbox" name="item_preserve"{{ event.item_preserve|raw }}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Definer' %}</td>
|
||||
<td>
|
||||
<input type="text" name="item_definer" value="{{ event.item_definer }}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Comment' %}</td>
|
||||
<td>
|
||||
<input type="text" name="item_comment" value="{{ event.item_comment }}" maxlength="64">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
{% if is_ajax %}
|
||||
<input type="hidden" name="editor_process_{{ mode }}" value="true">
|
||||
<input type="hidden" name="ajax_request" value="true">
|
||||
{% else %}
|
||||
<fieldset class="tblFooters">
|
||||
<input type="submit" name="editor_process_{{ mode }}" value="{% trans 'Go' %}">
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
</form>
|
161
admin/phpMyAdmin/templates/database/events/index.twig
Normal file
161
admin/phpMyAdmin/templates/database/events/index.twig
Normal file
|
@ -0,0 +1,161 @@
|
|||
<form id="rteListForm" class="ajax" action="{{ url('/database/events') }}">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
{% trans 'Events' %}
|
||||
{{ show_mysql_docu('EVENTS') }}
|
||||
</legend>
|
||||
|
||||
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
|
||||
{% trans 'There are no events to display.' %}
|
||||
</div>
|
||||
|
||||
<table id="eventsTable" class="table table-light table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% trans 'Name' %}</th>
|
||||
<th>{% trans 'Status' %}</th>
|
||||
<th colspan="3">{% trans 'Action' %}</th>
|
||||
<th>{% trans 'Type' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="hide">{% for i in 0..6 %}<td></td>{% endfor %}</tr>
|
||||
|
||||
{% for event in items %}
|
||||
<tr{{ is_ajax ? ' class="ajaxInsert hide"' }}>
|
||||
<td>
|
||||
<input type="checkbox" class="checkall" name="item_name[]" value="{{ event.name }}">
|
||||
</td>
|
||||
<td>
|
||||
<span class="drop_sql hide">{{ 'DROP EVENT IF EXISTS %s'|format(backquote(event.name)) }}</span>
|
||||
<strong>{{ event.name }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ event.status }}
|
||||
</td>
|
||||
<td>
|
||||
{% if has_privilege %}
|
||||
<a class="ajax edit_anchor" href="{{ url('/database/events', {
|
||||
'db': db,
|
||||
'edit_item': true,
|
||||
'item_name': event.name
|
||||
}) }}">
|
||||
{{ get_icon('b_edit', 'Edit'|trans) }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_edit', 'Edit'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a class="ajax export_anchor" href="{{ url('/database/events', {
|
||||
'db': db,
|
||||
'export_item': true,
|
||||
'item_name': event.name
|
||||
}) }}">
|
||||
{{ get_icon('b_export', 'Export'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if has_privilege %}
|
||||
{{ link_or_button(
|
||||
url('/sql', {
|
||||
'db': db,
|
||||
'sql_query': 'DROP EVENT IF EXISTS %s'|format(backquote(event.name)),
|
||||
'goto': url('/database/events', {'db': db})
|
||||
}),
|
||||
get_icon('b_drop', 'Drop'|trans),
|
||||
{'class': 'ajax drop_anchor'}
|
||||
) }}
|
||||
{% else %}
|
||||
{{ get_icon('bd_drop', 'Drop'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ event.type }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</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>
|
||||
|
||||
<div class="doubleFieldset">
|
||||
<fieldset class="left">
|
||||
<legend>{% trans %}New{% context %}Create new event{% endtrans %}</legend>
|
||||
<div class="wrap">
|
||||
{% if has_privilege %}
|
||||
<a class="ajax add_anchor" href="{{ url('/database/events', {'db': db, 'add_item': true}) }}">
|
||||
{{ get_icon('b_event_add') }}
|
||||
{% trans 'Add event' %}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_event_add') }}
|
||||
{% trans 'Add event' %}
|
||||
{% endif %}
|
||||
{{ show_mysql_docu('CREATE_EVENT') }}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="right">
|
||||
<legend>{% trans 'Event scheduler status' %}</legend>
|
||||
<div class="wrap">
|
||||
<div class="wrapper toggleAjax hide">
|
||||
<div class="toggleButton">
|
||||
<div title="{% trans 'Click to toggle' %}" class="toggle-container {{ scheduler_state ? 'on' : 'off' }}">
|
||||
<img src="{{ theme_image_path }}toggle-{{ text_dir }}.png">
|
||||
<table class="pma-table nospacing nopadding">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="toggleOn">
|
||||
<span class="hide">
|
||||
{{- url('/sql', {
|
||||
'db': db,
|
||||
'goto': url('/database/events', {'db': db}),
|
||||
'sql_query': 'SET GLOBAL event_scheduler="ON"',
|
||||
}) -}}
|
||||
</span>
|
||||
<div>{% trans 'ON' %}</div>
|
||||
</td>
|
||||
<td><div> </div></td>
|
||||
<td class="toggleOff">
|
||||
<span class="hide">
|
||||
{{- url('/sql', {
|
||||
'db': db,
|
||||
'goto': url('/database/events', {'db': db}),
|
||||
'sql_query': 'SET GLOBAL event_scheduler="OFF"',
|
||||
}) -}}
|
||||
</span>
|
||||
<div>{% trans 'OFF' %}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<span class="hide callback">Functions.slidingMessage(data.sql_query);</span>
|
||||
<span class="hide text_direction">{{ text_dir }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="clearfloat"></div>
|
||||
</div>
|
55
admin/phpMyAdmin/templates/database/events/row.twig
Normal file
55
admin/phpMyAdmin/templates/database/events/row.twig
Normal file
|
@ -0,0 +1,55 @@
|
|||
<tr{% if row_class is not empty %} class="{{ row_class }}"{% endif %}>
|
||||
<td>
|
||||
<input type="checkbox" class="checkall" name="item_name[]" value="{{ event.name }}">
|
||||
</td>
|
||||
<td>
|
||||
<span class='drop_sql hide'>{{ sql_drop }}</span>
|
||||
<strong>{{ event.name }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ event.status }}
|
||||
</td>
|
||||
<td>
|
||||
{% if has_privilege %}
|
||||
<a class="ajax edit_anchor" href="{{ url('/database/events', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'edit_item': true,
|
||||
'item_name': event.name
|
||||
}) }}">
|
||||
{{ get_icon('b_edit', 'Edit'|trans) }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_edit', 'Edit'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a class="ajax export_anchor" href="{{ url('/database/events', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'export_item': true,
|
||||
'item_name': event.name
|
||||
}) }}">
|
||||
{{ get_icon('b_export', 'Export'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if has_privilege %}
|
||||
{{ link_or_button(
|
||||
url('/sql', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'sql_query': sql_drop,
|
||||
'goto': url('/database/events', {'db': db})
|
||||
}),
|
||||
get_icon('b_drop', 'Drop'|trans),
|
||||
{'class': 'ajax drop_anchor'}
|
||||
) }}
|
||||
{% else %}
|
||||
{{ get_icon('bd_drop', 'Drop'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ event.type }}
|
||||
</td>
|
||||
</tr>
|
63
admin/phpMyAdmin/templates/database/export/index.twig
Normal file
63
admin/phpMyAdmin/templates/database/export/index.twig
Normal file
|
@ -0,0 +1,63 @@
|
|||
{% extends 'export.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% if export_type == 'raw' %}
|
||||
{% trans %}Exporting a raw query{% notes %}A query that the user has written freely{% endtrans %}
|
||||
{% else %}
|
||||
{{ 'Exporting tables from "%s" database'|trans|format(db) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block selection_options %}
|
||||
{% if export_type != 'raw' %}
|
||||
<div class="exportoptions" id="databases_and_tables">
|
||||
<h3>{% trans 'Tables:' %}</h3>
|
||||
|
||||
<div class="export_table_list_container">
|
||||
<input type="hidden" name="structure_or_data_forced" value="{{ structure_or_data_forced }}">
|
||||
|
||||
<table class="pma-table export_table_select">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% trans 'Tables' %}</th>
|
||||
<th class="export_structure">{% trans 'Structure' %}</th>
|
||||
<th class="export_data">{% trans 'Data' %}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="export_table_name all">{% trans 'Select all' %}</td>
|
||||
<td class="export_structure all">
|
||||
<input type="checkbox" id="table_structure_all">
|
||||
</td>
|
||||
<td class="export_data all">
|
||||
<input type="checkbox" id="table_data_all">
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for each_table in tables %}
|
||||
<tr class="marked">
|
||||
<td>
|
||||
<input class="checkall" type="checkbox" name="table_select[]" value="{{ each_table.name }}"{{ each_table.is_checked_select ? ' checked' }}>
|
||||
</td>
|
||||
<td class="export_table_name text-nowrap">{{ each_table.name }}</td>
|
||||
<td class="export_structure">
|
||||
<input type="checkbox" name="table_structure[]" value="{{ each_table.name }}"{{ each_table.is_checked_structure ? ' checked' }}>
|
||||
</td>
|
||||
<td class="export_data">
|
||||
<input type="checkbox" name="table_data[]" value="{{ each_table.name }}"{{ each_table.is_checked_data ? ' checked' }}>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% set filename_hint %}
|
||||
{% trans '@SERVER@ will become the server name and @DATABASE@ will become the database name.' %}
|
||||
{% endset %}
|
3
admin/phpMyAdmin/templates/database/import/index.twig
Normal file
3
admin/phpMyAdmin/templates/database/import/index.twig
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% extends 'import.twig' %}
|
||||
|
||||
{% block title %}{{ 'Importing into the database "%s"'|trans|format(db) }}{% endblock %}
|
174
admin/phpMyAdmin/templates/database/multi_table_query/form.twig
Normal file
174
admin/phpMyAdmin/templates/database/multi_table_query/form.twig
Normal file
|
@ -0,0 +1,174 @@
|
|||
<ul class="nav nav-pills m-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="{{ url('/database/multi-table-query', {'db': db}) }}">
|
||||
{% trans 'Multi-table query' %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url('/database/qbe', {'db': db}) }}">
|
||||
{% trans 'Query by example' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="query_div" class="pma_auto_slider" title="{% trans 'Query window' %}">
|
||||
|
||||
<form action="" id="multi_table_query_form" class="multi_table_query_form query_form">
|
||||
<input type="hidden" id="db_name" value="{{ db }}">
|
||||
<fieldset>
|
||||
{% for table in tables %}
|
||||
<div class="query-form__div--hide" id="{{ table.hash }}">
|
||||
<option value="*">*</option>
|
||||
{% for column in table.columns %}
|
||||
<option value="{{ column }}">{{ column }}</option>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for id in 0..default_no_of_columns %}
|
||||
{% if id == 0 %}<div class="query-form__div--hide" id="new_column_layout">{% endif %}
|
||||
<fieldset class="column_details query-form__fieldset--inline">
|
||||
<select class="tableNameSelect query-form__select--inline">
|
||||
<option value="">{% trans 'select table' %}</option>
|
||||
{% for table in tables|keys %}
|
||||
<option value="{{ table }}">{{ table }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span>.</span>
|
||||
<select class="columnNameSelect query-form__select--inline">
|
||||
<option value="">{% trans 'select column' %}</option>
|
||||
</select>
|
||||
<br>
|
||||
<input type="checkbox" checked="checked" class="show_col">
|
||||
<span>{% trans 'Show' %}</span>
|
||||
<br>
|
||||
<input type="text" placeholder="{% trans 'Table alias' %}" class="table_alias">
|
||||
<input type="text" placeholder="{% trans 'Column alias' %}" class="col_alias">
|
||||
<br>
|
||||
<input type="checkbox"
|
||||
title="{% trans 'Use this column in criteria' %}"
|
||||
class="criteria_col">
|
||||
|
||||
<div id="criteria_div{{ id }}" class="pma_auto_slider" title="{% trans 'criteria' %}" style="display: none; overflow:auto;">
|
||||
|
||||
<div>
|
||||
<table class="pma-table">
|
||||
|
||||
<tr class="sort_order query-form__tr--bg-none">
|
||||
<td>{% trans 'Sort' %}</td>
|
||||
<td><input type="radio" name="sort[{{ id }}]">{% trans 'Ascending' %}</td>
|
||||
<td><input type="radio" name="sort[{{ id }}]">{% trans 'Descending' %}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="logical_operator query-form__tr--bg-none query-form__tr--hide">
|
||||
<td>{% trans 'Add as' %}</td>
|
||||
<td>
|
||||
<input type="radio"
|
||||
name="logical_op[{{ id }}]"
|
||||
value="AND"
|
||||
class="logical_op"
|
||||
checked="checked">
|
||||
AND
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio"
|
||||
name="logical_op[{{ id }}]"
|
||||
value="OR"
|
||||
class="logical_op">
|
||||
OR
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="query-form__tr--bg-none">
|
||||
<td>Op </td>
|
||||
<td>
|
||||
<select class="criteria_op">
|
||||
<option value="=">=</option>
|
||||
<option value=">">></option>
|
||||
<option value=">=">>=</option>
|
||||
<option value="<"><</option>
|
||||
<option value="<="><=</option>
|
||||
<option value="!=">!=</option>
|
||||
<option value="LIKE">LIKE</option>
|
||||
<option value="LIKE %...%">LIKE %...%</option>
|
||||
<option value="NOT LIKE">NOT LIKE</option>
|
||||
<option value="IN (...)">IN (...)</option>
|
||||
<option value="NOT IN (...)">NOT IN (...)</option>
|
||||
<option value="BETWEEN">BETWEEN</option>
|
||||
<option value="NOT BETWEEN">NOT BETWEEN</option>
|
||||
<option value="IS NULL">IS NULL</option>
|
||||
<option value="IS NOT NULL">IS NOT NULL</option>
|
||||
<option value="REGEXP">REGEXP</option>
|
||||
<option value="REGEXP ^...$">REGEXP ^...$</option>
|
||||
<option value="NOT REGEXP">NOT REGEXP</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select class="criteria_rhs">
|
||||
<option value="text">{% trans 'Text' %}</option>
|
||||
<option value="anotherColumn">{% trans 'Another column' %}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="rhs_table query-form__tr--hide query-form__tr--bg-none">
|
||||
<td></td>
|
||||
<td>
|
||||
<select class="tableNameSelect">
|
||||
<option value="">{% trans 'select table' %}</option>
|
||||
{% for table in tables|keys %}
|
||||
<option value="{{ table }}">{{ table }}</option>
|
||||
{% endfor %}
|
||||
</select><span>.</span>
|
||||
</td>
|
||||
<td>
|
||||
<select class="columnNameSelect query-form__select--inline">
|
||||
<option value="">{% trans 'select column' %}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="rhs_text query-form__tr--bg-none">
|
||||
<td></td>
|
||||
<td colspan="2">
|
||||
<input type="text"
|
||||
class="rhs_text_val query-form__input--wide"
|
||||
placeholder="{% trans 'Enter criteria as free text' %}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#"
|
||||
title="{% trans 'Remove this column' %}"
|
||||
class="removeColumn query-form__remove-column">
|
||||
X
|
||||
</a>
|
||||
</fieldset>
|
||||
{% if id == 0 %}</div>{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<fieldset class="query-form__fieldset--inline">
|
||||
<input class="btn btn-secondary" type="button" value="{% trans '+ Add column' %}" id="add_column_button">
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
{# Keep the block without a space between the open and close tag #}
|
||||
<textarea id="MultiSqlquery"
|
||||
class="query-form__multi-sql-query"
|
||||
cols="80"
|
||||
rows="4"
|
||||
name="sql_query"
|
||||
dir="ltr"></textarea>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="tblFooters">
|
||||
<input class="btn btn-secondary" type="button" id="update_query_button" value="{% trans 'Update query' %}">
|
||||
<input class="btn btn-primary" type="button" id="submit_query" value="{% trans 'Submit query' %}">
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div id="sql_results"></div>
|
235
admin/phpMyAdmin/templates/database/operations/index.twig
Normal file
235
admin/phpMyAdmin/templates/database/operations/index.twig
Normal file
|
@ -0,0 +1,235 @@
|
|||
<div class="container-fluid">
|
||||
|
||||
{{ message|raw }}
|
||||
|
||||
{% if has_comment %}
|
||||
<form method="post" action="{{ url('/database/operations') }}" id="formDatabaseComment">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">{{ get_icon('b_comment', 'Database comment'|trans, true) }}</div>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="col-auto">
|
||||
<label class="sr-only" for="databaseCommentInput">{% trans 'Database comment' %}</label>
|
||||
<input class="form-control textfield" id="databaseCommentInput" type="text" name="comment" value="{{ db_comment }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer text-right">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<form id="create_table_form_minimal" method="post" action="{{ url('/table/create') }}" class="lock-page">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">{{ get_icon('b_table_add', 'Create table'|trans, true) }}</div>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="col-auto">
|
||||
<label for="exampleInputEmail1">{% trans 'Name' %}</label>
|
||||
<input class="form-control" type="text" id="exampleInputEmail1" name="table" required>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label for="exampleInputEmail1">{% trans 'Number of columns' %}</label>
|
||||
<input class="form-control" type="number" id="exampleInputEmail1" name="num_fields" min="1" value="4" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-right">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans "Go" %}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% if db != 'mysql' %}
|
||||
<form id="rename_db_form" class="ajax" method="post" action="{{ url('/database/operations') }}">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="what" value="data">
|
||||
<input type="hidden" name="db_rename" value="true">
|
||||
|
||||
{% if db_collation is not empty %}
|
||||
<input type="hidden" name="db_collation" value="{{ db_collation }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">{{ get_icon('b_edit', 'Rename database to'|trans, true) }}</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group form-row">
|
||||
<div class="col-auto">
|
||||
<label class="sr-only" for="new_db_name">{% trans 'New database name' %}</label>
|
||||
<input class="form-control textfield" id="new_db_name" type="text" name="newname" maxlength="64" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="adjust_privileges" value="1" id="checkbox_adjust_privileges"
|
||||
{%- if has_adjust_privileges %} checked{% else %} title="
|
||||
{%- trans 'You don\'t have sufficient privileges to perform this operation; Please refer to the documentation for more details.' %}" disabled{% endif %}>
|
||||
<label class="form-check-label" for="checkbox_adjust_privileges">
|
||||
{% trans 'Adjust privileges' %}
|
||||
{{ show_docu('faq', 'faq6-39') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-right">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if is_drop_database_allowed %}
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">{{ get_icon('b_deltbl', 'Remove database'|trans, true) }}</div>
|
||||
<div class="card-body">
|
||||
<div class="card-text">
|
||||
{{ link_or_button(
|
||||
url('/sql', {
|
||||
'sql_query': 'DROP DATABASE ' ~ backquote(db),
|
||||
'back': url('/database/operations'),
|
||||
'goto': url('/'),
|
||||
'reload': true,
|
||||
'purge': true,
|
||||
'message_to_show': 'Database %s has been dropped.'|trans|format(backquote(db))|e,
|
||||
'db': null
|
||||
}),
|
||||
'Drop the database (DROP)'|trans,
|
||||
{
|
||||
'id': 'drop_db_anchor',
|
||||
'class': 'ajax text-danger'
|
||||
}
|
||||
) }}
|
||||
{{ show_mysql_docu('DROP_DATABASE') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form id="copy_db_form" class="ajax" method="post" action="{{ url('/database/operations') }}">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="db_copy" value="true">
|
||||
|
||||
{% if db_collation is not empty %}
|
||||
<input type="hidden" name="db_collation" value="{{ db_collation }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">{{ get_icon('b_edit', 'Copy database to'|trans, true) }}</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group form-row">
|
||||
<div class="col-auto">
|
||||
<label class="sr-only" for="renameDbNameInput">{% trans 'Database name' %}</label>
|
||||
<input class="form-control textfield" id="renameDbNameInput" type="text" maxlength="64" name="newname" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="what" id="whatRadio1" value="structure">
|
||||
<label class="form-check-label" for="whatRadio1">
|
||||
{% trans 'Structure only' %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="what" id="whatRadio2" value="data" checked>
|
||||
<label class="form-check-label" for="whatRadio2">
|
||||
{% trans 'Structure and data' %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="what" id="whatRadio3" value="dataonly">
|
||||
<label class="form-check-label" for="whatRadio3">
|
||||
{% trans 'Data only' %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="create_database_before_copying" value="1" id="checkbox_create_database_before_copying" checked>
|
||||
<label class="form-check-label" for="checkbox_create_database_before_copying">{% trans 'CREATE DATABASE before copying' %}</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="drop_if_exists" value="true" id="checkbox_drop">
|
||||
<label class="form-check-label" for="checkbox_drop">{{ 'Add %s'|trans|format('DROP TABLE / DROP VIEW') }}</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="sql_auto_increment" value="1" id="checkbox_auto_increment" checked>
|
||||
<label class="form-check-label" for="checkbox_auto_increment">{% trans 'Add AUTO_INCREMENT value' %}</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="add_constraints" value="1" id="checkbox_constraints" checked>
|
||||
<label class="form-check-label" for="checkbox_constraints">{% trans 'Add constraints' %}</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="adjust_privileges" value="1" id="checkbox_privileges"
|
||||
{%- if has_adjust_privileges %} checked{% else %} title="
|
||||
{%- trans 'You don\'t have sufficient privileges to perform this operation; Please refer to the documentation for more details.' %}" disabled{% endif %}>
|
||||
<label class="form-check-label" for="checkbox_privileges">
|
||||
{% trans 'Adjust privileges' %}
|
||||
{{ show_docu('faq', 'faq6-39') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="switch_to_new" value="true" id="checkbox_switch"{{ switch_to_new ? ' checked' }}>
|
||||
<label class="form-check-label" for="checkbox_switch">{% trans 'Switch to copied database' %}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-right">
|
||||
<input class="btn btn-primary" type="submit" name="submit_copy" value="{% trans 'Go' %}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form id="change_db_charset_form" class="ajax" method="post" action="{{ url('/database/operations/collation') }}">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">{{ get_icon('s_asci', 'Collation'|trans, true) }}</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group form-row">
|
||||
<div class="col-auto">
|
||||
<label class="sr-only" for="select_db_collation">{% trans 'Collation' %}</label>
|
||||
<select class="form-control" lang="en" dir="ltr" name="db_collation" id="select_db_collation">
|
||||
<option value=""></option>
|
||||
{% for charset in charsets %}
|
||||
<optgroup label="{{ charset.getName() }}" title="{{ charset.getDescription() }}">
|
||||
{% for collation in collations[charset.getName()] %}
|
||||
<option value="{{ collation.getName() }}" title="{{ collation.getDescription() }}"{{ db_collation == collation.getName() ? ' selected' }}>
|
||||
{{ collation.getName() }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="change_all_tables_collations" id="checkbox_change_all_tables_collations">
|
||||
<label class="form-check-label" for="checkbox_change_all_tables_collations">{% trans 'Change all tables collations' %}</label>
|
||||
</div>
|
||||
<div class="form-check" id="span_change_all_tables_columns_collations">
|
||||
<input class="form-check-input" type="checkbox" name="change_all_tables_columns_collations" id="checkbox_change_all_tables_columns_collations">
|
||||
<label class="form-check-label" for="checkbox_change_all_tables_columns_collations">{% trans 'Change all tables columns collations' %}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-right">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
141
admin/phpMyAdmin/templates/database/privileges/index.twig
Normal file
141
admin/phpMyAdmin/templates/database/privileges/index.twig
Normal file
|
@ -0,0 +1,141 @@
|
|||
{% if is_superuser %}
|
||||
<form id="usersForm" action="{{ url('/server/privileges') }}">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
|
||||
<div class="w-100">
|
||||
<fieldset>
|
||||
<legend>
|
||||
{{ get_icon('b_usrcheck') }}
|
||||
{{ 'Users having access to "%s"'|trans|format('<a href="' ~ database_url ~ get_common({'db': db}, '&') ~ '">' ~ db|escape('html') ~ '</a>')|raw }}
|
||||
</legend>
|
||||
|
||||
<div class="table-responsive jsresponsive">
|
||||
<table class="table table-light table-striped table-hover w-auto">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th scope="col">{% trans 'User name' %}</th>
|
||||
<th scope="col">{% trans 'Host name' %}</th>
|
||||
<th scope="col">{% trans 'Type' %}</th>
|
||||
<th scope="col">{% trans 'Privileges' %}</th>
|
||||
<th scope="col">{% trans 'Grant' %}</th>
|
||||
<th scope="col" colspan="2">{% trans 'Action' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for privilege in privileges %}
|
||||
{% set privileges_amount = privilege.privileges|length %}
|
||||
<tr>
|
||||
<td{% if privileges_amount > 1 %} class="align-middle" rowspan="{{ privileges_amount }}"{% endif %}>
|
||||
<input type="checkbox" class="checkall" name="selected_usr[]" id="checkbox_sel_users_{{ loop.index0 }}" value="
|
||||
{{- privilege.user ~ '&#27;' ~ privilege.host }}">
|
||||
</td>
|
||||
<td{% if privileges_amount > 1 %} class="align-middle" rowspan="{{ privileges_amount }}"{% endif %}>
|
||||
{% if privilege.user is empty %}
|
||||
<span class="text-danger">{% trans 'Any' %}</span>
|
||||
{% else %}
|
||||
{{ privilege.user }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td{% if privileges_amount > 1 %} class="align-middle" rowspan="{{ privileges_amount }}"{% endif %}>
|
||||
{{ privilege.host }}
|
||||
</td>
|
||||
{% for priv in privilege.privileges %}
|
||||
<td>
|
||||
{% if priv.type == 'g' %}
|
||||
{% trans 'global' %}
|
||||
{% elseif priv.type == 'd' %}
|
||||
{% if priv.database == db|replace({'_': '\\_', '%': '\\%'}) %}
|
||||
{% trans 'database-specific' %}
|
||||
{% else %}
|
||||
{% trans 'wildcard' %}: <code>{{ priv.database }}</code>
|
||||
{% endif %}
|
||||
{% elseif priv.type == 'r' %}
|
||||
{% trans 'routine' %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<code>
|
||||
{% if priv.type == 'r' %}
|
||||
{{ priv.routine }}
|
||||
({{ priv.privileges|join(', ')|upper }})
|
||||
{% else %}
|
||||
{{ priv.privileges|join(', ')|raw }}
|
||||
{% endif %}
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
{{ priv.has_grant ? 'Yes'|trans : 'No'|trans }}
|
||||
</td>
|
||||
<td>
|
||||
{% if is_grantuser %}
|
||||
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
|
||||
'username': privilege.user,
|
||||
'hostname': privilege.host,
|
||||
'dbname': priv.database != '*' ? priv.database,
|
||||
'tablename': '',
|
||||
'routinename': priv.routine ?? ''
|
||||
}) }}">
|
||||
{{ get_icon('b_usredit', 'Edit privileges'|trans) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a class="export_user_anchor ajax" href="{{ url('/server/privileges', {
|
||||
'username': privilege.user,
|
||||
'hostname': privilege.host,
|
||||
'export': true,
|
||||
'initial': ''
|
||||
}) }}">
|
||||
{{ get_icon('b_tblexport', 'Export'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% if privileges_amount > 1 %}
|
||||
<tr class="noclick">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
{% trans 'No user found.' %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="floatleft">
|
||||
<img class="selectallarrow" src="{{ theme_image_path }}arrow_{{ text_dir }}.png" alt="
|
||||
{%- trans 'With selected:' %}" width="38" height="22">
|
||||
<input type="checkbox" id="usersForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
|
||||
<label for="usersForm_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_tblexport', 'Export'|trans) }}
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
{{ 'Not enough privilege to view users.'|trans|error }}
|
||||
{% endif %}
|
||||
|
||||
{% if is_createuser %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<fieldset id="fieldset_add_user">
|
||||
<legend>{% trans %}New{% context %}Create new user{% endtrans %}</legend>
|
||||
<a id="add_user_anchor" href="{{ url('/server/privileges', {
|
||||
'adduser': true,
|
||||
'dbname': db
|
||||
}) }}" rel="{{ get_common({'checkprivsdb': db}) }}">
|
||||
{{ get_icon('b_usradd', 'Add user account'|trans) }}
|
||||
</a>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
|
@ -0,0 +1,11 @@
|
|||
<td class="text-center">
|
||||
<select name="criteriaColumn[{{ column_number }}]" size="1">
|
||||
<option value=""> </option>
|
||||
{% for column in column_names %}
|
||||
<option value="{{ column }}"
|
||||
{%- if column is same as(selected) %} selected="selected"{% endif %}>
|
||||
{{- column -}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
23
admin/phpMyAdmin/templates/database/qbe/index.twig
Normal file
23
admin/phpMyAdmin/templates/database/qbe/index.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
<ul class="nav nav-pills m-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url('/database/multi-table-query', url_params) }}">
|
||||
{% trans 'Multi-table query' %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="{{ url('/database/qbe', url_params) }}">
|
||||
{% trans 'Query by example' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% apply format('<a href="' ~ url('/database/designer', url_params|merge({query: true})) ~ '">', '</a>')|notice %}
|
||||
{% trans 'Switch to %svisual builder%s' %}
|
||||
{% endapply %}
|
||||
|
||||
{% if has_message_to_display %}
|
||||
{{ 'You have to choose at least one column to display!'|trans|error }}
|
||||
{% endif %}
|
||||
|
||||
{{ selection_form_html|raw }}
|
|
@ -0,0 +1,28 @@
|
|||
<td class="value nowrap">
|
||||
<table class="table table-borderless table-sm">
|
||||
<tr>
|
||||
<td class="value nowrap p-0">
|
||||
<small>{% trans 'Ins:' %}</small>
|
||||
<input type="checkbox" name="criteriaRowInsert[{{ row_index }}]" aria-label="{% trans 'Insert' %}">
|
||||
</td>
|
||||
<td class="value p-0">
|
||||
<strong>{% trans 'And:' %}</strong>
|
||||
</td>
|
||||
<td class="p-0">
|
||||
<input type="radio" name="criteriaAndOrRow[{{ row_index }}]" value="and"{{ checked_options.and ? ' checked' }} aria-label="{% trans 'And' %}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="value nowrap p-0">
|
||||
<small>{% trans 'Del:' %}</small>
|
||||
<input type="checkbox" name="criteriaRowDelete[{{ row_index }}]" aria-label="{% trans 'Delete' %}">
|
||||
</td>
|
||||
<td class="value p-0">
|
||||
<strong>{% trans 'Or:' %}</strong>
|
||||
</td>
|
||||
<td class="p-0">
|
||||
<input type="radio" name="criteriaAndOrRow[{{ row_index }}]" value="or"{{ checked_options.or ? ' checked' }} aria-label="{% trans 'Or' %}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
118
admin/phpMyAdmin/templates/database/qbe/selection_form.twig
Normal file
118
admin/phpMyAdmin/templates/database/qbe/selection_form.twig
Normal file
|
@ -0,0 +1,118 @@
|
|||
<form action="{{ url('/database/qbe') }}" method="post" id="formQBE" class="lock-page">
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
|
||||
<div class="w-100">
|
||||
<fieldset>
|
||||
|
||||
{{ saved_searches_field|raw }}
|
||||
|
||||
<div class="table-responsive jsresponsive">
|
||||
<table class="table table-borderless table-sm">
|
||||
<tr class="noclick">
|
||||
<th>{% trans 'Column:' %}</th>
|
||||
{{ column_names_row|raw }}
|
||||
</tr>
|
||||
|
||||
<tr class="noclick">
|
||||
<th>{% trans 'Alias:' %}</th>
|
||||
{{ column_alias_row|raw }}
|
||||
</tr>
|
||||
|
||||
<tr class="noclick">
|
||||
<th>{% trans 'Show:' %}</th>
|
||||
{{ show_row|raw }}
|
||||
</tr>
|
||||
|
||||
<tr class="noclick">
|
||||
<th>{% trans 'Sort:' %}</th>
|
||||
{{ sort_row|raw }}
|
||||
</tr>
|
||||
|
||||
<tr class="noclick">
|
||||
<th>{% trans 'Sort order:' %}</th>
|
||||
{{ sort_order|raw }}
|
||||
</tr>
|
||||
|
||||
<tr class="noclick">
|
||||
<th>{% trans 'Criteria:' %}</th>
|
||||
{{ criteria_input_box_row|raw }}
|
||||
</tr>
|
||||
|
||||
{{ ins_del_and_or_criteria_rows|raw }}
|
||||
|
||||
<tr class="noclick">
|
||||
<th>{% trans 'Modify:' %}</th>
|
||||
{{ modify_columns_row|raw }}
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<fieldset class="tblFooters">
|
||||
<div class="floatleft">
|
||||
<label for="criteriaRowAddSelect">{% trans 'Add/Delete criteria rows:' %}</label>
|
||||
<select size="1" name="criteriaRowAdd" id="criteriaRowAddSelect">
|
||||
<option value="-3">-3</option>
|
||||
<option value="-2">-2</option>
|
||||
<option value="-1">-1</option>
|
||||
<option value="0" selected>0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="floatleft">
|
||||
<label for="criteriaColumnAddSelect">{% trans 'Add/Delete columns:' %}</label>
|
||||
<select size="1" name="criteriaColumnAdd" id="criteriaColumnAddSelect">
|
||||
<option value="-3">-3</option>
|
||||
<option value="-2">-2</option>
|
||||
<option value="-1">-1</option>
|
||||
<option value="0" selected>0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="floatleft">
|
||||
<input class="btn btn-secondary" type="submit" name="modify" value="{% trans 'Update query' %}">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="floatleft w-100">
|
||||
<fieldset>
|
||||
<legend>{% trans 'Use tables' %}</legend>
|
||||
|
||||
<select name="TableList[]" id="listTable" size="{{ criteria_tables|length > 30 ? '15' : '7' }}" aria-label="{% trans 'Use tables' %}" multiple>
|
||||
{% for table, selected in criteria_tables %}
|
||||
<option value="{{ table }}"{{ selected|raw }}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="tblFooters">
|
||||
<input class="btn btn-secondary" type="submit" name="modify" value="{% trans 'Update query' %}">
|
||||
</fieldset>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form action="{{ url('/database/qbe') }}" method="post" class="lock-page">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="submit_sql" value="1">
|
||||
|
||||
<div class="floatleft w-50">
|
||||
<fieldset id="tblQbe">
|
||||
<legend>{{ 'SQL query on database <b>%s</b>:'|trans|format(db_link)|raw }}</legend>
|
||||
|
||||
<textarea cols="80" name="sql_query" id="textSqlquery" rows="{{ criteria_tables|length > 30 ? '15' : '7' }}" dir="ltr" aria-label="{% trans 'SQL query' %}">
|
||||
{{- sql_query -}}
|
||||
</textarea>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="tblFooters" id="tblQbeFooters">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Submit query' %}">
|
||||
</fieldset>
|
||||
</div>
|
||||
</form>
|
|
@ -0,0 +1,10 @@
|
|||
<td class="text-center">
|
||||
<select name="criteriaSortOrder[{{ column_number }}]">
|
||||
<option value="1000"> </option>
|
||||
{% for i in 1..total_column_count %}
|
||||
<option value="{{ i }}"{{ i == sort_order ? ' selected="selected"' }}>
|
||||
{{ i }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
|
@ -0,0 +1,9 @@
|
|||
<td class="text-center">
|
||||
<select style="width:{{ real_width }}" name="criteriaSort[{{ column_number }}]" size="1">
|
||||
<option value=""> </option>
|
||||
<option value="ASC"
|
||||
{{- selected == 'ASC' ? ' selected="selected"' }}>{% trans 'Ascending' %}</option>
|
||||
<option value="DESC"
|
||||
{{- selected == 'DESC' ? ' selected="selected"' }}>{% trans 'Descending' %}</option>
|
||||
</select>
|
||||
</td>
|
75
admin/phpMyAdmin/templates/database/routines/index.twig
Normal file
75
admin/phpMyAdmin/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>
|
|
@ -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
admin/phpMyAdmin/templates/database/routines/row.twig
Normal file
82
admin/phpMyAdmin/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>
|
95
admin/phpMyAdmin/templates/database/search/main.twig
Normal file
95
admin/phpMyAdmin/templates/database/search/main.twig
Normal file
|
@ -0,0 +1,95 @@
|
|||
<a id="db_search"></a>
|
||||
<form id="db_search_form" method="post" action="{{ url('/database/search') }}" name="db_search" class="ajax lock-page">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<fieldset>
|
||||
<legend>{% trans 'Search in database' %}</legend>
|
||||
<p>
|
||||
<label for="criteriaSearchString" class="displayblock">
|
||||
{% trans 'Words or values to search for (wildcard: "%"):' %}
|
||||
</label>
|
||||
<input id="criteriaSearchString" name="criteriaSearchString" class="w-75" type="text" value="
|
||||
{{- criteria_search_string }}">
|
||||
</p>
|
||||
|
||||
<fieldset>
|
||||
<legend>{% trans 'Find:' %}</legend>
|
||||
|
||||
<div>
|
||||
<input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio1" value="1"{{ criteria_search_type == '1' ? ' checked' }}>
|
||||
<label for="criteriaSearchTypeRadio1">{% trans 'at least one of the words' %} {{ show_hint('Words are separated by a space character (" ").'|trans) }}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio2" value="2"{{ criteria_search_type == '2' ? ' checked' }}>
|
||||
<label for="criteriaSearchTypeRadio2">{% trans 'all of the words' %} {{ show_hint('Words are separated by a space character (" ").'|trans) }}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio3" value="3"{{ criteria_search_type == '3' ? ' checked' }}>
|
||||
<label for="criteriaSearchTypeRadio3">{% trans 'the exact phrase as substring' %}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio4" value="4"{{ criteria_search_type == '4' ? ' checked' }}>
|
||||
<label for="criteriaSearchTypeRadio4">{% trans 'the exact phrase as whole field' %}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio5" value="5"{{ criteria_search_type == '5' ? ' checked' }}>
|
||||
<label for="criteriaSearchTypeRadio5">{% trans 'as regular expression' %} {{ show_mysql_docu('Regexp') }}</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{% trans 'Inside tables:' %}</legend>
|
||||
<p>
|
||||
<a href="#" onclick="Functions.setSelectOptions('db_search', 'criteriaTables[]', true); return false;">
|
||||
{% trans 'Select all' %}
|
||||
</a> /
|
||||
<a href="#" onclick="Functions.setSelectOptions('db_search', 'criteriaTables[]', false); return false;">
|
||||
{% trans 'Unselect all' %}
|
||||
</a>
|
||||
</p>
|
||||
<select name="criteriaTables[]" multiple>
|
||||
{% for each_table in tables_names_only %}
|
||||
<option value="{{ each_table }}"
|
||||
{% if criteria_tables|length > 0 %}
|
||||
{{- each_table in criteria_tables ? ' selected' }}
|
||||
{% else %}
|
||||
{{- ' selected' }}
|
||||
{% endif %}
|
||||
>
|
||||
{{ each_table }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</fieldset>
|
||||
|
||||
<p>
|
||||
{# Inputbox for column name entry #}
|
||||
<label for="criteriaColumnName" class="displayblock">
|
||||
{% trans 'Inside column:' %}
|
||||
</label>
|
||||
<input id="criteriaColumnName" type="text" name="criteriaColumnName" class="w-75" value="
|
||||
{{- criteria_column_name is not empty ? criteria_column_name }}">
|
||||
</p>
|
||||
</fieldset>
|
||||
<fieldset class="tblFooters">
|
||||
<input id="buttonGo" class="btn btn-primary" type="submit" name="submit_search" value="{% trans 'Go' %}">
|
||||
</fieldset>
|
||||
</form>
|
||||
<div id="togglesearchformdiv">
|
||||
<a id="togglesearchformlink"></a>
|
||||
</div>
|
||||
<div id="searchresults"></div>
|
||||
<div id="togglesearchresultsdiv"><a id="togglesearchresultlink"></a></div>
|
||||
<br class="clearfloat">
|
||||
{# These two table-image and table-link elements display the table name in browse search results #}
|
||||
<div id="table-info">
|
||||
<a id="table-link" class="item"></a>
|
||||
</div>
|
||||
{# Div for browsing results #}
|
||||
<div id="browse-results">
|
||||
{# This browse-results div is used to load the browse and delete results in the db search #}
|
||||
</div>
|
||||
<div id="sqlqueryform" class="clearfloat">
|
||||
{# This sqlqueryform div is used to load the delete form in the db search #}
|
||||
</div>
|
||||
{# Toggle query box link #}
|
||||
<button class="btn btn-secondary" id="togglequerybox"></button>
|
62
admin/phpMyAdmin/templates/database/search/results.twig
Normal file
62
admin/phpMyAdmin/templates/database/search/results.twig
Normal file
|
@ -0,0 +1,62 @@
|
|||
<table class="pma-table data">
|
||||
<caption class="tblHeaders">
|
||||
{{ 'Search results for "<em>%s</em>" %s:'|format(
|
||||
criteria_search_string,
|
||||
search_type_description
|
||||
)|raw }}
|
||||
</caption>
|
||||
{% for row in rows %}
|
||||
<tr class="noclick">
|
||||
<td>
|
||||
{% set result_message %}
|
||||
{% trans %}
|
||||
%1$s match in <strong>%2$s</strong>
|
||||
{% plural row.result_count %}
|
||||
%1$s matches in <strong>%2$s</strong>
|
||||
{% endtrans %}
|
||||
{% endset %}
|
||||
{{ result_message|format(row.result_count, row.table)|raw }}
|
||||
</td>
|
||||
{% if row.result_count > 0 %}
|
||||
{% set url_params = {
|
||||
'db': db,
|
||||
'table': row.table,
|
||||
'goto': url('/database/sql'),
|
||||
'pos': 0,
|
||||
'is_js_confirmed': 0
|
||||
} %}
|
||||
<td>
|
||||
<a name="browse_search"
|
||||
class="ajax browse_results"
|
||||
href="{{ url('/sql', url_params) }}"
|
||||
data-browse-sql="{{ row.new_search_sqls.select_columns }}"
|
||||
data-table-name="{{ row.table }}">
|
||||
{% trans 'Browse' %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a name="delete_search"
|
||||
class="ajax delete_results"
|
||||
href="{{ url('/sql', url_params) }}"
|
||||
data-delete-sql="{{ row.new_search_sqls.delete }}"
|
||||
data-table-name="{{ row.table }}">
|
||||
{% trans 'Delete' %}
|
||||
</a>
|
||||
</td>
|
||||
{% else %}
|
||||
<td></td>
|
||||
<td></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% if criteria_tables|length > 1 %}
|
||||
<p>
|
||||
{% trans %}
|
||||
<strong>Total:</strong> <em>{{ count }}</em> match
|
||||
{% plural result_total %}
|
||||
<strong>Total:</strong> <em>{{ count }}</em> matches
|
||||
{% endtrans %}
|
||||
</p>
|
||||
{% endif %}
|
|
@ -0,0 +1,15 @@
|
|||
<form id="ajax_form" action="{{ url('/database/structure/add-prefix-table') }}" method="post">
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
|
||||
<fieldset class = "input">
|
||||
<table class="pma-table">
|
||||
<tr>
|
||||
<td>{% trans 'Add prefix' %}</td>
|
||||
<td>
|
||||
<input type="text" name="add_prefix" id="txtPrefix" aria-label="{% trans 'Add prefix' %}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
|
@ -0,0 +1,93 @@
|
|||
<tfoot id="tbl_summary_row" class="thead-light">
|
||||
<tr>
|
||||
<th class="d-print-none"></th>
|
||||
<th class="tbl_num text-nowrap">
|
||||
{% set num_tables_trans -%}
|
||||
{% trans %}%s table{% plural num_tables %}%s tables{% endtrans %}
|
||||
{%- endset %}
|
||||
{{ num_tables_trans|format(format_number(num_tables, 0)) }}
|
||||
</th>
|
||||
{% if server_slave_status %}
|
||||
<th>{% trans 'Replication' %}</th>
|
||||
{% endif %}
|
||||
{% set sum_colspan = db_is_system_schema ? 4 : 7 %}
|
||||
{% if num_favorite_tables == 0 %}
|
||||
{% set sum_colspan = sum_colspan - 1 %}
|
||||
{% endif %}
|
||||
<th colspan="{{ sum_colspan }}" class="d-print-none">{% trans 'Sum' %}</th>
|
||||
{% set row_count_sum = format_number(sum_entries, 0) %}
|
||||
{# If a table shows approximate rows count, display update-all-real-count anchor. #}
|
||||
{% set row_sum_url = [] %}
|
||||
{% if approx_rows is defined %}
|
||||
{% set row_sum_url = {
|
||||
'ajax_request': true,
|
||||
'db': db,
|
||||
'real_row_count_all': 'true'
|
||||
} %}
|
||||
{% endif %}
|
||||
{% if approx_rows %}
|
||||
{% set cell_text -%}
|
||||
<a href="{{ url('/database/structure/real-row-count', row_sum_url) }}" class="ajax row_count_sum">~
|
||||
{{- row_count_sum -}}
|
||||
</a>
|
||||
{%- endset %}
|
||||
{% else %}
|
||||
{% set cell_text = row_count_sum %}
|
||||
{% endif %}
|
||||
<th class="value tbl_rows text-monospace text-right">{{ cell_text }}</th>
|
||||
{% if not (properties_num_columns > 1) %}
|
||||
{# MySQL <= 5.5.2 #}
|
||||
{% set default_engine = dbi.fetchValue('SELECT @@storage_engine;') %}
|
||||
{% if default_engine is empty %}
|
||||
{# MySQL >= 5.5.3 #}
|
||||
{% set default_engine = dbi.fetchValue('SELECT @@default_storage_engine;') %}
|
||||
{% endif %}
|
||||
<th class="text-center">
|
||||
<dfn title="{{ '%s is the default storage engine on this MySQL server.'|trans|format(default_engine) }}">
|
||||
{{ default_engine }}
|
||||
</dfn>
|
||||
</th>
|
||||
<th>
|
||||
{% if database_collation is not empty %}
|
||||
<dfn title="{{ database_collation.description }} ({% trans 'Default' %})">
|
||||
{{ database_collation.name }}
|
||||
</dfn>
|
||||
{% endif %}
|
||||
</th>
|
||||
{% endif %}
|
||||
|
||||
{% if is_show_stats %}
|
||||
{% set sum = format_byte_down(sum_size, 3, 1) %}
|
||||
{% set sum_formatted = sum[0] %}
|
||||
{% set sum_unit = sum[1] %}
|
||||
<th class="value tbl_size text-monospace text-right">{{ sum_formatted }} {{ sum_unit }}</th>
|
||||
|
||||
{% set overhead = format_byte_down(overhead_size, 3, 1) %}
|
||||
{% set overhead_formatted = overhead[0] %}
|
||||
{% set overhead_unit = overhead[1] %}
|
||||
<th class="value tbl_overhead text-monospace text-right">{{ overhead_formatted }} {{ overhead_unit }}</th>
|
||||
{% endif %}
|
||||
|
||||
{% if show_charset %}
|
||||
<th>{{ database_charset }}</th>
|
||||
{% endif %}
|
||||
{% if show_comment %}
|
||||
<th></th>
|
||||
{% endif %}
|
||||
{% if show_creation %}
|
||||
<th class="value tbl_creation text-monospace text-right">
|
||||
{{ create_time_all }}
|
||||
</th>
|
||||
{% endif %}
|
||||
{% if show_last_update %}
|
||||
<th class="value tbl_last_update text-monospace text-right">
|
||||
{{ update_time_all }}
|
||||
</th>
|
||||
{% endif %}
|
||||
{% if show_last_check %}
|
||||
<th class="value tbl_last_check text-monospace text-right">
|
||||
{{ check_time_all }}
|
||||
</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</tfoot>
|
|
@ -0,0 +1,20 @@
|
|||
<form id="ajax_form" action="{{ url(route) }}" method="post">
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
|
||||
<fieldset class="input">
|
||||
<table class="pma-table">
|
||||
<tr>
|
||||
<td>{% trans 'From' %}</td>
|
||||
<td>
|
||||
<input type="text" name="from_prefix" id="initialPrefix">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'To' %}</td>
|
||||
<td>
|
||||
<input type="text" name="to_prefix" id="newPrefix">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
|
@ -0,0 +1,40 @@
|
|||
<div class="clearfloat print_ignore">
|
||||
<img class="selectallarrow" src="{{ theme_image_path }}arrow_{{ text_dir }}.png" width="38" height="22" alt="{% trans 'With selected:' %}">
|
||||
<input type="checkbox" id="tablesForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
|
||||
<label for="tablesForm_checkall">{% trans 'Check all' %}</label>
|
||||
{% if overhead_check != '' %}
|
||||
/ <a href="#" class="checkall-filter" data-checkall-selector=".tbl-overhead">{% trans 'Check tables having overhead' %}</a>
|
||||
{% endif %}
|
||||
<select name="submit_mult" style="margin: 0 3em 0 3em;">
|
||||
<option value="{% trans 'With selected:' %}" selected="selected">{% trans 'With selected:' %}</option>
|
||||
<option value="copy_tbl">{% trans 'Copy table' %}</option>
|
||||
<option value="show_create">{% trans 'Show create' %}</option>
|
||||
<option value="export">{% trans 'Export' %}</option>
|
||||
{% if not db_is_system_schema and not disable_multi_table %}
|
||||
<optgroup label="{% trans 'Delete data or table' %}">
|
||||
<option value="empty_tbl">{% trans 'Empty' %}</option>
|
||||
<option value="drop_tbl">{% trans 'Drop' %}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{% trans 'Table maintenance' %}">
|
||||
<option value="analyze_tbl">{% trans 'Analyze table' %}</option>
|
||||
<option value="check_tbl">{% trans 'Check table' %}</option>
|
||||
<option value="checksum_tbl">{% trans 'Checksum table' %}</option>
|
||||
<option value="optimize_tbl">{% trans 'Optimize table' %}</option>
|
||||
<option value="repair_tbl">{% trans 'Repair table' %}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{% trans 'Prefix' %}">
|
||||
<option value="add_prefix_tbl">{% trans 'Add prefix to table' %}</option>
|
||||
<option value="replace_prefix_tbl">{% trans 'Replace table prefix' %}</option>
|
||||
<option value="copy_tbl_change_prefix">{% trans 'Copy table with prefix' %}</option>
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
{% if central_columns_work is defined and central_columns_work %}
|
||||
<optgroup label="{% trans 'Central columns' %}">
|
||||
<option value="sync_unique_columns_central_list">{% trans 'Add columns to central list' %}</option>
|
||||
<option value="delete_unique_columns_central_list">{% trans 'Remove columns from central list' %}</option>
|
||||
<option value="make_consistent_with_central_list">{% trans 'Make consistent with central list' %}</option>
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
</select>
|
||||
{{ hidden_fields|join('\n')|raw }}
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
<dfn title="{{ valueTitle }}">{{ value }}</dfn>
|
54
admin/phpMyAdmin/templates/database/structure/copy_form.twig
Normal file
54
admin/phpMyAdmin/templates/database/structure/copy_form.twig
Normal file
|
@ -0,0 +1,54 @@
|
|||
<form id="ajax_form" action="{{ url('/database/structure/copy-table') }}" method="post">
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
|
||||
<fieldset>
|
||||
<strong><label for="db_name_dropdown">{% trans 'Database:' %}</label></strong>
|
||||
<select id="db_name_dropdown" name="target_db">
|
||||
{% for each_db in options %}
|
||||
<option value="{{ each_db.name }}"{{ each_db.is_selected ? ' selected' }}>{{ each_db.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<br><br>
|
||||
|
||||
<strong><label>{% trans 'Options:' %}</label></strong>
|
||||
|
||||
<br>
|
||||
|
||||
<input type="radio" id="what_structure" value="structure" name="what">
|
||||
<label for="what_structure">{% trans 'Structure only' %}</label>
|
||||
|
||||
<br>
|
||||
|
||||
<input type="radio" id="what_data" value="data" name="what" checked>
|
||||
<label for="what_data">{% trans 'Structure and data' %}</label>
|
||||
|
||||
<br>
|
||||
|
||||
<input type="radio" id="what_dataonly" value="dataonly" name="what">
|
||||
<label for="what_dataonly">{% trans 'Data only' %}</label>
|
||||
|
||||
<br><br>
|
||||
|
||||
<input type="checkbox" id="checkbox_drop" value="true" name="drop_if_exists">
|
||||
<label for="checkbox_drop">{% trans 'Add DROP TABLE' %}</label>
|
||||
|
||||
<br>
|
||||
|
||||
<input type="checkbox" id="checkbox_auto_increment_cp" value="1" name="sql_auto_increment">
|
||||
<label for="checkbox_auto_increment_cp">{% trans 'Add AUTO INCREMENT value' %}</label>
|
||||
|
||||
<br>
|
||||
|
||||
<input type="checkbox" id="checkbox_constraints" value="1" name="sql_auto_increment" checked>
|
||||
<label for="checkbox_constraints">{% trans 'Add constraints' %}</label>
|
||||
|
||||
<br><br>
|
||||
|
||||
<input type="checkbox" name="adjust_privileges" value="1" id="checkbox_adjust_privileges" checked>
|
||||
<label for="checkbox_adjust_privileges">
|
||||
{% trans 'Adjust privileges' %}
|
||||
{{ show_docu('faq', 'faq6-39') }}
|
||||
</label>
|
||||
</fieldset>
|
||||
</form>
|
23
admin/phpMyAdmin/templates/database/structure/drop_form.twig
Normal file
23
admin/phpMyAdmin/templates/database/structure/drop_form.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
<form action="{{ url('/database/structure/drop-table') }}" method="post">
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
|
||||
<fieldset class="confirmation">
|
||||
<legend>
|
||||
{% trans 'Do you really want to execute the following query?' %}
|
||||
</legend>
|
||||
|
||||
<code>{{ full_query|raw }}</code>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="tblFooters">
|
||||
<div id="foreignkeychk" class="floatleft">
|
||||
<input type="hidden" name="fk_checks" value="0">
|
||||
<input type="checkbox" name="fk_checks" id="fk_checks" value="1"{{ is_foreign_key_check ? ' checked' }}>
|
||||
<label for="fk_checks">{% trans 'Enable foreign key checks' %}</label>
|
||||
</div>
|
||||
<div class="floatright">
|
||||
<input id="buttonYes" class="btn btn-secondary" type="submit" name="mult_btn" value="{% trans 'Yes' %}">
|
||||
<input id="buttonNo" class="btn btn-secondary" type="submit" name="mult_btn" value="{% trans 'No' %}">
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
|
@ -0,0 +1,23 @@
|
|||
<form action="{{ url('/database/structure/empty-table') }}" method="post">
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
|
||||
<fieldset class="confirmation">
|
||||
<legend>
|
||||
{% trans 'Do you really want to execute the following query?' %}
|
||||
</legend>
|
||||
|
||||
<code>{{ full_query|raw }}</code>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="tblFooters">
|
||||
<div id="foreignkeychk" class="floatleft">
|
||||
<input type="hidden" name="fk_checks" value="0">
|
||||
<input type="checkbox" name="fk_checks" id="fk_checks" value="1"{{ is_foreign_key_check ? ' checked' }}>
|
||||
<label for="fk_checks">{% trans 'Enable foreign key checks' %}</label>
|
||||
</div>
|
||||
<div class="floatright">
|
||||
<input id="buttonYes" class="btn btn-secondary" type="submit" name="mult_btn" value="{% trans 'Yes' %}">
|
||||
<input id="buttonNo" class="btn btn-secondary" type="submit" name="mult_btn" value="{% trans 'No' %}">
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
|
@ -0,0 +1,7 @@
|
|||
<a id="{{ table_name_hash }}_favorite_anchor"
|
||||
class="ajax favorite_table_anchor"
|
||||
href="{{ url('/database/structure/favorite-table', fav_params) }}"
|
||||
title="{{ already_favorite ? 'Remove from Favorites'|trans : 'Add to Favorites'|trans }}"
|
||||
data-favtargets="{{ db_table_name_hash }}">
|
||||
{{ already_favorite ? get_icon('b_favorite') : get_icon('b_no_favorite') }}
|
||||
</a>
|
24
admin/phpMyAdmin/templates/database/structure/index.twig
Normal file
24
admin/phpMyAdmin/templates/database/structure/index.twig
Normal file
|
@ -0,0 +1,24 @@
|
|||
{% if has_tables %}
|
||||
<div id="tableslistcontainer">
|
||||
{{ list_navigator_html|raw }}
|
||||
|
||||
{{ table_list_html|raw }}
|
||||
|
||||
{{ list_navigator_html|raw }}
|
||||
</div>
|
||||
<hr>
|
||||
<p class="print_ignore">
|
||||
<a href="#" id="printView">
|
||||
{{ get_icon('b_print', 'Print'|trans, true) }}
|
||||
</a>
|
||||
<a href="{{ url('/database/data-dictionary', {'db': database, 'goto': url('/database/structure')}) }}" target="print_view">
|
||||
{{ get_icon('b_tblanalyse', 'Data dictionary'|trans, true) }}
|
||||
</a>
|
||||
</p>
|
||||
{% else %}
|
||||
{{ 'No tables found in database.'|trans|notice }}
|
||||
{% endif %}
|
||||
|
||||
{% if not is_system_schema %}
|
||||
{{ create_table_html|raw }}
|
||||
{% endif %}
|
|
@ -0,0 +1,4 @@
|
|||
<a href="{{ url('/table/structure', table_url_params) }}#showusage" id="overhead">
|
||||
<span>{{ formatted_overhead }}</span>
|
||||
<span class="unit">{{ overhead_unit }}</span>
|
||||
</a>
|
|
@ -0,0 +1,47 @@
|
|||
<div class="show_create_results">
|
||||
<h2>{% trans 'Showing create queries' %}</h2>
|
||||
|
||||
{% if tables.tables is not empty %}
|
||||
<fieldset>
|
||||
<legend>{% trans 'Tables' %}</legend>
|
||||
<table class="pma-table show_create">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans 'Table' %}</th>
|
||||
<th>{% trans 'Create table' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for table in tables.tables %}
|
||||
<tr>
|
||||
<td><strong>{{ table.name }}</strong></td>
|
||||
<td>{{ table.show_create|raw }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
{% if tables.views is not empty %}
|
||||
<fieldset>
|
||||
<legend>{% trans 'Views' %}</legend>
|
||||
<table class="pma-table show_create">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans 'View' %}</th>
|
||||
<th>{% trans 'Create view' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for view in tables.views %}
|
||||
<tr>
|
||||
<td><strong>{{ view.name }}</strong></td>
|
||||
<td>{{ view.show_create|raw }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
</div>
|
|
@ -0,0 +1,226 @@
|
|||
<tr id="row_tbl_{{ curr }}"{{ table_is_view ? ' class="is_view"' }} data-filter-row="{{ current_table['TABLE_NAME']|upper }}">
|
||||
<td class="text-center d-print-none">
|
||||
<input type="checkbox"
|
||||
name="selected_tbl[]"
|
||||
class="{{ input_class }}"
|
||||
value="{{ current_table['TABLE_NAME'] }}"
|
||||
id="checkbox_tbl_{{ curr }}">
|
||||
</td>
|
||||
<th>
|
||||
<a href="{{ url('/sql', table_url_params|merge({'pos': 0})) }}" title="{{ browse_table_label_title }}">
|
||||
{{ browse_table_label_truename }}
|
||||
</a>
|
||||
{{ tracking_icon|raw }}
|
||||
</th>
|
||||
{% if server_slave_status %}
|
||||
<td class="text-center">
|
||||
{{ ignored ? get_image('s_cancel', 'Not replicated'|trans) }}
|
||||
{{ do ? get_image('s_success', 'Replicated'|trans) }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Favorite table anchor #}
|
||||
{% if num_favorite_tables > 0 %}
|
||||
<td class="text-center d-print-none">
|
||||
{# Check if current table is already in favorite list #}
|
||||
{% set fav_params = {
|
||||
'db': db,
|
||||
'ajax_request': true,
|
||||
'favorite_table': current_table['TABLE_NAME'],
|
||||
((already_favorite ? 'remove' : 'add') ~ '_favorite'): true
|
||||
} %}
|
||||
{% include 'database/structure/favorite_anchor.twig' with {
|
||||
'table_name_hash': table_name_hash,
|
||||
'db_table_name_hash': db_table_name_hash,
|
||||
'fav_params': fav_params,
|
||||
'already_favorite': already_favorite,
|
||||
} only %}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td class="text-center d-print-none">
|
||||
<a href="{{ url('/sql', table_url_params|merge({'pos': 0})) }}">
|
||||
{{ may_have_rows ? get_icon('b_browse', 'Browse'|trans) : get_icon('bd_browse', 'Browse'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center d-print-none">
|
||||
<a href="{{ url('/table/structure', table_url_params) }}">
|
||||
{{ get_icon('b_props', 'Structure'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center d-print-none">
|
||||
<a href="{{ url('/table/search', table_url_params) }}">
|
||||
{{ may_have_rows ? get_icon('b_select', 'Search'|trans) : get_icon('bd_select', 'Search'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
{% if not db_is_system_schema %}
|
||||
<td class="insert_table text-center d-print-none">
|
||||
<a href="{{ url('/table/change', table_url_params) }}">{{ get_icon('b_insrow', 'Insert'|trans) }}</a>
|
||||
</td>
|
||||
{% if table_is_view %}
|
||||
<td class="text-center d-print-none">
|
||||
<a href="{{ url('/view/create', {
|
||||
'db': db,
|
||||
'table': current_table['TABLE_NAME']
|
||||
}) }}">{{ get_icon('b_edit', 'Edit'|trans) }}</a>
|
||||
</td>
|
||||
{% else %}
|
||||
<td class="text-center d-print-none">
|
||||
<a class="truncate_table_anchor ajax" href="{{ url('/sql') }}" data-post="{{ get_common(table_url_params|merge({
|
||||
'sql_query': empty_table_sql_query,
|
||||
'message_to_show': empty_table_message_to_show
|
||||
}), '') }}">
|
||||
{{ may_have_rows ? get_icon('b_empty', 'Empty'|trans) : get_icon('bd_empty', 'Empty'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-center d-print-none">
|
||||
<a class="ajax drop_table_anchor
|
||||
{{- table_is_view or current_table['ENGINE'] == null ? ' view' }}" href="{{ url('/sql') }}" data-post="
|
||||
{{- get_common(table_url_params|merge({
|
||||
'reload': 1,
|
||||
'purge': 1,
|
||||
'sql_query': drop_query,
|
||||
'message_to_show': drop_message
|
||||
}), '') }}">
|
||||
{{ get_icon('b_drop', 'Drop'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if current_table['TABLE_ROWS'] is defined
|
||||
and (current_table['ENGINE'] != null or table_is_view) %}
|
||||
{# Get the row count #}
|
||||
{% set row_count = format_number(current_table['TABLE_ROWS'], 0) %}
|
||||
|
||||
{# Content to be appended into 'tbl_rows' cell.
|
||||
If row count is approximate, display it as an anchor to get real count. #}
|
||||
<td class="value tbl_rows text-monospace text-right"
|
||||
data-table="{{ current_table['TABLE_NAME'] }}">
|
||||
{% if approx_rows %}
|
||||
<a href="{{ url('/database/structure/real-row-count', {
|
||||
'ajax_request': true,
|
||||
'db': db,
|
||||
'table': current_table['TABLE_NAME']
|
||||
}) }}" class="ajax real_row_count">
|
||||
<bdi>
|
||||
~{{ row_count }}
|
||||
</bdi>
|
||||
</a>
|
||||
{% else %}
|
||||
{{ row_count }}
|
||||
{% endif %}
|
||||
{{ show_superscript|raw }}
|
||||
</td>
|
||||
|
||||
{% if not (properties_num_columns > 1) %}
|
||||
<td class="nowrap">
|
||||
{% if current_table['ENGINE'] is not empty %}
|
||||
{{ current_table['ENGINE'] }}
|
||||
{% elseif table_is_view %}
|
||||
{% trans 'View' %}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if collation|length > 0 %}
|
||||
<td class="nowrap">
|
||||
{{ collation|raw }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_show_stats %}
|
||||
<td class="value tbl_size text-monospace text-right">
|
||||
<a href="{{ url('/table/structure', table_url_params) }}#showusage">
|
||||
<span>{{ formatted_size }}</span> <span class="unit">{{ unit }}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="value tbl_overhead text-monospace text-right">
|
||||
{{ overhead|raw }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if not (show_charset > 1) %}
|
||||
{% if charset|length > 0 %}
|
||||
<td class="nowrap">
|
||||
{{ charset|raw }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if show_comment %}
|
||||
{% set comment = current_table['Comment'] %}
|
||||
<td>
|
||||
{% if comment|length > limit_chars %}
|
||||
<abbr title="{{ comment }}">
|
||||
{{ comment|slice(0, limit_chars) }}
|
||||
...
|
||||
</abbr>
|
||||
{% else %}
|
||||
{{ comment }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if show_creation %}
|
||||
<td class="value tbl_creation text-monospace text-right">
|
||||
{{ create_time }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if show_last_update %}
|
||||
<td class="value tbl_last_update text-monospace text-right">
|
||||
{{ update_time }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if show_last_check %}
|
||||
<td class="value tbl_last_check text-monospace text-right">
|
||||
{{ check_time }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% elseif table_is_view %}
|
||||
<td class="value tbl_rows text-monospace text-right">-</td>
|
||||
<td class="nowrap">
|
||||
{% trans 'View' %}
|
||||
</td>
|
||||
<td class="nowrap">---</td>
|
||||
{% if is_show_stats %}
|
||||
<td class="value tbl_size text-monospace text-right">-</td>
|
||||
<td class="value tbl_overhead text-monospace text-right">-</td>
|
||||
{% endif %}
|
||||
{% if show_charset %}
|
||||
<td></td>
|
||||
{% endif %}
|
||||
{% if show_comment %}
|
||||
<td></td>
|
||||
{% endif %}
|
||||
{% if show_creation %}
|
||||
<td class="value tbl_creation text-monospace text-right">-</td>
|
||||
{% endif %}
|
||||
{% if show_last_update %}
|
||||
<td class="value tbl_last_update text-monospace text-right">-</td>
|
||||
{% endif %}
|
||||
{% if show_last_check %}
|
||||
<td class="value tbl_last_check text-monospace text-right">-</td>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if db_is_system_schema %}
|
||||
{% set action_colspan = 3 %}
|
||||
{% else %}
|
||||
{% set action_colspan = 6 %}
|
||||
{% endif %}
|
||||
{% if num_favorite_tables > 0 %}
|
||||
{% set action_colspan = action_colspan + 1 %}
|
||||
{% endif %}
|
||||
|
||||
{% set colspan_for_structure = action_colspan + 3 %}
|
||||
<td colspan="{{ colspan_for_structure - db_is_system_schema ? 6 : 9 }}"
|
||||
class="text-center">
|
||||
{% trans 'in use' %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
|
@ -0,0 +1,78 @@
|
|||
<form method="post" action="{{ url('/database/structure') }}" name="tablesForm" id="tablesForm">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-light table-striped table-hover table-sm w-auto data">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="d-print-none"></th>
|
||||
<th>{{ sortable_table_header('Table'|trans, 'table') }}</th>
|
||||
{% if replication %}
|
||||
<th>{% trans 'Replication' %}</th>
|
||||
{% endif %}
|
||||
|
||||
{% if db_is_system_schema %}
|
||||
{% set action_colspan = 3 %}
|
||||
{% else %}
|
||||
{% set action_colspan = 6 %}
|
||||
{% endif %}
|
||||
{% if num_favorite_tables > 0 %}
|
||||
{% set action_colspan = action_colspan + 1 %}
|
||||
{% endif %}
|
||||
<th colspan="{{ action_colspan }}" class="d-print-none">
|
||||
{% trans 'Action' %}
|
||||
</th>
|
||||
{# larger values are more interesting so default sort order is DESC #}
|
||||
<th>
|
||||
{{ sortable_table_header('Rows'|trans, 'records', 'DESC') }}
|
||||
{{ show_hint('May be approximate. Click on the number to get the exact count. See [doc@faq3-11]FAQ 3.11[/doc].'|trans|sanitize) }}
|
||||
</th>
|
||||
{% if not (properties_num_columns > 1) %}
|
||||
<th>{{ sortable_table_header('Type'|trans, 'type') }}</th>
|
||||
<th>{{ sortable_table_header('Collation'|trans, 'collation') }}</th>
|
||||
{% endif %}
|
||||
|
||||
{% if is_show_stats %}
|
||||
{# larger values are more interesting so default sort order is DESC #}
|
||||
<th>{{ sortable_table_header('Size'|trans, 'size', 'DESC') }}</th>
|
||||
{# larger values are more interesting so default sort order is DESC #}
|
||||
<th>{{ sortable_table_header('Overhead'|trans, 'overhead', 'DESC') }}</th>
|
||||
{% endif %}
|
||||
|
||||
{% if show_charset %}
|
||||
<th>{{ sortable_table_header('Charset'|trans, 'charset') }}</th>
|
||||
{% endif %}
|
||||
|
||||
{% if show_comment %}
|
||||
<th>{{ sortable_table_header('Comment'|trans, 'comment') }}</th>
|
||||
{% endif %}
|
||||
|
||||
{% if show_creation %}
|
||||
{# newer values are more interesting so default sort order is DESC #}
|
||||
<th>{{ sortable_table_header('Creation'|trans, 'creation', 'DESC') }}</th>
|
||||
{% endif %}
|
||||
|
||||
{% if show_last_update %}
|
||||
{# newer values are more interesting so default sort order is DESC #}
|
||||
<th>{{ sortable_table_header('Last update'|trans, 'last_update', 'DESC') }}</th>
|
||||
{% endif %}
|
||||
|
||||
{% if show_last_check %}
|
||||
{# newer values are more interesting so default sort order is DESC #}
|
||||
<th>{{ sortable_table_header('Last check'|trans, 'last_check', 'DESC') }}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for structure_table_row in structure_table_rows %}
|
||||
{% include 'database/structure/structure_table_row.twig' with structure_table_row only %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% if body_for_table_summary %}
|
||||
{% include 'database/structure/body_for_table_summary.twig' with body_for_table_summary only %}
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
{% if check_all_tables %}
|
||||
{% include 'database/structure/check_all_tables.twig' with check_all_tables only %}
|
||||
{% endif %}
|
||||
</form>
|
|
@ -0,0 +1,7 @@
|
|||
<a href="{{ url('/table/tracking', {'table': table, 'db': db}) }}">
|
||||
{% if is_tracked -%}
|
||||
{{ get_image('eye', 'Tracking is active.'|trans) }}
|
||||
{%- else -%}
|
||||
{{ get_image('eye_grey', 'Tracking is not active.'|trans) }}
|
||||
{%- endif %}
|
||||
</a>
|
194
admin/phpMyAdmin/templates/database/tracking/tables.twig
Normal file
194
admin/phpMyAdmin/templates/database/tracking/tables.twig
Normal file
|
@ -0,0 +1,194 @@
|
|||
{# Tracked tables exists#}
|
||||
{% if head_version_exists %}
|
||||
<div id="tracked_tables">
|
||||
<h3>{% trans 'Tracked tables' %}</h3>
|
||||
|
||||
<form method="post" action="{{ url('/database/tracking') }}" name="trackedForm"
|
||||
id="trackedForm" class="ajax">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<table id="versions" class="table table-light table-striped table-hover w-auto">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% trans 'Table' %}</th>
|
||||
<th>{% trans 'Last version' %}</th>
|
||||
<th>{% trans 'Created' %}</th>
|
||||
<th>{% trans 'Updated' %}</th>
|
||||
<th>{% trans 'Status' %}</th>
|
||||
<th>{% trans 'Action' %}</th>
|
||||
<th>{% trans 'Show' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for version in versions %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="selected_tbl[]"
|
||||
class="checkall" id="selected_tbl_{{ version.table_name }}"
|
||||
value="{{ version.table_name }}">
|
||||
</td>
|
||||
<th>
|
||||
<label for="selected_tbl_{{ version.table_name }}">
|
||||
{{ version.table_name }}
|
||||
</label>
|
||||
</th>
|
||||
<td class="right">
|
||||
{{ version.version }}
|
||||
</td>
|
||||
<td>
|
||||
{{ version.date_created }}
|
||||
</td>
|
||||
<td>
|
||||
{{ version.date_updated }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="wrapper toggleAjax hide">
|
||||
<div class="toggleButton">
|
||||
<div title="{% trans 'Click to toggle' %}" class="toggle-container {{ version.tracking_active == 1 ? 'on' : 'off' }}">
|
||||
<img src="{{ theme_image_path }}toggle-{{ text_dir }}.png">
|
||||
<table class="pma-table nospacing nopadding">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="toggleOn">
|
||||
<span class="hide">
|
||||
{{- url('/table/tracking', {
|
||||
'db': version.db_name,
|
||||
'table': version.table_name,
|
||||
'version': version.version,
|
||||
'toggle_activation': 'activate_now',
|
||||
}) -}}
|
||||
</span>
|
||||
<div>{% trans 'active' %}</div>
|
||||
</td>
|
||||
<td><div> </div></td>
|
||||
<td class="toggleOff">
|
||||
<span class="hide">
|
||||
{{- url('/table/tracking', {
|
||||
'db': version.db_name,
|
||||
'table': version.table_name,
|
||||
'version': version.version,
|
||||
'toggle_activation': 'deactivate_now',
|
||||
}) -}}
|
||||
</span>
|
||||
<div>{% trans 'not active' %}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<span class="hide callback"></span>
|
||||
<span class="hide text_direction">{{ text_dir }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a class="delete_tracking_anchor ajax" href="{{ url('/database/tracking') }}" data-post="
|
||||
{{- get_common({
|
||||
'db': db,
|
||||
'goto': url('/table/tracking'),
|
||||
'back': url('/database/tracking'),
|
||||
'table': version.table_name,
|
||||
'delete_tracking': true
|
||||
}, '') }}">
|
||||
{{ get_icon('b_drop', 'Delete tracking'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('/table/tracking') }}" data-post="
|
||||
{{- get_common({
|
||||
'db': db,
|
||||
'goto': url('/table/tracking'),
|
||||
'back': url('/database/tracking'),
|
||||
'table': version.table_name
|
||||
}, '') }}">
|
||||
{{ get_icon('b_versions', 'Versions'|trans) }}
|
||||
</a>
|
||||
<a href="{{ url('/table/tracking') }}" data-post="
|
||||
{{- get_common({
|
||||
'db': db,
|
||||
'goto': url('/table/tracking'),
|
||||
'back': url('/database/tracking'),
|
||||
'table': version.table_name,
|
||||
'report': true,
|
||||
'version': version.version
|
||||
}, '') }}">
|
||||
{{ get_icon('b_report', 'Tracking report'|trans) }}
|
||||
</a>
|
||||
<a href="{{ url('/table/tracking') }}" data-post="
|
||||
{{- get_common({
|
||||
'db': db,
|
||||
'goto': url('/table/tracking'),
|
||||
'back': url('/database/tracking'),
|
||||
'table': version.table_name,
|
||||
'snapshot': true,
|
||||
'version': version.version
|
||||
}, '') }}">
|
||||
{{ get_icon('b_props', 'Structure snapshot'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% include 'select_all.twig' with {
|
||||
'theme_image_path': theme_image_path,
|
||||
'text_dir': text_dir,
|
||||
'form_name': 'trackedForm'
|
||||
} only %}
|
||||
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="delete_tracking"
|
||||
title="{% trans 'Delete tracking' %}">
|
||||
{{ get_icon('b_drop', 'Delete tracking'|trans) }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if untracked_tables_exists %}
|
||||
<h3>{% trans 'Untracked tables' %}</h3>
|
||||
<form method="post" action="{{ url('/database/tracking') }}" name="untrackedForm"
|
||||
id="untrackedForm" class="ajax">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<table id="noversions" class="table table-light table-striped table-hover w-auto">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% trans 'Table' %}</th>
|
||||
<th>{% trans 'Action' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for table_name in untracked_tables %}
|
||||
{% if get_tracker_version(db, table_name) == -1 %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="selected_tbl[]"
|
||||
class="checkall" id="selected_tbl_{{ table_name }}"
|
||||
value="{{ table_name }}">
|
||||
</td>
|
||||
<th>
|
||||
<label for="selected_tbl_{{ table_name }}">
|
||||
{{ table_name }}
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<a href="{{ url('/table/tracking', url_params|merge({
|
||||
'db': db,
|
||||
'table': table_name
|
||||
})) }}">
|
||||
{{ get_icon('eye', 'Track table'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% include 'select_all.twig' with {
|
||||
'theme_image_path': theme_image_path,
|
||||
'text_dir': text_dir,
|
||||
'form_name': 'untrackedForm'
|
||||
} only %}
|
||||
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="track" title="{% trans 'Track table' %}">
|
||||
{{ get_icon('eye', 'Track table'|trans) }}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
15
admin/phpMyAdmin/templates/database/triggers/footer.twig
Normal file
15
admin/phpMyAdmin/templates/database/triggers/footer.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
<fieldset class="left">
|
||||
<legend>{% trans %}New{% context %}Create new trigger{% endtrans %}</legend>
|
||||
<div class='wrap'>
|
||||
{% if has_privilege %}
|
||||
<a class="ajax add_anchor" href="{{ url('/database/triggers', {'db': db, 'table': table, 'add_item': true}) }}">
|
||||
{{ get_icon('b_trigger_add') }}
|
||||
{% trans 'Add trigger' %}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_trigger_add') }}
|
||||
{% trans 'Add trigger' %}
|
||||
{% endif %}
|
||||
{{ show_mysql_docu('CREATE_TRIGGER') }}
|
||||
</div>
|
||||
</fieldset>
|
50
admin/phpMyAdmin/templates/database/triggers/list.twig
Normal file
50
admin/phpMyAdmin/templates/database/triggers/list.twig
Normal file
|
@ -0,0 +1,50 @@
|
|||
<form id="rteListForm" class="ajax" action="{{ url(table is not empty ? '/table/triggers' : '/database/triggers') }}">
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
{% trans 'Triggers' %}
|
||||
{{ show_mysql_docu('TRIGGERS') }}
|
||||
</legend>
|
||||
|
||||
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
|
||||
{% trans 'There are no triggers to display.' %}
|
||||
</div>
|
||||
|
||||
<table id="triggersTable" class="table table-light table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% trans 'Name' %}</th>
|
||||
{% if table is empty %}
|
||||
<th>{% trans 'Table' %}</th>
|
||||
{% endif %}
|
||||
<th colspan="3">{% trans 'Action' %}</th>
|
||||
<th>{% trans 'Time' %}</th>
|
||||
<th>{% trans 'Event' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="hide">{% for i in 0..(table is empty ? 7 : 6) %}<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>
|
60
admin/phpMyAdmin/templates/database/triggers/row.twig
Normal file
60
admin/phpMyAdmin/templates/database/triggers/row.twig
Normal file
|
@ -0,0 +1,60 @@
|
|||
<tr{% if row_class is not empty %} class="{{ row_class }}"{% endif %}>
|
||||
<td>
|
||||
<input type="checkbox" class="checkall" name="item_name[]" value="{{ trigger.name }}">
|
||||
</td>
|
||||
<td>
|
||||
<span class='drop_sql hide'>{{ trigger.drop }}</span>
|
||||
<strong>{{ trigger.name }}</strong>
|
||||
</td>
|
||||
{% if table is empty %}
|
||||
<td>
|
||||
<a href="{{ url('/table/triggers', {'db': db, 'table': trigger.table}) }}">{{ trigger.table }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
{% if has_edit_privilege %}
|
||||
<a class="ajax edit_anchor" href="{{ url('/database/triggers', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'edit_item': true,
|
||||
'item_name': trigger.name
|
||||
}) }}">
|
||||
{{ get_icon('b_edit', 'Edit'|trans) }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_edit', 'Edit'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a class="ajax export_anchor" href="{{ url('/database/triggers', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'export_item': true,
|
||||
'item_name': trigger.name
|
||||
}) }}">
|
||||
{{ get_icon('b_export', 'Export'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if has_drop_privilege %}
|
||||
{{ link_or_button(
|
||||
url('/sql', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'sql_query': trigger.drop,
|
||||
'goto': url('/database/triggers', {'db': db})
|
||||
}),
|
||||
get_icon('b_drop', 'Drop'|trans),
|
||||
{'class': 'ajax drop_anchor'}
|
||||
) }}
|
||||
{% else %}
|
||||
{{ get_icon('bd_drop', 'Drop'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ trigger.action_timing }}
|
||||
</td>
|
||||
<td>
|
||||
{{ trigger.event_manipulation }}
|
||||
</td>
|
||||
</tr>
|
Loading…
Add table
Add a link
Reference in a new issue