Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e850a01093
@ -85,6 +85,7 @@ class ServerBinlogController extends Controller
|
||||
array(
|
||||
'url_params' => $url_params,
|
||||
'binary_logs' => $this->binary_logs,
|
||||
'log' => $_REQUEST['log'],
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -498,21 +498,25 @@ class TableSearchController extends TableController
|
||||
)
|
||||
);
|
||||
$this->response->addHTML(
|
||||
Template::get('table/search/selection_form')
|
||||
->render(
|
||||
array(
|
||||
'searchType' => $this->_searchType,
|
||||
'db' => $this->db,
|
||||
'table' => $this->table,
|
||||
'goto' => $goto,
|
||||
'self' => $this,
|
||||
'geomColumnFlag' => $this->_geomColumnFlag,
|
||||
'columnNames' => $this->_columnNames,
|
||||
'columnTypes' => $this->_columnTypes,
|
||||
'columnCollations' => $this->_columnCollations,
|
||||
'dataLabel' => $dataLabel,
|
||||
)
|
||||
)
|
||||
Template::get('table/search/selection_form')->render(array(
|
||||
'search_type' => $this->_searchType,
|
||||
'db' => $this->db,
|
||||
'table' => $this->table,
|
||||
'goto' => $goto,
|
||||
'self' => $this,
|
||||
'geom_column_flag' => $this->_geomColumnFlag,
|
||||
'column_names' => $this->_columnNames,
|
||||
'column_types' => $this->_columnTypes,
|
||||
'column_collations' => $this->_columnCollations,
|
||||
'data_label' => $dataLabel,
|
||||
'criteria_column_names' => $_POST['criteriaColumnNames'],
|
||||
'criteria_column_types' => $_POST['criteriaColumnTypes'],
|
||||
'sql_types' => $GLOBALS['PMA_Types'],
|
||||
'max_rows' => intval($GLOBALS['cfg']['MaxRows']),
|
||||
'max_plot_limit' => ((! empty($_POST['maxPlotLimit']))
|
||||
? intval($_POST['maxPlotLimit'])
|
||||
: intval($GLOBALS['cfg']['maxRowPlotLimit'])),
|
||||
))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
<form action="server_binlog.php" method="get">
|
||||
<?= PhpMyAdmin\Url::getHiddenInputs($url_params); ?>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<?= __('Select binary log to view'); ?>
|
||||
</legend>
|
||||
<?php $full_size = 0; ?>
|
||||
<select name="log">
|
||||
<?php foreach ($binary_logs as $each_log): ?>
|
||||
<option value="<?= htmlspecialchars($each_log['Log_name']); ?>"<?= ($each_log['Log_name'] == $_REQUEST['log'] ? ' selected="selected"' : ''); ?>>
|
||||
<?= htmlspecialchars($each_log['Log_name']); ?>
|
||||
<?php if (isset($each_log['File_size'])): ?>
|
||||
(<?= implode(' ', \PhpMyAdmin\Util::formatByteDown($each_log['File_size'], 3, 2)); ?>)
|
||||
<?php $full_size += $each_log['File_size']; ?>
|
||||
<?php endif; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?= count($binary_logs) . ' ' . __('Files') . ', '; ?>
|
||||
<?php if ($full_size > 0): ?>
|
||||
<?= implode(' ', \PhpMyAdmin\Util::formatByteDown($full_size)); ?>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
<fieldset class="tblFooters">
|
||||
<input type="submit" value="<?= __('Go'); ?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
29
templates/server/binlog/log_selector.twig
Normal file
29
templates/server/binlog/log_selector.twig
Normal file
@ -0,0 +1,29 @@
|
||||
<form action="server_binlog.php" method="get">
|
||||
{{ Url_getHiddenInputs(url_params) }}
|
||||
<fieldset>
|
||||
<legend>
|
||||
{% trans 'Select binary log to view' %}
|
||||
</legend>
|
||||
{% set full_size = 0 %}
|
||||
<select name="log">
|
||||
{% for each_log in binary_logs %}
|
||||
<option value="{{ each_log['Log_name'] }}"
|
||||
{{- each_log['Log_name'] == log ? ' selected="selected"' }}>
|
||||
{{ each_log['Log_name'] }}
|
||||
{% if each_log['File_size'] is defined %}
|
||||
({{ Util_formatByteDown(each_log['File_size'], 3, 2)|join(' ') }})
|
||||
{% set full_size = full_size + each_log['File_size'] %}
|
||||
{% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{{ binary_logs|length }}
|
||||
{% trans 'Files' %},
|
||||
{% if full_size > 0 %}
|
||||
{{ Util_formatByteDown(full_size)|join(' ') }}
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
<fieldset class="tblFooters">
|
||||
<input type="submit" value="{% trans 'Go' %}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
@ -1,111 +0,0 @@
|
||||
<?php
|
||||
$scriptName = '';
|
||||
$formId = '';
|
||||
switch ($searchType) {
|
||||
case 'normal' :
|
||||
$scriptName = 'tbl_select.php';
|
||||
$formId = 'tbl_search_form';
|
||||
break;
|
||||
case 'zoom' :
|
||||
$scriptName = 'tbl_zoom_select.php';
|
||||
$formId = 'zoom_search_form';
|
||||
break;
|
||||
case 'replace' :
|
||||
$scriptName = 'tbl_find_replace.php';
|
||||
$formId = 'find_replace_form';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<?= PhpMyAdmin\Template::get('table/search/form_tag')
|
||||
->render(array(
|
||||
'script_name' => $scriptName,
|
||||
'form_id' => $formId,
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'goto' => $goto
|
||||
)) ?>
|
||||
<?php if ($searchType == 'zoom'): ?>
|
||||
<fieldset id="fieldset_zoom_search">
|
||||
<fieldset id="inputSection">
|
||||
<legend>
|
||||
<?= __('Do a "query by example" (wildcard: "%") for two different columns'); ?>
|
||||
</legend>
|
||||
<?= PhpMyAdmin\Template::get('table/search/fields_table')
|
||||
->render(array(
|
||||
'self' => $self,
|
||||
'search_type' => $searchType,
|
||||
'geom_column_flag' => $geomColumnFlag,
|
||||
'column_names' => $columnNames,
|
||||
'column_types' => $columnTypes,
|
||||
'column_collations' => $columnCollations,
|
||||
'criteria_column_names' => $_POST['criteriaColumnNames'],
|
||||
'criteria_column_types' => $_POST['criteriaColumnTypes'],
|
||||
))
|
||||
?>
|
||||
<?= PhpMyAdmin\Template::get('table/search/options_zoom')
|
||||
->render(array(
|
||||
'data_label' => $dataLabel,
|
||||
'column_names' => $columnNames,
|
||||
'max_plot_limit' => ((! empty($_POST['maxPlotLimit']))
|
||||
? intval($_POST['maxPlotLimit'])
|
||||
: intval($GLOBALS['cfg']['maxRowPlotLimit'])),
|
||||
)) ?>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<?php elseif ($searchType == 'normal'): ?>
|
||||
<fieldset id="fieldset_table_search">
|
||||
<fieldset id="fieldset_table_qbe">
|
||||
<legend>
|
||||
<?= __('Do a "query by example" (wildcard: "%")'); ?>
|
||||
</legend>
|
||||
<div class="responsivetable jsresponsive">
|
||||
<?= PhpMyAdmin\Template::get('table/search/fields_table')
|
||||
->render(array(
|
||||
'self' => $self,
|
||||
'search_type' => $searchType,
|
||||
'geom_column_flag' => $geomColumnFlag,
|
||||
'column_names' => $columnNames,
|
||||
'column_types' => $columnTypes,
|
||||
'column_collations' => $columnCollations,
|
||||
'criteria_column_names' => $_POST['criteriaColumnNames'],
|
||||
'criteria_column_types' => $_POST['criteriaColumnTypes'],
|
||||
)); ?>
|
||||
</div>
|
||||
<div id="gis_editor">
|
||||
</div>
|
||||
<div id="popup_background">
|
||||
</div>
|
||||
</fieldset>
|
||||
<?= PhpMyAdmin\Template::get('table/search/options')
|
||||
->render(array(
|
||||
'column_names' => $columnNames,
|
||||
'max_rows' => intval($GLOBALS['cfg']['MaxRows'])
|
||||
)); ?>
|
||||
</fieldset>
|
||||
<?php elseif ($searchType == 'replace'): ?>
|
||||
<fieldset id="fieldset_find_replace">
|
||||
<fieldset id="fieldset_find">
|
||||
<legend>
|
||||
<?= __('Find and replace'); ?>
|
||||
</legend>
|
||||
<?= PhpMyAdmin\Template::get('table/search/search_and_replace')
|
||||
->render(array(
|
||||
'column_names' => $columnNames,
|
||||
'column_types' => $columnTypes,
|
||||
'sql_types' => $GLOBALS['PMA_Types'],
|
||||
)); ?>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--Displays selection form's footer elements-->
|
||||
<fieldset class="tblFooters">
|
||||
<input type="submit"
|
||||
name="<?= ($searchType == 'zoom' ? 'zoom_submit' : 'submit'); ?>"
|
||||
<?php if ($searchType == 'zoom'): ?>
|
||||
id="inputFormSubmitId"
|
||||
<?php endif; ?>
|
||||
value="<?= __('Go'); ?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<div id="sqlqueryresultsouter"></div>
|
||||
102
templates/table/search/selection_form.twig
Normal file
102
templates/table/search/selection_form.twig
Normal file
@ -0,0 +1,102 @@
|
||||
{% if search_type == 'zoom' %}
|
||||
{% include 'table/search/form_tag.twig' with {
|
||||
'script_name': 'tbl_zoom_select.php',
|
||||
'form_id': 'zoom_search_form',
|
||||
'db': db,
|
||||
'table': table,
|
||||
'goto': goto
|
||||
} only %}
|
||||
<fieldset id="fieldset_zoom_search">
|
||||
<fieldset id="inputSection">
|
||||
<legend>
|
||||
{% trans 'Do a "query by example" (wildcard: "%") for two different columns' %}
|
||||
</legend>
|
||||
{% include 'table/search/fields_table.twig' with {
|
||||
'self': self,
|
||||
'search_type': search_type,
|
||||
'geom_column_flag': geom_column_flag,
|
||||
'column_names': column_names,
|
||||
'column_types': column_types,
|
||||
'column_collations': column_collations,
|
||||
'criteria_column_names': criteria_column_names,
|
||||
'criteria_column_types': criteria_column_types
|
||||
} only %}
|
||||
{% include 'table/search/options_zoom.twig' with {
|
||||
'data_label': data_label,
|
||||
'column_names': column_names,
|
||||
'max_plot_limit': max_plot_limit
|
||||
} only %}
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
{% elseif search_type == 'normal' %}
|
||||
{% include 'table/search/form_tag.twig' with {
|
||||
'script_name': 'tbl_select.php',
|
||||
'form_id': 'tbl_search_form',
|
||||
'db': db,
|
||||
'table': table,
|
||||
'goto': goto
|
||||
} only %}
|
||||
<fieldset id="fieldset_table_search">
|
||||
<fieldset id="fieldset_table_qbe">
|
||||
<legend>
|
||||
{% trans 'Do a "query by example" (wildcard: "%")' %}
|
||||
</legend>
|
||||
<div class="responsivetable jsresponsive">
|
||||
{% include 'table/search/fields_table.twig' with {
|
||||
'self': self,
|
||||
'search_type': search_type,
|
||||
'geom_column_flag': geom_column_flag,
|
||||
'column_names': column_names,
|
||||
'column_types': column_types,
|
||||
'column_collations': column_collations,
|
||||
'criteria_column_names': criteria_column_names,
|
||||
'criteria_column_types': criteria_column_types
|
||||
} only %}
|
||||
</div>
|
||||
<div id="gis_editor"></div>
|
||||
<div id="popup_background"></div>
|
||||
</fieldset>
|
||||
{% include 'table/search/options.twig' with {
|
||||
'column_names': column_names,
|
||||
'max_rows': max_rows
|
||||
} only %}
|
||||
</fieldset>
|
||||
{% elseif search_type == 'replace' %}
|
||||
{% include 'table/search/form_tag.twig' with {
|
||||
'script_name': 'tbl_find_replace.php',
|
||||
'form_id': 'find_replace_form',
|
||||
'db': db,
|
||||
'table': table,
|
||||
'goto': goto
|
||||
} only %}
|
||||
<fieldset id="fieldset_find_replace">
|
||||
<fieldset id="fieldset_find">
|
||||
<legend>
|
||||
{% trans 'Find and replace' %}
|
||||
</legend>
|
||||
{% include 'table/search/search_and_replace.twig' with {
|
||||
'column_names': column_names,
|
||||
'column_types': column_types,
|
||||
'sql_types': sql_types
|
||||
} only %}
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
{% else %}
|
||||
{% include 'table/search/form_tag.twig' with {
|
||||
'script_name': '',
|
||||
'form_id': '',
|
||||
'db': db,
|
||||
'table': table,
|
||||
'goto': goto
|
||||
} only %}
|
||||
{% endif %}
|
||||
|
||||
{# Displays selection form's footer elements #}
|
||||
<fieldset class="tblFooters">
|
||||
<input type="submit"
|
||||
name="{{ search_type == 'zoom' ? 'zoom_submit' : 'submit' }}"
|
||||
{{ search_type == 'zoom' ? 'id="inputFormSubmitId"' }}
|
||||
value="{% trans 'Go' %}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<div id="sqlqueryresultsouter"></div>
|
||||
Loading…
Reference in New Issue
Block a user