From 9b38ea8ca323a4714841a0f6de2f7070be80ed6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Fri, 6 Oct 2017 16:06:16 -0300 Subject: [PATCH] Port table/search/fields_table template to Twig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- templates/table/search/fields_table.phtml | 28 --------------------- templates/table/search/fields_table.twig | 23 +++++++++++++++++ templates/table/search/selection_form.phtml | 24 ++++++++++-------- 3 files changed, 37 insertions(+), 38 deletions(-) delete mode 100644 templates/table/search/fields_table.phtml create mode 100644 templates/table/search/fields_table.twig diff --git a/templates/table/search/fields_table.phtml b/templates/table/search/fields_table.phtml deleted file mode 100644 index 917b9e4fbf..0000000000 --- a/templates/table/search/fields_table.phtml +++ /dev/null @@ -1,28 +0,0 @@ - - id="tableFieldsId" - > - render(array( - 'geom_column_flag' => $geomColumnFlag - )); ?> - - - render(array( - 'self' => $self, - 'column_names' => $columnNames, - 'criteria_column_names' => $_POST['criteriaColumnNames'], - 'criteria_column_types' => $_POST['criteriaColumnTypes'], - )) ?> - - render(array( - 'self' => $self, - 'geom_column_flag' => $geomColumnFlag, - 'column_names' => $columnNames, - 'column_types' => $columnTypes, - 'column_collations' => $columnCollations - )) ?> - - -
diff --git a/templates/table/search/fields_table.twig b/templates/table/search/fields_table.twig new file mode 100644 index 0000000000..c2da41a687 --- /dev/null +++ b/templates/table/search/fields_table.twig @@ -0,0 +1,23 @@ + + {% include 'table/search/table_header.twig' with { + 'geom_column_flag': geom_column_flag + } only %} + + {% if search_type == 'zoom' %} + {% include 'table/search/rows_zoom.twig' with { + 'self': self, + 'column_names': column_names, + 'criteria_column_names': criteria_column_names, + 'criteria_column_types': criteria_column_types + } only %} + {% else %} + {% include 'table/search/rows_normal.twig' with { + 'self': self, + 'geom_column_flag': geom_column_flag, + 'column_names': column_names, + 'column_types': column_types, + 'column_collations': column_collations + } only %} + {% endif %} + +
diff --git a/templates/table/search/selection_form.phtml b/templates/table/search/selection_form.phtml index fed4060d75..792f266e89 100644 --- a/templates/table/search/selection_form.phtml +++ b/templates/table/search/selection_form.phtml @@ -33,11 +33,13 @@ switch ($searchType) { render(array( 'self' => $self, - 'searchType' => $searchType, - 'geomColumnFlag' => $geomColumnFlag, - 'columnNames' => $columnNames, - 'columnTypes' => $columnTypes, - 'columnCollations' => $columnCollations + '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'], )) ?> render(array( 'self' => $self, - 'searchType' => $searchType, - 'geomColumnFlag' => $geomColumnFlag, - 'columnNames' => $columnNames, - 'columnTypes' => $columnTypes, - 'columnCollations' => $columnCollations + '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'], )); ?>