Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

166 строки
7.7 KiB

  1. {{ Util_getDivForSliderEffect('query_div', 'Query window'|trans, 'open') }}
  2. <form action="" id="query_form">
  3. <input type="hidden" id="db_name" value="{{ db }}">
  4. <fieldset>
  5. {% for table in tables %}
  6. <div style="display:none" id="{{ table.hash }}">
  7. <option value="*">*</option>
  8. {% for column in table.columns %}
  9. <option value="{{ column }}">{{ column }}</option>
  10. {% endfor %}
  11. </div>
  12. {% endfor %}
  13. {% for id in 0..default_no_of_columns %}
  14. {% if id == 0 %}<div style="display:none" id="new_column_layout">{% endif %}
  15. <fieldset style="display:inline" class="column_details">
  16. <select style="display:inline" class="tableNameSelect">
  17. <option value="">{% trans 'select table' %}</option>
  18. {% for table in tables|keys %}
  19. <option value="{{ table }}">{{ table }}</option>
  20. {% endfor %}
  21. </select>
  22. <span>.</span>
  23. <select style="display:inline" class="columnNameSelect">
  24. <option value="">{% trans 'select column' %}</option>
  25. </select>
  26. <br>
  27. <input type="checkbox" checked="checked" class="show_col">
  28. <span>{% trans 'Show' %}</span>
  29. <br>
  30. <input type="text" placeholder="{% trans 'Table alias' %}" class="table_alias">
  31. <input type="text" placeholder="{% trans 'Column alias' %}" class="col_alias">
  32. <br>
  33. <input type="checkbox"
  34. title="{% trans 'Use this column in criteria' %}"
  35. class="criteria_col">
  36. {% include 'div_for_slider_effect.twig' with {
  37. 'id': 'criteria_div' ~ id,
  38. 'initial_sliders_state': 'closed',
  39. 'message': 'criteria'|trans
  40. } %}
  41. <div>
  42. <table>
  43. <tr class="sort_order" style="background:none">
  44. <td>{% trans 'Sort' %}</td>
  45. <td><input type="radio" name="sort[{{ id }}]">{% trans 'Ascending' %}</td>
  46. <td><input type="radio" name="sort[{{ id }}]">{% trans 'Descending' %}</td>
  47. </tr>
  48. <tr class="logical_operator" style="background:none;display:none">
  49. <td>{% trans 'Add as' %}</td>
  50. <td>
  51. <input type="radio"
  52. name="logical_op[{{ id }}]"
  53. value="AND"
  54. class="logical_op"
  55. checked="checked">
  56. AND
  57. </td>
  58. <td>
  59. <input type="radio"
  60. name="logical_op[{{ id }}]"
  61. value="OR"
  62. class="logical_op">
  63. OR
  64. </td>
  65. </tr>
  66. <tr style="background:none">
  67. <td>Op </td>
  68. <td>
  69. <select class="criteria_op">
  70. <option value="=">=</option>
  71. <option value=">">&gt;</option>
  72. <option value=">=">&gt;=</option>
  73. <option value="<">&lt;</option>
  74. <option value="<=">&lt;=</option>
  75. <option value="!=">!=</option>
  76. <option value="LIKE">LIKE</option>
  77. <option value="LIKE %...%">LIKE %...%</option>
  78. <option value="NOT LIKE">NOT LIKE</option>
  79. <option value="IN (...)">IN (...)</option>
  80. <option value="NOT IN (...)">NOT IN (...)</option>
  81. <option value="BETWEEN">BETWEEN</option>
  82. <option value="NOT BETWEEN">NOT BETWEEN</option>
  83. <option value="IS NULL">IS NULL</option>
  84. <option value="IS NOT NULL">IS NOT NULL</option>
  85. <option value="REGEXP">REGEXP</option>
  86. <option value="REGEXP ^...$">REGEXP ^...$</option>
  87. <option value="NOT REGEXP">NOT REGEXP</option>
  88. </select>
  89. </td>
  90. <td>
  91. <select class="criteria_rhs">
  92. <option value="text">{% trans 'Text' %}</option>
  93. <option value="anotherColumn">{% trans 'Another column' %}</option>
  94. </select>
  95. </td>
  96. </tr>
  97. <tr class="rhs_table" style="display:none;background:none">
  98. <td></td>
  99. <td>
  100. <select class="tableNameSelect">
  101. <option value="">{% trans 'select table' %}</option>
  102. {% for table in tables|keys %}
  103. <option value="{{ table }}">{{ table }}</option>
  104. {% endfor %}
  105. </select><span>.</span>
  106. </td>
  107. <td>
  108. <select style="display:inline" class="columnNameSelect">
  109. <option value="">{% trans 'select column' %}</option>
  110. </select>
  111. </td>
  112. </tr>
  113. <tr style="background:none" class="rhs_text">
  114. <td></td>
  115. <td colspan="2">
  116. <input type="text"
  117. style="width:91%"
  118. class="rhs_text_val"
  119. placeholder="{% trans 'Enter criteria as free text' %}">
  120. </td>
  121. </tr>
  122. </table>
  123. </div>
  124. </div>
  125. <a href="#"
  126. title="{% trans 'Remove this column' %}"
  127. style="float:right;color:red"
  128. class="removeColumn">
  129. X
  130. </a>
  131. </fieldset>
  132. {% if id == 0 %}</div>{% endif %}
  133. {% endfor %}
  134. <fieldset style="display:inline">
  135. <input type="button" value="{% trans '+ Add column' %}" id="add_column_button">
  136. </fieldset>
  137. <fieldset>
  138. {% spaceless %}
  139. <textarea id="MultiSqlquery"
  140. cols="80"
  141. rows="4"
  142. style="float:left"
  143. name="sql_query"
  144. dir="ltr">
  145. </textarea>
  146. {% endspaceless %}
  147. </fieldset>
  148. </fieldset>
  149. <fieldset class="tblFooters">
  150. <input type="button" id="update_query_button" value="{% trans 'Update query' %}">
  151. <input type="button" id="submit_query" value="{% trans 'Submit query' %}">
  152. </fieldset>
  153. </form>
  154. </div>{# Slider div #}
  155. <div id="sql_results"></div>