Skip to content
Permalink
Browse files

Rename relations Twig extensions

Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
  • Loading branch information...
laps15 committed Aug 1, 2018
1 parent 9464cbc commit 78c1d9e9492f01bcb5405f5ac4a7369b41645669
@@ -30,25 +30,25 @@ public function getFunctions()
$relation = new Relation();
return [
new TwigFunction(
'Relation_foreignDropdown',
'foreign_dropdown',
[$relation, 'foreignDropdown'],
['is_safe' => ['html']]
),
new TwigFunction(
'Relation_getDisplayField',
'get_display_field',
[$relation, 'getDisplayField'],
['is_safe' => ['html']]
),
new TwigFunction(
'Relation_getForeignData',
'get_foreign_data',
[$relation, 'getForeignData']
),
new TwigFunction(
'Relation_getTables',
'get_tables',
[$relation, 'getTables']
),
new TwigFunction(
'Relation_searchColumnInForeigners',
'search_column_in_foreigners',
[$relation, 'searchColumnInForeigners']
),
];
@@ -57,7 +57,7 @@
</thead>
<tbody id="id_tbody_{{ t_n_url|url_encode }}"
{{- tab_pos[t_n] is defined and tab_pos[t_n]['V'] is empty ? ' style="display: none"' }}>
{% set display_field = Relation_getDisplayField(get_db, table_names_small[i]) %}
{% set display_field = get_display_field(get_db, table_names_small[i]) %}
{% for j in 0..tab_column[t_n]['COLUMN_ID']|length - 1 %}
{% set tmp_column = t_n ~ '.' ~ tab_column[t_n]['COLUMN_NAME'][j] %}
{% set click_field_param = [
@@ -190,7 +190,7 @@
{% endif %}

{% if cfg_relation['displaywork'] %}
{% set disp = Relation_getDisplayField(db, table) %}
{% set disp = get_display_field(db, table) %}
<fieldset>
<label>{% trans 'Choose column to display:' %}</label>
<select name="display_field">
@@ -92,7 +92,7 @@
</td>
{% set tables = [] %}
{% if foreign_db %}
{% set tables = Relation_getTables(foreign_db, tbl_storage_engine) %}
{% set tables = get_tables(foreign_db, tbl_storage_engine) %}
{% endif %}
<td>
<span class="formelement clearfloat">
@@ -1,9 +1,9 @@
{# Get inputbox based on different column types (Foreign key, geometrical, enum) #}
{% if foreigners and Relation_searchColumnInForeigners(foreigners, column_name) %}
{% if foreigners and search_column_in_foreigners(foreigners, column_name) %}
{% if foreign_data['disp_row'] is iterable %}
<select name="criteriaValues[{{ column_index }}]"
id="{{ column_id }}{{ column_index }}">
{{ Relation_foreignDropdown(
{{ foreign_dropdown(
foreign_data['disp_row'],
foreign_data['foreign_field'],
foreign_data['foreign_display'],
@@ -39,7 +39,7 @@
<tbody>
{% for column_index in 0..column_names|length - 1 %}
{% set field_popup = column_names[column_index] %}
{% set foreign_data = Relation_getForeignData(
{% set foreign_data = get_foreign_data(
foreigners,
field_popup,
false,

0 comments on commit 78c1d9e

Please sign in to comment.
You can’t perform that action at this time.