Update website

This commit is contained in:
Guilhem Lavaux 2024-11-19 09:35:33 +01:00
parent bb4b0f9be8
commit 011b183e28
4263 changed files with 3014 additions and 720369 deletions

View file

@ -1,25 +0,0 @@
<form id="multi_edit_central_columns">
<div class="card">
<div class="card-header">{% trans 'Structure' %}</div>
<div class="card-body">
<table id="table_columns" class="table align-middle mb-0 noclick">
<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>
</div>
<div class="card-footer">
<input class="btn btn-primary" type="submit" name="save_multi_central_column_edit" value="{% trans 'Save' %}">
</div>
</div>
</form>

View file

@ -1,85 +0,0 @@
<tr>
<input name="orig_col_name[{{ row_num }}]" type="hidden" value="{{ row['col_name'] }}">
<td name="col_name" class="text-nowrap">
{% include 'columns_definitions/column_name.twig' with {
'column_number': row_num,
'ci': 0,
'ci_offset': 0,
'column_meta': {'Field': row['col_name']},
'has_central_columns_feature': false,
'max_rows': max_rows
} only %}
</td>
<td name="col_type" class="text-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="text-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="text-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="text-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="text-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="text-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="text-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>

View file

@ -1,385 +0,0 @@
{# 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 w-auto">
<thead>
<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="text-nowrap">
{% include 'columns_definitions/column_name.twig' with {
'column_number': 0,
'ci': 0,
'ci_offset': 0,
'column_meta': {},
'has_central_columns_feature': false,
'max_rows': max_rows,
} only %}
</td>
<td name="col_type" class="text-nowrap">
<select class="column_type" name="field_type[0]" id="field_0_1">
{{ get_supported_datatypes(true) }}
</select>
</td>
<td class="text-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="text-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="text-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="text-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="text-nowrap" name="col_isNull">
<input name="field_null[0]" id="field_0_6" type="checkbox" value="YES" class="allow_null">
</td>
<td class="text-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="{% trans 'Save' %}">
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
{% if total_rows <= 0 %}
<div class="alert alert-info" role="alert">
{% trans 'The central list of columns for the current database is empty' %}
</div>
{% 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="&lt">
</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="&gt">
</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">
<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-striped table-hover tablesorter w-auto">
{% set class = 'column_heading' %}
{% set title = 'Click to sort.' | trans %}
<thead>
<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="text-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="text-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']
},
'has_central_columns_feature': false,
'max_rows': max_rows
} only %}
</td>
<td name="col_type" class="text-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="text-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="text-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="text-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="text-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="text-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="text-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 {
'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 %}

View file

@ -1,3 +0,0 @@
{% for column in columns %}
<option value="{{ column }}">{{ column }}</option>
{% endfor %}

View file

@ -1,17 +0,0 @@
<form id="createTableMinimalForm" method="post" action="{{ url('/table/create') }}" class="card d-print-none lock-page">
{{ get_hidden_inputs(db) }}
<div class="card-header">{{ get_icon('b_table_add', 'Create new table'|trans, true) }}</div>
<div class="card-body row row-cols-lg-auto g-3">
<div class="col-12">
<label for="createTableNameInput" class="form-label">{% trans 'Table name' %}</label>
<input type="text" class="form-control" name="table" id="createTableNameInput" maxlength="64" required>
</div>
<div class="col-12">
<label for="createTableNumFieldsInput" class="form-label">{% trans 'Number of columns' %}</label>
<input type="number" class="form-control" name="num_fields" id="createTableNumFieldsInput" min="1" value="4" required>
</div>
<div class="col-12 align-self-lg-end">
<input class="btn btn-primary" type="submit" value="{% trans 'Create' %}">
</div>
</div>
</form>

View file

@ -1,126 +0,0 @@
<div class="container-fluid">
<h1>{{ database }}</h1>
{% if comment is not empty %}
<p>{% trans 'Database comment:' %} <em>{{ comment }}</em></p>
{% endif %}
<p class="d-print-none">
<button type="button" class="btn btn-secondary jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
</p>
<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="table table-striped align-middle">
<thead>
<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>
</thead>
<tbody>
{% for column in table.columns %}
<tr>
<td class="text-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="text-nowrap"' }}>
{{ column.print_type }}
</td>
<td>{{ column.is_nullable ? 'Yes'|trans : 'No'|trans }}</td>
<td class="text-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 %}
</tbody>
</table>
{% if table.indexes is not empty %}
<h3>{% trans 'Indexes' %}</h3>
<table class="table table-striped align-middle">
<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>
{% else %}
<p>{% trans 'No index defined!' %}</p>
{% endif %}
</div>
{% endfor %}
</div>
<p class="d-print-none">
<button type="button" class="btn btn-secondary jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
</p>
</div>

View file

@ -1,121 +0,0 @@
{% 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="table table-sm table-striped table-hover w-auto 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' : '&gt;' }}</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="{{ image('designer/exec_small.png') }}"
title="{% trans 'See table structure' %}">
</td>
<td id="id_zag_{{ t_n_url }}"
class="tab_zag text-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="text-nowrap">
{% set type = columns_type[t_n ~ '.' ~ tab_column[t_n]['COLUMN_NAME'][j]] %}
<img src="{{ image(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="{{ image('designer/exec_small.png') }}" title="{% trans 'Options' %}" />
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}

View file

@ -1,13 +0,0 @@
<form action="{{ url('/database/designer') }}" method="post" name="edit_delete_pages" id="edit_delete_pages" class="ajax">
{{ get_hidden_inputs(db) }}
<fieldset class="pma-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>

