Many fixes and features

This commit is contained in:
Antonio de la Rosa 2016-01-03 23:22:44 +01:00
parent 076feab6d1
commit f63765c066
7 changed files with 24 additions and 13 deletions

View file

@ -137,7 +137,7 @@ class SimpleList:
if self.search_field!='' and self.search_text!='':
self.model.conditions[0]+=' AND '+self.search_field+' LIKE %s'
self.model.conditions[1]=['%'+self.search_text+'%']
self.model.conditions[1].append('%'+self.search_text+'%')
pass
@ -158,6 +158,8 @@ class SimpleList:
self.obtain_field_search()
self.model.yes_reset_conditions=False
self.search()
total_elements=self.model.select_count()
@ -178,5 +180,7 @@ class SimpleList:
self.begin_page=str(self.begin_page)
self.model.yes_reset_conditions=True
return self.t.load_template('utils/list.phtml', simplelist=self, list=list_items, pages=pages)

View file

@ -39,7 +39,11 @@
% for row in list:
<tr class="row_list">
% for field in simplelist.fields_showed:
<td>${simplelist.model.fields[field].show_formatted(row[field])}</td>
% if simplelist.model.fields[field].escape==True:
<td>${simplelist.model.fields[field].show_formatted(row[field])}</td>
% else:
<td>${simplelist.model.fields[field].show_formatted(row[field])|n}</td>
% endif
% endfor
% for extra_field_func in simplelist.arr_extra_options: