Remove radio fields HTML generator
[phpmyadmin.git] / templates / table / search / index.twig
blobcec78660d4490881fb28b6733d5d90669966435b
1 <ul class="nav nav-pills m-2">
2   <li class="nav-item">
3     <a class="nav-link active" href="{{ url('/table/search', {'db': db, 'table': table, 'pos': 0}) }}">
4       {{ get_icon('b_search', 'Table search'|trans) }}
5     </a>
6   </li>
8   <li class="nav-item">
9     <a class="nav-link" href="{{ url('/table/zoom-search', {'db': db, 'table': table}) }}">
10       {{ get_icon('b_select', 'Zoom search'|trans) }}
11     </a>
12   </li>
14   <li class="nav-item">
15     <a class="nav-link" href="{{ url('/table/find-replace', {'db': db, 'table': table}) }}">
16       {{ get_icon('b_find_replace', 'Find and replace'|trans) }}
17     </a>
18   </li>
19 </ul>
21 <form method="post" action="{{ url('/table/search') }}" name="insertForm" id="tbl_search_form" class="ajax lock-page">
22   {{ get_hidden_inputs(db, table) }}
23   <input type="hidden" name="goto" value="{{ goto }}">
24   <input type="hidden" name="back" value="{{ url('/table/search') }}">
26   <fieldset id="fieldset_table_search">
27     <fieldset id="fieldset_table_qbe">
28       <legend>
29         {% trans 'Do a "query by example" (wildcard: "%")' %}
30       </legend>
31       <div class="responsivetable jsresponsive">
32         <table class="data">
33           <thead>
34             <tr>
35               {% if geom_column_flag %}
36                 <th>{% trans 'Function' %}</th>
37               {% endif %}
38               <th>{% trans 'Column' %}</th>
39               <th>{% trans 'Type' %}</th>
40               <th>{% trans 'Collation' %}</th>
41               <th>{% trans 'Operator' %}</th>
42               <th>{% trans 'Value' %}</th>
43             </tr>
44           </thead>
45           <tbody>
46             {% for column_index in 0..column_names|length - 1 %}
47               <tr class="noclick">
48                 {# If 'Function' column is present trying to change comment #}
49                 {% if geom_column_flag %}
50                   {# Displays 'Function' column if it is present #}
51                   <td>
52                     {% set geom_types = get_gis_datatypes() %}
53                     {% if column_types[column_index] in geom_types %}
54                       <select class="geom_func" name="geom_func[{{ column_index }}]">
55                         {# get the relevant list of GIS functions #}
56                         {% set funcs = get_gis_functions(column_types[column_index], true, true) %}
57                         {% for func_name, func in funcs %}
58                           {% set name = func['display'] is defined ? func['display'] : func_name %}
59                           <option value="{{ name }}">
60                             {{ name }}
61                           </option>
62                         {% endfor %}
63                       </select>
64                     {% endif %}
65                   </td>
66                 {% endif %}
67                 {# Displays column's name, type, collation and value #}
68                 <th>
69                   {{ column_names[column_index] }}
70                 </th>
71                 {% set properties = self.getColumnProperties(column_index, column_index) %}
72                 <td dir="ltr">
73                   {{ properties['type'] }}
74                 </td>
75                 <td>
76                   {{ properties['collation'] }}
77                 </td>
78                 <td>
79                   {{ properties['func']|raw }}
80                 </td>
81                 {# here, the data-type attribute is needed for a date/time picker #}
82                 <td data-type="{{ properties['type'] }}">
83                   {{ properties['value']|raw }}
84                   {# Displays hidden fields #}
85                   <input type="hidden" name="criteriaColumnNames[{{ column_index }}]" value="{{ column_names[column_index] }}">
86                   <input type="hidden" name="criteriaColumnTypes[{{ column_index }}]" value="{{ column_types[column_index] }}">
87                   <input type="hidden" name="criteriaColumnCollations[{{ column_index }}]" value="{{ column_collations[column_index] }}">
88                 </td>
89               </tr>
90             {% endfor %}
91           </tbody>
92         </table>
93       </div>
94       <div id="gis_editor"></div>
95       <div id="popup_background"></div>
96     </fieldset>
98     {% include 'div_for_slider_effect.twig' with {
99       'id': 'searchoptions',
100       'message': 'Options'|trans,
101       'initial_sliders_state': default_sliders_state
102     } only %}
104     {# Displays columns select list for selecting distinct columns in the search #}
105     <fieldset id="fieldset_select_fields">
106       <legend>
107         {% trans 'Select columns (at least one):' %}
108       </legend>
109       <select name="columnsToDisplay[]" size="{{ min(column_names|length, 10) }}" multiple>
110         {% for each_field in column_names %}
111           <option value="{{ each_field }}" selected>
112             {{ each_field }}
113           </option>
114         {% endfor %}
115       </select>
116       <input type="checkbox" name="distinct" value="DISTINCT" id="oDistinct">
117       <label for="oDistinct">DISTINCT</label>
118     </fieldset>
120     {# Displays input box for custom 'Where' clause to be used in the search #}
121     <fieldset id="fieldset_search_conditions">
122       <legend>
123         <em>{% trans 'Or' %}</em>
124         {% trans 'Add search conditions (body of the "where" clause):' %}
125       </legend>
126       {{ show_mysql_docu('Functions') }}
127       <input type="text" name="customWhereClause" class="textfield" size="64">
128     </fieldset>
130     {# Displays option of changing default number of rows displayed per page #}
131     <fieldset id="fieldset_limit_rows">
132       <legend>{% trans 'Number of rows per page' %}</legend>
133       <input type="number" name="session_max_rows" min="1" value="{{ max_rows }}" class="textfield" required>
134     </fieldset>
136     {# Displays option for ordering search results by a column value (Asc or Desc) #}
137     <fieldset id="fieldset_display_order">
138       <legend>{% trans 'Display order:' %}</legend>
139       <select name="orderByColumn"><option value="--nil--"></option>
140         {% for each_field in column_names %}
141           <option value="{{ each_field }}">
142             {{ each_field }}
143           </option>
144         {% endfor %}
145       </select>
147       <div class="formelement">
148         <input type="radio" name="order" id="orderByAscRadio" value="ASC" checked>
149         <label for="orderByAscRadio">{% trans 'Ascending' %}</label>
150       </div>
151       <div class="formelement">
152         <input type="radio" name="order" id="orderByDescRadio" value="DESC">
153         <label for="orderByDescRadio">{% trans 'Descending' %}</label>
154       </div>
156     </fieldset>
157     <div class="clearfloat"></div>
158   </fieldset>
160   <fieldset class="tblFooters">
161     <input class="btn btn-primary" type="submit" name="submit" value="{% trans 'Go' %}">
162   </fieldset>
163 </form>
164 <div id="sqlqueryresultsouter"></div>