File diff suppressed because it is too large Load diff

View file

@ -1,36 +0,0 @@
<form action="{{ url('/database/designer') }}" method="post" name="save_as_pages" id="save_as_pages" class="ajax">
{{ get_hidden_inputs(db) }}
<fieldset class="pma-fieldset" id="page_save_as_options">
<table class="table table-borderless">
<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>

View file

@ -1,10 +0,0 @@
<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>

View file

@ -1,18 +0,0 @@
<form method="post" action="{{ url('/schema-export') }}" class="disableAjax" id="id_export_pages">
<fieldset class="pma-fieldset">
{{ get_hidden_inputs(db) }}
<label for="plugins">{% trans 'Select Export Relational Type' %}</label>
<select id="plugins" name="export_type">
{% for option in plugins_choice %}
<option value="{{ option.name }}"{{ option.is_selected ? ' selected' }}>{{ option.text }}</option>
{% endfor %}
</select>
{% for option in plugins_choice %}
<input type="hidden" id="force_file_{{ option.name }}" value="true">
{% endfor %}
<input type="hidden" name="page_number" value="{{ page }}">
{{ options|raw }}
</fieldset>
</form>

View file

@ -1,119 +0,0 @@
<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 %}
<div class="card">
<div class="card-header">
{% trans 'Details' %}
{% if mode != 'edit' %}
{{ show_mysql_docu('CREATE_EVENT') }}
{% endif %}
</div>
<div class="card-body">
<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="fw-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="text-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="text-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="text-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>
</div>
{% if is_ajax %}
<input type="hidden" name="editor_process_{{ mode }}" value="true">
<input type="hidden" name="ajax_request" value="true">
{% else %}
<div class="card-footer">
<input class="btn btn-primary" type="submit" name="editor_process_{{ mode }}" value="{% trans 'Go' %}">
</div>
{% endif %}
</div>
</form>

View file

@ -1,154 +0,0 @@
<div class="container-fluid my-3">
<h2>
{{ get_icon('b_events', 'Events'|trans) }}
{{ show_mysql_docu('EVENTS') }}
</h2>
<div class="d-flex flex-wrap my-3">
<div>
<div class="input-group">
<div class="input-group-text">
<div class="form-check mb-0">
<input class="form-check-input checkall_box" type="checkbox" value="" id="checkAllCheckbox" form="rteListForm">
<label class="form-check-label" for="checkAllCheckbox">{% trans 'Check all' %}</label>
</div>
</div>
<button class="btn btn-outline-secondary" id="bulkActionExportButton" type="submit" name="submit_mult" value="export" form="rteListForm" title="{% trans 'Export' %}">
{{ get_icon('b_export', 'Export'|trans) }}
</button>
<button class="btn btn-outline-secondary" id="bulkActionDropButton" type="submit" name="submit_mult" value="drop" form="rteListForm" title="{% trans 'Drop' %}">
{{ get_icon('b_drop', 'Drop'|trans) }}
</button>
</div>
</div>
<div class="ms-auto">
<a class="ajax add_anchor btn btn-primary{{ not has_privilege ? ' disabled' }}" href="{{ url('/database/events', {'db': db, 'add_item': true}) }}" role="button"{{ not has_privilege ? ' tabindex="-1" aria-disabled="true"' }}>
{{ get_icon('b_event_add', 'Create new event'|trans) }}
</a>
</div>
</div>
<form id="rteListForm" class="ajax" action="{{ url('/database/events') }}">
{{ get_hidden_inputs(db) }}
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
{% trans 'There are no events to display.' %}
</div>
<table id="eventsTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">
<thead>
<tr>
<th></th>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Status' %}</th>
<th>{% trans 'Type' %}</th>
<th colspan="3"></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>
{{ event.type }}
</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>
</tr>
{% endfor %}
</tbody>
</table>
</form>
<div class="card mt-3">
<div class="card-header">{% trans 'Event scheduler status' %}</div>
<div class="card-body">
<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="{{ image('toggle-' ~ text_dir ~ '.png') }}">
<table>
<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>&nbsp;</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>
</div>
</div>
</div>

View file

@ -1,56 +0,0 @@
<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>
{{ event.type }}
</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>
</tr>

View file

@ -1,62 +0,0 @@
{% 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="card mb-3" id="databases_and_tables">
<div class="card-header">{% trans 'Tables:' %}</div>
<div class="card-body" style="overflow-y: scroll; max-height: 20em;">
<input type="hidden" name="structure_or_data_forced" value="{{ structure_or_data_forced }}">
<table class="table table-sm table-striped table-hover export_table_select">
<thead>
<tr>
<th></th>
<th>{% trans 'Tables' %}</th>
<th class="export_structure text-center">{% trans 'Structure' %}</th>
<th class="export_data text-center">{% trans 'Data' %}</th>
</tr>
<tr>
<td></td>
<td class="align-middle">{% trans 'Select all' %}</td>
<td class="export_structure text-center">
<input type="checkbox" id="table_structure_all" aria-label="{% trans 'Export the structure of all tables.' %}">
</td>
<td class="export_data text-center">
<input type="checkbox" id="table_data_all" aria-label="{% trans 'Export the data of all tables.' %}">
</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="align-middle text-nowrap">{{ each_table.name }}</td>
<td class="export_structure text-center">
<input type="checkbox" name="table_structure[]" value="{{ each_table.name }}"{{ each_table.is_checked_structure ? ' checked' }}>
</td>
<td class="export_data text-center">
<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 %}

