Merge pull request #14483 from laps15/inheritance
Refactor table secondary tabs tamplate
This commit is contained in:
commit
1079140280
@ -163,21 +163,6 @@ class TableRelationController extends TableController
|
||||
);
|
||||
}
|
||||
|
||||
// display secondary level tabs if necessary
|
||||
$engine = $this->dbi->getTable($this->db, $this->table)->getStorageEngine();
|
||||
|
||||
$this->response->addHTML(
|
||||
$this->template->render('table/secondary_tabs', [
|
||||
'url_params' => [
|
||||
'db' => $GLOBALS['db'],
|
||||
'table' => $GLOBALS['table'],
|
||||
],
|
||||
'is_foreign_key_supported' => Util::isForeignKeySupported($engine),
|
||||
'cfg_relation' => $this->relation->getRelationsParam(),
|
||||
])
|
||||
);
|
||||
$this->response->addHTML('<div id="structure_content">');
|
||||
|
||||
/**
|
||||
* Dialog
|
||||
*/
|
||||
@ -202,8 +187,15 @@ class TableRelationController extends TableController
|
||||
}
|
||||
|
||||
// common form
|
||||
$engine = $this->dbi->getTable($this->db, $this->table)->getStorageEngine();
|
||||
$this->response->addHTML(
|
||||
$this->template->render('table/relation/common_form', [
|
||||
'url_params' => [
|
||||
'db' => $GLOBALS['db'],
|
||||
'table' => $GLOBALS['table'],
|
||||
],
|
||||
'is_foreign_key_supported' => Util::isForeignKeySupported($engine),
|
||||
'cfg_relation' => $this->relation->getRelationsParam(),
|
||||
'db' => $this->db,
|
||||
'table' => $this->table,
|
||||
'cfg_relation' => $this->cfgRelation,
|
||||
|
||||
@ -288,20 +288,6 @@ class TableStructureController extends TableController
|
||||
}
|
||||
}
|
||||
|
||||
// display secondary level tabs if necessary
|
||||
$engine = $this->table_obj->getStorageEngine();
|
||||
$this->response->addHTML(
|
||||
$this->template->render('table/secondary_tabs', [
|
||||
'url_params' => [
|
||||
'db' => $this->db,
|
||||
'table' => $this->table,
|
||||
],
|
||||
'is_foreign_key_supported' => Util::isForeignKeySupported($engine),
|
||||
'cfg_relation' => $this->relation->getRelationsParam(),
|
||||
])
|
||||
);
|
||||
$this->response->addHTML('<div id="structure_content">');
|
||||
|
||||
/**
|
||||
* Modifications have been submitted -> updates the table
|
||||
*/
|
||||
@ -1368,7 +1354,14 @@ class TableStructureController extends TableController
|
||||
}
|
||||
}
|
||||
|
||||
$engine = $this->table_obj->getStorageEngine();
|
||||
return $this->template->render('table/structure/display_structure', [
|
||||
'url_params' => [
|
||||
'db' => $this->db,
|
||||
'table' => $this->table,
|
||||
],
|
||||
'is_foreign_key_supported' => Util::isForeignKeySupported($engine),
|
||||
'cfg_relation' => $this->relation->getRelationsParam(),
|
||||
'hide_structure_actions' => $hideStructureActions,
|
||||
'db' => $this->db,
|
||||
'table' => $this->table,
|
||||
|
||||
@ -15,3 +15,7 @@
|
||||
</ul>
|
||||
<div class="clearfloat"></div>
|
||||
{% endif %}
|
||||
|
||||
<div id="structure_content">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
@ -1,3 +1,6 @@
|
||||
{% extends 'table/page_with_secondary_tabs.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post" action="tbl_relation.php">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{# InnoDB #}
|
||||
@ -189,3 +192,4 @@
|
||||
<input type="submit" value="{% trans 'Save' %}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
{% extends 'table/page_with_secondary_tabs.twig' %}
|
||||
{% block content %}
|
||||
<form method="post" action="tbl_structure.php" name="fieldsForm" id="fieldsForm"
|
||||
class="ajax{{ hide_structure_actions ? ' HideStructureActions' }}">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
@ -501,3 +503,4 @@
|
||||
{{ table_stats|raw }}
|
||||
{% endif %}
|
||||
<div class="clearfloat"></div>
|
||||
{% endblock %}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
{% extends 'table/page_with_secondary_tabs.twig' %}
|
||||
{% block content %}
|
||||
<div id="tablestatistics">
|
||||
<fieldset>
|
||||
<legend>{% trans 'Information' %}</legend>
|
||||
@ -166,3 +168,4 @@
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user