diff options
author | William Desportes <williamdes@wdes.fr> | 2021-02-15 01:51:02 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2021-02-25 01:56:33 +0300 |
commit | c5155ecae9650fd0c5e2ff38f7f1a1d20ab60477 (patch) | |
tree | 1b3281b04921c8f822de99410ec8baffc19dd755 /templates/display | |
parent | 8fa2e36f5c71833a9d53e05d5a084b76983ed0ab (diff) |
Refactor field flags to use an object an not strpos
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'templates/display')
-rw-r--r-- | templates/display/results/comment_for_row.twig | 12 | ||||
-rw-r--r-- | templates/display/results/null_display.twig | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/templates/display/results/comment_for_row.twig b/templates/display/results/comment_for_row.twig index f232375115..2621a93eb2 100644 --- a/templates/display/results/comment_for_row.twig +++ b/templates/display/results/comment_for_row.twig @@ -1,10 +1,10 @@ -{% if comments_map[fields_meta.table] is defined - and comments_map[fields_meta.table][fields_meta.name] is defined %} - <br><span class="tblcomment" title="{{ comments_map[fields_meta.table][fields_meta.name] }}"> - {% if comments_map[fields_meta.table][fields_meta.name]|length > limit_chars %} - {{ comments_map[fields_meta.table][fields_meta.name]|slice(0, limit_chars) }}… +{% if comments_map[table_name] is defined + and comments_map[table_name][column_name] is defined %} + <br><span class="tblcomment" title="{{ comments_map[table_name][column_name] }}"> + {% if comments_map[table_name][column_name]|length > limit_chars %} + {{ comments_map[table_name][column_name]|slice(0, limit_chars) }}… {% else %} - {{ comments_map[fields_meta.table][fields_meta.name] }} + {{ comments_map[table_name][column_name] }} {% endif %} </span> {% endif %} diff --git a/templates/display/results/null_display.twig b/templates/display/results/null_display.twig index f2ea2e5f2f..fc9d5b0e4c 100644 --- a/templates/display/results/null_display.twig +++ b/templates/display/results/null_display.twig @@ -1,6 +1,6 @@ <td {{ align }} - data-decimals="{{ meta.decimals is defined ? meta.decimals : '-1' }}" - data-type="{{ meta.type }}" + data-decimals="{{ data_decimals }}" + data-type="{{ data_type }}" {# The null class is needed for grid editing #} class="{{ classes }} null"> <em>NULL</em> |