View file

@ -1,3 +0,0 @@
{% extends 'import.twig' %}
{% block title %}{{ 'Importing into the database "%s"'|trans|format(db) }}{% endblock %}

View file

@ -1,179 +0,0 @@
<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 class="mb-3">
<button class="btn btn-sm btn-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#queryWindow" aria-expanded="true" aria-controls="queryWindow">
{% trans 'Query window' %}
</button>
</div>
<div class="collapse show mb-3" id="queryWindow">
<form action="" id="multi_table_query_form" class="multi_table_query_form query_form">
<input type="hidden" id="db_name" value="{{ db }}">
<fieldset class="pma-fieldset">
{% for table in tables %}
<div class="d-none" 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="d-none" id="new_column_layout">{% endif %}
<fieldset class="pma-fieldset column_details query-form__fieldset--inline position-relative">
<select class="tableNameSelect query-form__select--inline">
<option value="">{% trans 'select table' %}</option>
{% for keyTableName, table in tables %}
<option data-hash="{{ table.hash }}" value="{{ keyTableName }}">{{ keyTableName }}</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">
<button class="btn btn-link p-0 jsCriteriaButton" type="button" data-bs-toggle="collapse" data-bs-target="#criteriaOptions{{ id }}" aria-expanded="false" aria-controls="criteriaOptions{{ id }}">
{% trans 'criteria' %}
</button>
<div class="collapse jsCriteriaOptions" id="criteriaOptions{{ id }}">
<div>
<table class="table table-sm table-borderless align-middle w-auto">
<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=">">&gt;</option>
<option value=">=">&gt;=</option>
<option value="<">&lt;</option>
<option value="<=">&lt;=</option>
<option value="!=">!=</option>
<option value="LIKE">LIKE</option>
<option value="LIKE %...%">LIKE %...%</option>
<option value="NOT LIKE">NOT 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 keyTableName, table in tables %}
<option data-hash="{{ table.hash }}" value="{{ keyTableName }}">{{ keyTableName }}</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>
<button type="button" class="btn-close position-absolute top-0 end-0 jsRemoveColumn" aria-label="{% trans 'Remove this column' %}"></button>
</fieldset>
{% if id == 0 %}</div>{% endif %}
{% endfor %}
<fieldset class="pma-fieldset query-form__fieldset--inline">
<input class="btn btn-secondary" type="button" value="{% trans '+ Add column' %}" id="add_column_button">
</fieldset>
<fieldset class="pma-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="pma-fieldset 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>

View file

@ -1,230 +0,0 @@
<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="row g-3">
<div class="col-auto">
<label class="visually-hidden" 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-end">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</div>
</div>
</form>
{% endif %}
<form id="createTableMinimalForm" method="post" action="{{ url('/table/create') }}" class="card mb-2 lock-page">
{{ get_hidden_inputs(db) }}
<div class="card-header">{{ get_icon('b_table_add', 'Create new table'|trans, true) }}</div>
<div class="card-body row row-cols-lg-auto g-3">
<div class="col-md-6">
<label for="createTableNameInput" class="form-label">{% trans 'Table name' %}</label>
<input type="text" class="form-control" name="table" id="createTableNameInput" maxlength="64" required>
</div>
<div class="col-md-6">
<label for="createTableNumFieldsInput" class="form-label">{% trans 'Number of columns' %}</label>
<input type="number" class="form-control" name="num_fields" id="createTableNumFieldsInput" min="1" value="4" required>
</div>
</div>
<div class="card-footer text-end">
<input class="btn btn-primary" type="submit" value="{% trans 'Create' %}">
</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="mb-3 row g-3">
<div class="col-auto">
<label class="visually-hidden" 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-end">
<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="mb-3 row g-3">
<div class="col-auto">
<label class="visually-hidden" for="renameDbNameInput">{% trans 'Database name' %}</label>
<input class="form-control textfield" id="renameDbNameInput" type="text" maxlength="64" name="newname" required>
</div>
</div>
<div class="mb-3">
<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-end">
<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="mb-3 row g-3">
<div class="col-auto">
<label class="visually-hidden" for="select_db_collation">{% trans 'Collation' %}</label>
<select class="form-select" 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-end">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</div>
</div>
</form>
</div>

View file

@ -1,141 +0,0 @@
{% if is_superuser %}
<form id="usersForm" action="{{ url('/server/privileges') }}">
{{ get_hidden_inputs(db) }}
<div class="w-100">
<fieldset class="pma-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-striped table-hover w-auto">
<thead>
<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 ~ '&amp;#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="float-start">
<img class="selectallarrow" src="{{ image('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 class="pma-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 %}

View file

@ -1,11 +0,0 @@
<td class="text-center">
<select name="criteriaColumn[{{ column_number }}]" size="1">
<option value="">&nbsp;</option>
{% for column in column_names %}
<option value="{{ column }}"
{%- if column is same as(selected) %} selected="selected"{% endif %}>
{{- column -}}
</option>
{% endfor %}
</select>
</td>

View file

@ -1,23 +0,0 @@
<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 }}

View file

@ -1,28 +0,0 @@
<td class="value text-nowrap">
<table class="table table-borderless table-sm">
<tr>
<td class="value text-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 text-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>

View file

