result_form.twig 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <form method="post" action="{{ url('/table/zoom-search') }}" name="displayResultForm" id="zoom_display_form" class="ajax">
  2. {{ get_hidden_inputs(db, table) }}
  3. <input type="hidden" name="goto" value="{{ goto }}">
  4. <input type="hidden" name="back" value="{{ url('/table/zoom-search') }}">
  5. <fieldset id="displaySection">
  6. <legend>{% trans 'Browse/Edit the points' %}</legend>
  7. {# JSON encode the data(query result) #}
  8. <div class="text-center">
  9. {% if zoom_submit and data is not empty %}
  10. <div id="resizer">
  11. <a class="text-center" id="help_dialog" href="#">
  12. {% trans 'How to use' %}
  13. </a>
  14. <div id="querydata" class="hide">
  15. {{ data_json }}
  16. </div>
  17. <div id="querychart"></div>
  18. <button class="btn btn-primary button-reset">
  19. {% trans 'Reset zoom' %}
  20. </button>
  21. </div>
  22. {% endif %}
  23. </div>
  24. {# Displays rows in point edit form #}
  25. <div id="dataDisplay" class="hide">
  26. <table class="pma-table">
  27. <thead>
  28. <tr>
  29. <th>{% trans 'Column' %}</th>
  30. <th>{% trans 'Null' %}</th>
  31. <th>{% trans 'Value' %}</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. {% for column_index in 0..column_names|length - 1 %}
  36. {% set field_popup = column_names[column_index] %}
  37. {% set foreign_data = get_foreign_data(
  38. foreigners,
  39. field_popup,
  40. false,
  41. '',
  42. ''
  43. ) %}
  44. <tr class="noclick">
  45. <th>{{ column_names[column_index] }}</th>
  46. {# Null checkbox if column can be null #}
  47. <th>
  48. {% if column_null_flags[column_index] == 'YES' %}
  49. <input type="checkbox" class="checkbox_null"
  50. name="criteriaColumnNullFlags[{{ column_index }}]"
  51. id="edit_fields_null_id_{{ column_index }}">
  52. {% endif %}
  53. </th>
  54. {# Column's Input box #}
  55. <th>
  56. {% include 'table/search/input_box.twig' with {
  57. 'str': '',
  58. 'column_type': column_types[column_index],
  59. 'column_id': column_types[column_index] ? 'edit_fieldID_' : 'fieldID_',
  60. 'in_zoom_search_edit': true,
  61. 'foreigners': foreigners,
  62. 'column_name': field_popup,
  63. 'column_name_hash': column_name_hashes[field_popup],
  64. 'foreign_data': foreign_data,
  65. 'table': table,
  66. 'column_index': column_index,
  67. 'foreign_max_limit': foreign_max_limit,
  68. 'criteria_values': '',
  69. 'db': db,
  70. 'in_fbs': false
  71. } only %}
  72. </th>
  73. </tr>
  74. {% endfor %}
  75. </tbody>
  76. </table>
  77. </div>
  78. <input type="hidden" id="queryID" name="sql_query">
  79. </fieldset>
  80. </form>