review_list.twig (10138B)
1 {{ header }}{{ column_left }} 2 <div id="content"> 3 <div class="page-header"> 4 <div class="container-fluid"> 5 <div class="pull-right"> 6 <button type="button" data-toggle="tooltip" title="{{ button_filter }}" onclick="$('#filter-review').toggleClass('hidden-sm hidden-xs');" class="btn btn-default hidden-md hidden-lg"><i class="fa fa-filter"></i></button> 7 <a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a> 8 <button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-review').submit() : false;"><i class="fa fa-trash-o"></i></button> 9 </div> 10 <h1>{{ heading_title }}</h1> 11 <ul class="breadcrumb"> 12 {% for breadcrumb in breadcrumbs %} 13 <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li> 14 {% endfor %} 15 </ul> 16 </div> 17 </div> 18 <div class="container-fluid">{% if error_warning %} 19 <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }} 20 <button type="button" class="close" data-dismiss="alert">×</button> 21 </div> 22 {% endif %} 23 {% if success %} 24 <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }} 25 <button type="button" class="close" data-dismiss="alert">×</button> 26 </div> 27 {% endif %} 28 <div class="row"> 29 <div id="filter-review" class="col-md-3 col-md-push-9 col-sm-12 hidden-sm hidden-xs"> 30 <div class="panel panel-default"> 31 <div class="panel-heading"> 32 <h3 class="panel-title"><i class="fa fa-filter"></i> {{ text_filter }}</h3> 33 </div> 34 <div class="panel-body"> 35 <div class="form-group"> 36 <label class="control-label" for="input-product">{{ entry_product }}</label> 37 <input type="text" name="filter_product" value="{{ filter_product }}" placeholder="{{ entry_product }}" id="input-product" class="form-control" /> 38 </div> 39 <div class="form-group"> 40 <label class="control-label" for="input-author">{{ entry_author }}</label> 41 <input type="text" name="filter_author" value="{{ filter_author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control" /> 42 </div> 43 <div class="form-group"> 44 <label class="control-label" for="input-status">{{ entry_status }}</label> 45 <select name="filter_status" id="input-status" class="form-control"> 46 <option value=""></option> 47 48 49 50 51 52 53 54 55 56 {% if filter_status == '1' %} 57 58 59 60 61 62 63 64 65 66 <option value="1" selected="selected">{{ text_enabled }}</option> 67 68 69 70 71 72 73 74 75 76 {% else %} 77 78 79 80 81 82 83 84 85 86 <option value="1">{{ text_enabled }}</option> 87 88 89 90 91 92 93 94 95 96 {% endif %} 97 {% if filter_status == '0' %} 98 99 100 101 102 103 104 105 106 107 <option value="0" selected="selected">{{ text_disabled }}</option> 108 109 110 111 112 113 114 115 116 117 {% else %} 118 119 120 121 122 123 124 125 126 127 <option value="0">{{ text_disabled }}</option> 128 129 {% endif %} 130 131 </select> 132 </div> 133 <div class="form-group"> 134 <label class="control-label" for="input-date-added">{{ entry_date_added }}</label> 135 <div class="input-group date"> 136 <input type="text" name="filter_date_added" value="{{ filter_date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD" id="input-date-added" class="form-control" /> 137 <span class="input-group-btn"> 138 <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button> 139 </span></div> 140 </div> 141 <div class="form-group text-right"> 142 <button type="button" id="button-filter" class="btn btn-default"><i class="fa fa-filter"></i> {{ button_filter }}</button> 143 </div> 144 </div> 145 </div> 146 </div> 147 <div class="col-md-9 col-md-pull-3 col-sm-12"> 148 <div class="panel panel-default"> 149 <div class="panel-heading"> 150 <h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3> 151 </div> 152 <div class="panel-body"> 153 <form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-review"> 154 <div class="table-responsive"> 155 <table class="table table-bordered table-hover"> 156 <thead> 157 <tr> 158 <td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td> 159 <td class="text-left">{% if sort == 'pd.name' %} <a href="{{ sort_product }}" class="{{ order|lower }}">{{ column_product }}</a> {% else %} <a href="{{ sort_product }}">{{ column_product }}</a> {% endif %}</td> 160 <td class="text-left">{% if sort == 'r.author' %} <a href="{{ sort_author }}" class="{{ order|lower }}">{{ column_author }}</a> {% else %} <a href="{{ sort_author }}">{{ column_author }}</a> {% endif %}</td> 161 <td class="text-right">{% if sort == 'r.rating' %} <a href="{{ sort_rating }}" class="{{ order|lower }}">{{ column_rating }}</a> {% else %} <a href="{{ sort_rating }}">{{ column_rating }}</a> {% endif %}</td> 162 <td class="text-left">{% if sort == 'r.status' %} <a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a> {% else %} <a href="{{ sort_status }}">{{ column_status }}</a> {% endif %}</td> 163 <td class="text-left">{% if sort == 'r.date_added' %} <a href="{{ sort_date_added }}" class="{{ order|lower }}">{{ column_date_added }}</a> {% else %} <a href="{{ sort_date_added }}">{{ column_date_added }}</a> {% endif %}</td> 164 <td class="text-right">{{ column_action }}</td> 165 </tr> 166 </thead> 167 <tbody> 168 169 {% if reviews %} 170 {% for review in reviews %} 171 <tr> 172 <td class="text-center">{% if review.review_id in selected %} 173 <input type="checkbox" name="selected[]" value="{{ review.review_id }}" checked="checked" /> 174 {% else %} 175 <input type="checkbox" name="selected[]" value="{{ review.review_id }}" /> 176 {% endif %}</td> 177 <td class="text-left">{{ review.name }}</td> 178 <td class="text-left">{{ review.author }}</td> 179 <td class="text-right">{{ review.rating }}</td> 180 <td class="text-left">{{ review.status }}</td> 181 <td class="text-left">{{ review.date_added }}</td> 182 <td class="text-right"><a href="{{ review.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td> 183 </tr> 184 {% endfor %} 185 {% else %} 186 <tr> 187 <td class="text-center" colspan="7">{{ text_no_results }}</td> 188 </tr> 189 {% endif %} 190 </tbody> 191 192 </table> 193 </div> 194 </form> 195 <div class="row"> 196 <div class="col-sm-6 text-left">{{ pagination }}</div> 197 <div class="col-sm-6 text-right">{{ results }}</div> 198 </div> 199 </div> 200 </div> 201 </div> 202 </div> 203 </div> 204 <script type="text/javascript"><!-- 205 $('#button-filter').on('click', function() { 206 url = 'index.php?route=catalog/review&user_token={{ user_token }}'; 207 208 var filter_product = $('input[name=\'filter_product\']').val(); 209 210 if (filter_product) { 211 url += '&filter_product=' + encodeURIComponent(filter_product); 212 } 213 214 var filter_author = $('input[name=\'filter_author\']').val(); 215 216 if (filter_author) { 217 url += '&filter_author=' + encodeURIComponent(filter_author); 218 } 219 220 var filter_status = $('select[name=\'filter_status\']').val(); 221 222 if (filter_status !== '') { 223 url += '&filter_status=' + encodeURIComponent(filter_status); 224 } 225 226 var filter_date_added = $('input[name=\'filter_date_added\']').val(); 227 228 if (filter_date_added) { 229 url += '&filter_date_added=' + encodeURIComponent(filter_date_added); 230 } 231 232 location = url; 233 }); 234 //--></script> 235 <script type="text/javascript"><!-- 236 $('.date').datetimepicker({ 237 language: '{{ datepicker }}', 238 pickTime: false 239 }); 240 //--></script></div> 241 {{ footer }}