@ -1,118 +0,0 @@
<form action="{{ url('/database/qbe') }}" method="post" id="formQBE" class="lock-page">
{{ get_hidden_inputs(url_params) }}
<div class="w-100">
<fieldset class="pma-fieldset">
{{ saved_searches_field|raw }}
<div class="table-responsive jsresponsive">
<table class="table table-borderless table-sm w-auto">
<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="pma-fieldset tblFooters">
<div class="float-start">
<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="float-start">
<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="float-start">
<input class="btn btn-secondary" type="submit" name="modify" value="{% trans 'Update query' %}">
</div>
</fieldset>
<div class="float-start w-100">
<fieldset class="pma-fieldset">
<legend>{% trans 'Use tables' %}</legend>
<select class="resize-vertical" 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="pma-fieldset 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="float-start w-50">
<fieldset class="pma-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="pma-fieldset tblFooters" id="tblQbeFooters">
<input class="btn btn-primary" type="submit" value="{% trans 'Submit query' %}">
</fieldset>
</div>
</form>

View file

@ -1,10 +0,0 @@
<td class="text-center">
<select name="criteriaSortOrder[{{ column_number }}]">
<option value="1000">&nbsp;</option>
{% for i in 1..total_column_count %}
<option value="{{ i }}"{{ i == sort_order ? ' selected="selected"' }}>
{{ i }}
</option>
{% endfor %}
</select>
</td>

View file

@ -1,9 +0,0 @@
<td class="text-center">
<select style="width:{{ real_width }}" name="criteriaSort[{{ column_number }}]" size="1">
<option value="">&nbsp;</option>
<option value="ASC"
{{- selected == 'ASC' ? ' selected="selected"' }}>{% trans 'Ascending' %}</option>
<option value="DESC"
{{- selected == 'DESC' ? ' selected="selected"' }}>{% trans 'Descending' %}</option>
</select>
</td>

View file

@ -1,184 +0,0 @@
<form class="rte_form{{ not is_ajax ? ' disableAjax' }}" action="{{ url('/database/routines') }}" method="post">
<input name="{{ is_edit_mode ? 'edit_item' : 'add_item' }}" type="hidden" value="1">
{% if is_edit_mode %}
<input name="item_original_name" type="hidden" value="{{ routine.item_original_name }}">
<input name="item_original_type" type="hidden" value="{{ routine.item_original_type }}">
{% endif %}
{{ get_hidden_inputs(db) }}
<div class="card">
<div class="card-header">
{% trans 'Details' %}
{% if not is_edit_mode %}
{{ show_mysql_docu('CREATE_PROCEDURE') }}
{% endif %}
</div>
<div class="card-body">
<table class="rte_table table table-borderless table-sm">
<tr>
<td>{% trans 'Routine name' %}</td>
<td>
<input type="text" name="item_name" maxlength="64" value="{{ routine.item_name }}">
</td>
</tr>
<tr>
<td>{% trans 'Type' %}</td>
<td>
{% if is_ajax %}
<select name="item_type">
<option value="PROCEDURE"{{ routine.item_type == 'PROCEDURE' ? ' selected' }}>PROCEDURE</option>
<option value="FUNCTION"{{ routine.item_type == 'FUNCTION' ? ' selected' }}>FUNCTION</option>
</select>
{% else %}
<input name="item_type" type="hidden" value="{{ routine.item_type }}">
<div class="fw-bold text-center w-50">
{{ routine['item_type'] }}
</div>
<input type="submit" class="btn btn-secondary" name="routine_changetype" value="{{ 'Change to %s'|trans|format(routine.item_type_toggle) }}">
{% endif %}
</td>
</tr>
<tr>
<td>{% trans 'Parameters' %}</td>
<td>
<table class="routine_params_table table table-borderless table-sm">
<thead>
<tr>
<td></td>
<th class="routine_direction_cell{{ routine.item_type == 'FUNCTION' ? ' hide' }}">{% trans 'Direction' %}</th>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Type' %}</th>
<th>{% trans 'Length/Values' %}</th>
<th colspan="2">{% trans 'Options' %}</th>
<th class="routine_param_remove hide"></th>
</tr>
</thead>
<tbody>
{{ parameter_rows|raw }}
</tbody>
</table>
</td>
</tr>
<tr>
<td></td>
<td>
{% if is_ajax %}
<button type="button" class="btn btn-primary" id="addRoutineParameterButton">{% trans 'Add parameter' %}</button>
{% else %}
<input type="submit" class="btn btn-primary" name="routine_addparameter" value="{% trans 'Add parameter' %}">
<input type="submit" class="btn btn-secondary" name="routine_removeparameter" value="{% trans 'Remove last parameter' %}"{{ not routine.item_num_params ? ' disabled' }}>
{% endif %}
</td>
</tr>
<tr class="routine_return_row{{ routine.item_type == 'PROCEDURE' ? ' hide' }}">
<td>{% trans 'Return type' %}</td>
<td>
<select name="item_returntype">
{{ get_supported_datatypes(true, routine.item_returntype) }}
</select>
</td>
</tr>
<tr class="routine_return_row{{ routine.item_type == 'PROCEDURE' ? ' hide' }}">
<td>{% trans 'Return length/values' %}</td>
<td>
<input type="text" name="item_returnlength" value="{{ routine.item_returnlength }}">
</td>
<td class="hide no_len">---</td>
</tr>
<tr class="routine_return_row{{ routine.item_type == 'PROCEDURE' ? ' hide' }}">
<td>{% trans 'Return options' %}</td>
<td>
<div>
<select lang="en" dir="ltr" name="item_returnopts_text">
<option value="">{% trans 'Charset' %}</option>
<option value=""></option>
{% for charset in charsets %}
<option value="{{ charset.getName() }}" title="{{ charset.getDescription() }}"{{ routine.item_returnopts_text == charset.getName() ? ' selected' }}>{{ charset.getName() }}</option>
{% endfor %}
</select>
</div>
<div>
<select name="item_returnopts_num">
<option value=""></option>
{% for numeric_option in numeric_options %}
<option value="{{ numeric_option }}"{{ routine.item_returnopts_num == numeric_option ? ' selected' }}>{{ numeric_option }}</option>
{% endfor %}
</select>
</div>
<div class="hide no_opts">---</div>
</td>
</tr>
<tr>
<td>{% trans 'Definition' %}</td>
<td>
<textarea name="item_definition" rows="15" cols="40">{{ routine.item_definition }}</textarea>
</td>
</tr>
<tr>
<td>{% trans 'Is deterministic' %}</td>
<td>
<input type="checkbox" name="item_isdeterministic"{{ routine.item_isdeterministic|raw }}>
</td>
</tr>
{% if is_edit_mode %}
<tr>
<td>
{% trans 'Adjust privileges' %}
{{ show_docu('faq', 'faq6-39') }}
</td>
<td>
{% if has_privileges %}
<input type="checkbox" name="item_adjust_privileges" value="1" checked>
{% else %}
<input type="checkbox" name="item_adjust_privileges" value="1" title="{% trans 'You do not have sufficient privileges to perform this operation; Please refer to the documentation for more details.' %}" disabled>
{% endif %}
</td>
</tr>
{% endif %}
<tr>
<td>{% trans 'Definer' %}</td>
<td>
<input type="text" name="item_definer" value="{{ routine.item_definer }}">
</td>
</tr>
<tr>
<td>{% trans 'Security type' %}</td>
<td>
<select name="item_securitytype">
<option value="DEFINER"{{ routine.item_securitytype_definer|raw }}>DEFINER</option>
<option value="INVOKER"{{ routine.item_securitytype_invoker|raw }}>INVOKER</option>
</select>
</td>
</tr>
<tr>
<td>{% trans 'SQL data access' %}</td>
<td>
<select name="item_sqldataaccess">
{% for value in sql_data_access %}
<option value="{{ value }}"{{ routine.item_sqldataaccess == value ? ' selected' }}>{{ value }}</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<td>{% trans 'Comment' %}</td>
<td>
<input type="text" name="item_comment" maxlength="64" value="{{ routine.item_comment }}">
</td>
</tr>
</table>
</div>
{% if is_ajax %}
<input type="hidden" name="{{ is_edit_mode ? 'editor_process_edit' : 'editor_process_add' }}" value="true">
<input type="hidden" name="ajax_request" value="true">
{% else %}
<div class="card-footer">
<input class="btn btn-primary" type="submit" name="{{ is_edit_mode ? 'editor_process_edit' : 'editor_process_add' }}" value="{% trans 'Go' %}">
</div>
{% endif %}
</div>
</form>

