Permalink
Browse files

Refactor table relation's templates

Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
  • Loading branch information...
laps15 committed Jul 18, 2018
1 parent 7ac2224 commit a017a8e2c6555d385e2b65cba6560728d20fb5f1
Showing with 30 additions and 40 deletions.
  1. +30 −10 templates/table/relation/common_form.twig
  2. +0 −30 templates/table/relation/internal_relational_row.twig
@@ -150,17 +150,37 @@
{% set table_obj = Table_get(foreign_table, foreign_db) %}
{% set unique_columns = table_obj.getUniqueColumns(false, false) %}
{% endif %}
<tr>
<td class="vmiddle">
<strong>{{ myfield }}</strong>
<input type="hidden" name="fields_name[{{ myfield_md5 }}]"
value="{{ myfield }}"/>
</td>
{% include 'table/relation/internal_relational_row.twig' with {
'myfield': myfield,
'myfield_md5': myfield_md5,
'databases': databases,
'tables': tables,
'columns': unique_columns,
'foreign_db': foreign_db,
'foreign_table': foreign_table,
'foreign_column': foreign_column
} only %}
<td>
{% include 'table/relation/relational_dropdown.twig' with {
'name': 'destination_db[' ~ myfield_md5 ~ ']',
'title': 'Database'|trans,
'values': databases,
'foreign': foreign_db
} only %}
{% include 'table/relation/relational_dropdown.twig' with {
'name': 'destination_table[' ~ myfield_md5 ~ ']',
'title': 'Table'|trans,
'values': tables,
'foreign': foreign_table
} only %}
{% include 'table/relation/relational_dropdown.twig' with {
'name': 'destination_column[' ~ myfield_md5 ~ ']',
'title': 'Column'|trans,
'values': unique_columns,
'foreign': foreign_column
} only %}
</td>
</tr>
{% endfor %}
</table>
</fieldset>

This file was deleted.

Oops, something went wrong.

0 comments on commit a017a8e

Please sign in to comment.