column_name.twig 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {% set title = '' %}
  2. {% if column_meta['column_status'] is defined %}
  3. {% if column_meta['column_status']['isReferenced'] %}
  4. {% set title = title ~ 'Referenced by %s.'|trans|format(
  5. column_meta['column_status']['references']|join(',')
  6. ) %}
  7. {% endif %}
  8. {% if column_meta['column_status']['isForeignKey'] %}
  9. {% if title is not empty %}
  10. {% set title = title ~ '\n'|raw %}
  11. {% endif %}
  12. {% set title = title ~ 'Is a foreign key.'|trans %}
  13. {% endif %}
  14. {% endif %}
  15. {% if title is empty %}
  16. {% set title = 'Column'|trans %}
  17. {% endif %}
  18. <input id="field_{{ column_number }}_{{ ci - ci_offset }}"
  19. {% if column_meta['column_status'] is defined
  20. and not column_meta['column_status']['isEditable'] %}
  21. disabled="disabled"
  22. {% endif %}
  23. type="text"
  24. name="field_name[{{ column_number }}]"
  25. maxlength="64"
  26. class="textfield"
  27. title="{{ title }}"
  28. size="10"
  29. value="{{ column_meta['Field'] is defined ? column_meta['Field'] }}" />
  30. {% if cfg_relation['centralcolumnswork']
  31. and not (column_meta['column_status'] is defined
  32. and not column_meta['column_status']['isEditable']) %}
  33. <p style="font-size:80%;margin:5px 2px"
  34. id="central_columns_{{ column_number }}_{{ ci - ci_offset }}">
  35. <a data-maxrows="{{ max_rows }}"
  36. href="#"
  37. class="central_columns_dialog">
  38. {% trans 'Pick from Central Columns' %}
  39. </a>
  40. </p>
  41. {% endif %}