View file

@ -1,62 +0,0 @@
<form action="{{ url('/database/routines') }}" method="post" class="rte_form ajax" onsubmit="return false">
<input type="hidden" name="item_name" value="{{ routine['item_name'] }}">
<input type="hidden" name="item_type" value="{{ routine['item_type'] }}">
{{ get_hidden_inputs(db) }}
<div class="card">
<div class="card-header">{{ ajax ? 'Routine parameters'|trans : routine['item_name'] }}</div>
<div class="card-body">
<table class="table w-auto rte_table{{ not ajax ? ' caption-top' }}">
{% if not ajax %}
<caption class="tblHeaders">{% trans 'Routine parameters' %}</caption>
{% endif %}
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Type' %}</th>
{% if show_function_fields %}
<th>{% trans 'Function' %}</th>
{% endif %}
<th>{% trans 'Value' %}</th>
</tr>
{% for i in 0..routine['item_num_params'] - 1 %}
<tr>
<td>{{ routine['item_param_name'][loop.index0] }}</td>
<td>{{ routine['item_param_type'][loop.index0] }}</td>
{% if show_function_fields %}
<td>
{% if params[loop.index0]['generator'] is not null %}
<select name="funcs[{{ routine['item_param_name'][loop.index0] }}]">
{{ params[loop.index0]['generator']|raw }}</select>
{% else %}
--
{% endif %}
</td>
{% endif %}
<td class="nowrap">
{% if routine['item_param_type'][loop.index0] in ['ENUM', 'SET'] %}
{% for value in routine['item_param_length_arr'][loop.index0] %}
<input name="params[{{ routine['item_param_name'][loop.parent.loop.index0] }}][]" value="{{ params[loop.parent.loop.index0]['htmlentities'][loop.index0] }}" type="{{ params[loop.parent.loop.index0]['input_type'] }}">
{{ params[loop.parent.loop.index0]['htmlentities'][loop.index0] }}
<br>
{% endfor %}
{% elseif routine['item_param_type'][loop.index0]|lower in params['no_support_types'] %}
{% else %}
<input class="{{ params[loop.index0]['class'] }}" type="text" name="params[{{ routine['item_param_name'][loop.index0] }}]">
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% if not ajax %}
<div class="card-footer">
<input class="btn btn-primary" type="submit" name="execute_routine" value="{% trans 'Go' %}">
</div>
{% else %}
<input type="hidden" name="execute_routine" value="true">
<input type="hidden" name="ajax_request" value="true">
{% endif %}
</div>
</form>

View file

