Permalink
Browse files

Fix secondary tabs bug

Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
  • Loading branch information...
laps15 committed Jul 18, 2018
1 parent 9425fb9 commit 7ac2224500fcec7eebee6dd0ffc04cb90c3a64aa
@@ -188,6 +188,7 @@ public function indexAction()
// common form
$engine = $this->dbi->getTable($this->db, $this->table)->getStorageEngine();
$foreignKeySupported = Util::isForeignKeySupported($this->tbl_storage_engine);
$this->response->addHTML(
$this->template->render('table/relation/common_form', [
'url_params' => [
@@ -210,13 +211,10 @@ public function indexAction()
'url_params' => $GLOBALS['url_params'],
'databases' => $GLOBALS['dblist']->databases,
'dbi' => $this->dbi,
'foreignKeySupported' => $foreignKeySupported,
'displayIndexesHtml' => $foreignKeySupported ? Index::getHtmlForDisplayIndexes() : null,
])
);
if (Util::isForeignKeySupported($this->tbl_storage_engine)) {
$this->response->addHTML(Index::getHtmlForDisplayIndexes());
}
$this->response->addHTML('</div>');
}
/**
@@ -383,8 +383,6 @@ public function indexAction()
$columns_with_index
)
);
$this->response->addHTML('</div>');
}
/**
@@ -1481,7 +1479,14 @@ protected function getTableStats()
$avg_size = $avg_unit = '';
}
$engine = $this->dbi->getTable($this->db, $this->table)->getStorageEngine();
return $this->template->render('table/structure/display_table_stats', [
'url_params' => [
'db' => $GLOBALS['db'],
'table' => $GLOBALS['table'],
],
'is_foreign_key_supported' => Util::isForeignKeySupported($engine),
'cfg_relation' => $this->relation->getRelationsParam(),
'showtable' => $this->_showtable,
'table_info_num_rows' => $this->_table_info_num_rows,
'tbl_is_view' => $this->_tbl_is_view,
@@ -19,3 +19,4 @@
<div id="structure_content">
{% block content %}
{% endblock %}
</div>
@@ -192,4 +192,7 @@
<input type="submit" value="{% trans 'Save' %}" />
</fieldset>
</form>
{% if foreignKeySupported %}
{{ displayIndexesHtml|raw }}
{% endif %}
{% endblock %}
@@ -1,5 +1,3 @@
{% extends 'table/page_with_secondary_tabs.twig' %}
{% block content %}
<div id="tablestatistics">
<fieldset>
<legend>{% trans 'Information' %}</legend>
@@ -168,4 +166,3 @@
</table>
</fieldset>
</div>
{% endblock %}

0 comments on commit 7ac2224

Please sign in to comment.