major rewrite of the web interface

This commit is contained in:
SJ
2012-09-06 15:27:20 +02:00
parent e3bd0b987a
commit 853c4ab4f1
88 changed files with 1707 additions and 3839 deletions

View File

@ -7,31 +7,16 @@ class ControllerSearchSearch extends Controller {
$this->id = "content";
$this->template = "search/search.tpl";
$this->layout = "common/layout-search";
$this->layout = "common/layout-new";
$request = Registry::get('request');
$db = Registry::get('db');
$this->load->model('search/search');
$this->document->title = $this->data['text_simple_search'];
$this->document->title = $this->data['text_search'];
$this->data['searchtype'] = 'simple';
if(isset($this->request->get['type'])) {
if($this->request->get['type'] == 'advanced') {
$this->template = "search/advanced.tpl";
$this->data['searchtype'] = 'advanced';
$this->document->title = $this->data['text_advanced_search'];
}
if($this->request->get['type'] == 'expert') {
$this->template = "search/expert.tpl";
$this->data['searchtype'] = 'expert';
$this->document->title = $this->data['text_expert_search'];
}
}
$this->data['searchtype'] = 'expert';
if(isset($this->request->post['searchterm'])) {
$this->fixup_post_request();
@ -63,30 +48,6 @@ class ControllerSearchSearch extends Controller {
if(isset($a['sort'])) { $this->data['sort'] = $a['sort']; }
if(isset($a['order'])) { $this->data['order'] = $a['order']; }
if(isset($a['f'])) {
foreach($a['f'] as $f) {
$val = array_shift($a['v']);
if($val == '') { continue; }
if($i == 0) {
$this->data['key0'] = 0;
if($f == 'from') { $this->data['key0'] = 0; }
else if($f == 'to') { $this->data['key0'] = 1; }
else if($f == 'subject') { $this->data['key0'] = 2; }
else if($f == 'body') { $this->data['key0'] = 3; }
$this->data['val0'] = $val;
}
else {
array_push($this->data['blocks'], array('key' => $f, 'val' => $val));
}
$i++;
}
}
if(isset($a['date1'])) { $this->data['date1'] = $a['date1']; }
if(isset($a['date2'])) { $this->data['date2'] = $a['date2']; }