@ -1,62 +0,0 @@
<div class="container-fluid my-3">
<h2>
{{ get_icon('b_routines', 'Routines'|trans) }}
{{ show_mysql_docu('STORED_ROUTINES') }}
</h2>
<div class="d-flex flex-wrap my-3">
<div>
<div class="input-group">
<div class="input-group-text">
<div class="form-check mb-0">
<input class="form-check-input checkall_box" type="checkbox" value="" id="checkAllCheckbox" form="rteListForm">
<label class="form-check-label" for="checkAllCheckbox">{% trans 'Check all' %}</label>
</div>
</div>
<button class="btn btn-outline-secondary" id="bulkActionExportButton" type="submit" name="submit_mult" value="export" form="rteListForm" title="{% trans 'Export' %}">
{{ get_icon('b_export', 'Export'|trans) }}
</button>
<button class="btn btn-outline-secondary" id="bulkActionDropButton" type="submit" name="submit_mult" value="drop" form="rteListForm" title="{% trans 'Drop' %}">
{{ get_icon('b_drop', 'Drop'|trans) }}
</button>
</div>
</div>
<div class="ms-auto">
<div class="input-group">
<span class="input-group-text">{{ get_image('b_search', 'Search'|trans) }}</span>
<input class="form-control" name="filterText" type="text" id="filterText" value="" placeholder="{% trans 'Search' %}" aria-label="{% trans 'Search' %}">
</div>
</div>
<div class="ms-2">
<a class="ajax add_anchor btn btn-primary{{ not has_privilege ? ' disabled' }}" href="{{ url('/database/routines', {'db': db, 'table': table, 'add_item': true}) }}" role="button"{{ not has_privilege ? ' tabindex="-1" aria-disabled="true"' }}>
{{ get_icon('b_routine_add', 'Create new routine'|trans) }}
</a>
</div>
</div>
<form id="rteListForm" class="ajax" action="{{ url('/database/routines') }}">
{{ get_hidden_inputs(db, table) }}
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
{% trans 'There are no routines to display.' %}
</div>
<table id="routinesTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} data w-auto">
<thead>
<tr>
<th></th>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Type' %}</th>
<th>{% trans 'Returns' %}</th>
<th colspan="4"></th>
</tr>
</thead>
<tbody>
<tr class="hide">{% for i in 0..7 %}<td></td>{% endfor %}</tr>
{{ rows|raw }}
</tbody>
</table>
</form>
</div>

View file

@ -1,54 +0,0 @@
<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>

View file

@ -1,83 +0,0 @@
<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>
{{ routine.type }}
</td>
<td dir="ltr">
{{ routine.returns }}
</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>
</tr>

View file

@ -1,95 +0,0 @@
<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 class="pma-fieldset">
<legend>{% trans 'Search in database' %}</legend>
<p>
<label for="criteriaSearchString" class="d-block">
{% 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 class="pma-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 class="pma-fieldset">
<legend>{% trans 'Inside tables:' %}</legend>
<p>
<a href="#" id="select_all">
{% trans 'Select all' %}
</a> /
<a href="#" id="unselect_all">
{% trans 'Unselect all' %}
</a>
</p>
<select class="resize-vertical" id="criteriaTables" 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="d-block">
{% 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="pma-fieldset 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>

View file

@ -1,62 +0,0 @@
<table class="table table-striped caption-top w-auto">
<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 %}

View file

@ -1,15 +0,0 @@
<form id="ajax_form" action="{{ url('/database/structure/add-prefix-table') }}" method="post">
{{ get_hidden_inputs(url_params) }}
<fieldset class="pma-fieldset input">
<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>

View file

@ -1,93 +0,0 @@
<tfoot id="tbl_summary_row">
<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_replica_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 font-monospace text-end">{{ 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 font-monospace text-end">{{ 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 font-monospace text-end">{{ 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 font-monospace text-end">
{{ create_time_all }}
</th>
{% endif %}
{% if show_last_update %}
<th class="value tbl_last_update font-monospace text-end">
{{ update_time_all }}
</th>
{% endif %}
{% if show_last_check %}
<th class="value tbl_last_check font-monospace text-end">
{{ check_time_all }}
</th>
{% endif %}
</tr>
</tfoot>

View file

@ -1,16 +0,0 @@
<div class="modal fade" id="bulkActionModal" data-bs-backdrop="static" data-bs-keyboard="false"
tabindex="-1" aria-labelledby="bulkActionLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="bulkActionLabel"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Cancel' %}"></button>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans 'Cancel' %}</button>
<button type="button" class="btn btn-primary" id="bulkActionContinue">{% trans 'Continue' %}</button>
</div>
</div>
</div>
</div>

View file

@ -1,20 +0,0 @@
<form id="ajax_form" action="{{ url(route) }}" method="post">
{{ get_hidden_inputs(url_params) }}
<fieldset class="pma-fieldset input">
<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>

View file

@ -1,61 +0,0 @@
<div class="clearfloat d-print-none">
<img class="selectallarrow" src="{{ image('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>
{% if central_columns_work is defined and central_columns_work %}
<div class="modal fade" id="makeConsistentWithCentralListModal" data-bs-backdrop="static" data-bs-keyboard="false"
tabindex="-1" aria-labelledby="makeConsistentWithCentralListModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="makeConsistentWithCentralListModalLabel">{% trans 'Are you sure?' %}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Cancel' %}"></button>
</div>
<div class="modal-body">
{{ 'This action may change some of the columns definition.[br]Are you sure you want to continue?'|trans|sanitize }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans 'Cancel' %}</button>
<button type="button" class="btn btn-primary" id="makeConsistentWithCentralListContinue">{% trans 'Continue' %}</button>
</div>
</div>
</div>
</div>
{% endif %}

View file

@ -1 +0,0 @@
<dfn title="{{ valueTitle }}">{{ value }}</dfn>

View file

@ -1,54 +0,0 @@
<form id="ajax_form" action="{{ url('/database/structure/copy-table') }}" method="post">
{{ get_hidden_inputs(url_params) }}
<fieldset class="pma-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>

View file

@ -1,23 +0,0 @@
<form action="{{ url('/database/structure/drop-table') }}" method="post">
{{ get_hidden_inputs(url_params) }}
<fieldset class="pma-fieldset confirmation">
<legend>
{% trans 'Do you really want to execute the following query?' %}
</legend>
<code>{{ full_query|raw }}</code>
</fieldset>
<fieldset class="pma-fieldset tblFooters">
<div id="foreignkeychk" class="float-start">
<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="float-end">
<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>

View file

@ -1,23 +0,0 @@
<form action="{{ url('/database/structure/empty-table') }}" class="disableAjax" method="post">
{{ get_hidden_inputs(url_params) }}
<fieldset class="pma-fieldset confirmation">
<legend>
{% trans 'Do you really want to execute the following query?' %}
</legend>
<code>{{ full_query|raw }}</code>
</fieldset>
<fieldset class="pma-fieldset tblFooters">
<div id="foreignkeychk" class="float-start">
<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="float-end">
<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>

View file

@ -1,7 +0,0 @@
<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>

View file

@ -1,30 +0,0 @@
{% for flash_key, flash_messages in flash() %}
{% for flash_message in flash_messages %}
<div class="alert alert-{{ flash_key }}" role="alert">
{{ flash_message }}
</div>
{% endfor %}
{% endfor %}
{% if has_tables %}
<div id="tableslistcontainer">
{{ list_navigator_html|raw }}
{{ table_list_html|raw }}
{{ list_navigator_html|raw }}
</div>
<hr>
<p class="d-print-none">
<button type="button" class="btn btn-link p-0 jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
<a href="{{ url('/database/data-dictionary', {'db': database, 'goto': url('/database/structure')}) }}">
{{ 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 %}

View file

@ -1,4 +0,0 @@
<a href="{{ url('/table/structure', table_url_params) }}#showusage" id="overhead">
<span>{{ formatted_overhead }}</span>&nbsp;
<span class="unit">{{ overhead_unit }}</span>
</a>

View file

@ -1,47 +0,0 @@
<div class="show_create_results">
<h2>{% trans 'Showing create queries' %}</h2>
{% if tables.tables is not empty %}
<fieldset class="pma-fieldset">
<legend>{% trans 'Tables' %}</legend>
<table class="table table-striped 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|raw }}</strong></td>
<td>{{ table.show_create|raw }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</fieldset>
{% endif %}
{% if tables.views is not empty %}
<fieldset class="pma-fieldset">
<legend>{% trans 'Views' %}</legend>
<table class="table table-striped 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>

View file

@ -1,226 +0,0 @@
<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_replica_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 font-monospace text-end"
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="text-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="text-nowrap">
{{ collation|raw }}
</td>
{% endif %}
{% endif %}
{% if is_show_stats %}
<td class="value tbl_size font-monospace text-end">
<a href="{{ url('/table/structure', table_url_params) }}#showusage">
<span>{{ formatted_size }}</span>&nbsp;<span class="unit">{{ unit }}</span>
</a>
</td>
<td class="value tbl_overhead font-monospace text-end">
{{ overhead|raw }}
</td>
{% endif %}
{% if not (show_charset > 1) %}
{% if charset|length > 0 %}
<td class="text-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 font-monospace text-end">
{{ create_time }}
</td>
{% endif %}
{% if show_last_update %}
<td class="value tbl_last_update font-monospace text-end">
{{ update_time }}
</td>
{% endif %}
{% if show_last_check %}
<td class="value tbl_last_check font-monospace text-end">
{{ check_time }}
</td>
{% endif %}
{% elseif table_is_view %}
<td class="value tbl_rows font-monospace text-end">-</td>
<td class="text-nowrap">
{% trans 'View' %}
</td>
<td class="text-nowrap">---</td>
{% if is_show_stats %}
<td class="value tbl_size font-monospace text-end">-</td>
<td class="value tbl_overhead font-monospace text-end">-</td>
{% endif %}
{% if show_charset %}
<td></td>
{% endif %}
{% if show_comment %}
<td></td>
{% endif %}
{% if show_creation %}
<td class="value tbl_creation font-monospace text-end">-</td>
{% endif %}
{% if show_last_update %}
<td class="value tbl_last_update font-monospace text-end">-</td>
{% endif %}
{% if show_last_check %}
<td class="value tbl_last_check font-monospace text-end">-</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>

View file

@ -1,81 +0,0 @@
<form method="post" action="{{ url('/database/structure') }}" name="tablesForm" id="tablesForm">
{{ get_hidden_inputs(db) }}
<div class="table-responsive">
<table class="table table-striped table-hover table-sm w-auto data">
<thead>
<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>
{% if check_all_tables %}
{% include 'database/structure/bulk_action_modal.twig' with check_all_tables only %}
{% endif %}

View file

@ -1,7 +0,0 @@
<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>

View file

@ -1,192 +0,0 @@
{# 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-striped table-hover w-auto">
<thead>
<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="text-end">
{{ 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="{{ image('toggle-' ~ text_dir ~ '.png') }}">
<table>
<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>&nbsp;</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
}, '', false) }}">
{{ 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
}, '', false) }}">
{{ 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
}, '', false) }}">
{{ 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
}, '', false) }}">
{{ get_icon('b_props', 'Structure snapshot'|trans) }}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% include 'select_all.twig' with {
'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-striped table-hover w-auto">
<thead>
<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 {
'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 %}

View file

@ -1,73 +0,0 @@
<form class="rte_form" action="{{ url('/database/triggers') }}" method="post">
{{ get_hidden_inputs(db, table) }}
<input name="{{ is_edit ? 'edit_item' : 'add_item' }}" type="hidden" value="1">
{% if is_edit %}
<input name="item_original_name" type="hidden" value="{{ item.item_original_name }}">
{% endif %}
{% if is_ajax %}
<input type="hidden" name="{{ is_edit ? 'editor_process_edit' : 'editor_process_add' }}" value="true">
<input type="hidden" name="ajax_request" value="true">
{% endif %}
<div class="card">
<div class="card-header">
{% trans 'Details' %}
{% if not is_edit %}
{{ show_mysql_docu('CREATE_TRIGGER') }}
{% endif %}
</div>
<div class="card-body">
<table class="rte_table table table-borderless table-sm">
<tr>
<td>{% trans 'Trigger name' %}</td>
<td><input type="text" name="item_name" maxlength="64" value="{{ item.item_name }}"></td>
</tr>
<tr>
<td>{% trans 'Table' %}</td>
<td>
<select name="item_table">
{% for item_table in tables %}
<option value="{{ item_table }}"{{ (is_edit and item_table == item.item_table) or (not is_edit and item_table == table) ? ' selected' }}>{{ item_table }}</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<td>{% trans %}Time{% context %}Trigger action time{% endtrans %}</td>
<td>
<select name="item_timing">
{% for item_time in time %}
<option value="{{ item_time }}"{{ item.item_action_timing == item_time ? ' selected' }}>{{ item_time }}</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<td>{% trans 'Event' %}</td>
<td>
<select name="item_event">
{% for event in events %}
<option value="{{ event }}"{{ item.item_event_manipulation == event ? ' selected' }}>{{ event }}</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<td>{% trans 'Definition' %}</td>
<td><textarea name="item_definition" rows="15" cols="40">{{ item.item_definition }}</textarea></td>
</tr>
<tr>
<td>{% trans 'Definer' %}</td>
<td><input type="text" name="item_definer" value="{{ item.item_definer }}"></td>
</tr>
</table>
</div>
{% if not is_ajax %}
<div class="card-footer">
<input class="btn btn-primary" type="submit" name="{{ is_edit ? 'editor_process_edit' : 'editor_process_add' }}" value="{% trans 'Go' %}">
</div>
{% endif %}
</div>
</form>

View file

@ -1,9 +0,0 @@
<div class="container">
<h2>{{ 'Export of trigger %s'|trans|format(backquote(item_name)) }}</h2>
<div class="card">
<div class="card-body">
<textarea rows="15" class="form-control">{{ data|trim }}</textarea>
</div>
</div>
</div>

View file

@ -1,59 +0,0 @@
<div class="container-fluid my-3">
<h2>
{{ get_icon('b_triggers', 'Triggers'|trans) }}
{{ show_mysql_docu('TRIGGERS') }}
</h2>
<div class="d-flex flex-wrap my-3">
<div>
<div class="input-group">
<div class="input-group-text">
<div class="form-check mb-0">
<input class="form-check-input checkall_box" type="checkbox" value="" id="checkAllCheckbox" form="rteListForm">
<label class="form-check-label" for="checkAllCheckbox">{% trans 'Check all' %}</label>
</div>
</div>
<button class="btn btn-outline-secondary" id="bulkActionExportButton" type="submit" name="submit_mult" value="export" form="rteListForm" title="{% trans 'Export' %}">
{{ get_icon('b_export', 'Export'|trans) }}
</button>
<button class="btn btn-outline-secondary" id="bulkActionDropButton" type="submit" name="submit_mult" value="drop" form="rteListForm" title="{% trans 'Drop' %}">
{{ get_icon('b_drop', 'Drop'|trans) }}
</button>
</div>
</div>
<div class="ms-auto">
<a class="ajax add_anchor btn btn-primary{{ not has_privilege ? ' disabled' }}" href="{{ url('/database/triggers', {'db': db, 'table': table, 'add_item': true}) }}" role="button"{{ not has_privilege ? ' tabindex="-1" aria-disabled="true"' }}>
{{ get_icon('b_trigger_add', 'Create new trigger'|trans) }}
</a>
</div>
</div>
<form id="rteListForm" class="ajax" action="{{ url(table is not empty ? '/table/triggers' : '/database/triggers') }}">
{{ get_hidden_inputs(db, table) }}
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
{% trans 'There are no triggers to display.' %}
</div>
<table id="triggersTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">
<thead>
<tr>
<th></th>
<th>{% trans 'Name' %}</th>
{% if table is empty %}
<th>{% trans 'Table' %}</th>
{% endif %}
<th>{% trans 'Time' %}</th>
<th>{% trans 'Event' %}</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<tr class="hide">{% for i in 0..(table is empty ? 7 : 6) %}<td></td>{% endfor %}</tr>
{{ rows|raw }}
</tbody>
</table>
</form>
</div>

View file

@ -1,61 +0,0 @@
<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>
{{ trigger.action_timing }}
</td>
<td>
{{ trigger.event_manipulation }}
</td>
<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>
</tr>