@@ 599-633 (lines=35) @@ | ||
596 | /** |
|
597 | * View list of FTS parsers. |
|
598 | */ |
|
599 | public function doViewParsers($msg = '') |
|
600 | { |
|
601 | $conf = $this->conf; |
|
602 | $misc = $this->misc; |
|
603 | $lang = $this->lang; |
|
604 | $data = $misc->getDatabaseAccessor(); |
|
605 | ||
606 | $this->printTrail('schema'); |
|
607 | $this->printTabs('schema', 'fulltext'); |
|
608 | $this->printTabs('fulltext', 'ftsparsers'); |
|
609 | $this->printMsg($msg); |
|
610 | ||
611 | $parsers = $data->getFtsParsers(false); |
|
612 | ||
613 | $columns = [ |
|
614 | 'schema' => [ |
|
615 | 'title' => $lang['strschema'], |
|
616 | 'field' => Decorator::field('schema'), |
|
617 | ], |
|
618 | 'name' => [ |
|
619 | 'title' => $lang['strname'], |
|
620 | 'field' => Decorator::field('name'), |
|
621 | ], |
|
622 | 'comment' => [ |
|
623 | 'title' => $lang['strcomment'], |
|
624 | 'field' => Decorator::field('comment'), |
|
625 | ], |
|
626 | ]; |
|
627 | ||
628 | $actions = []; |
|
629 | ||
630 | echo $this->printTable($parsers, $columns, $actions, 'fulltext-viewparsers', $lang['strftsnoparsers']); |
|
631 | ||
632 | //TODO: navlink to "create parser" |
|
633 | } |
|
634 | ||
635 | /** |
|
636 | * View list of FTS dictionaries. |
@@ 39-71 (lines=33) @@ | ||
36 | /** |
|
37 | * Show default list of languages in the database. |
|
38 | */ |
|
39 | public function doDefault($msg = '') |
|
40 | { |
|
41 | $conf = $this->conf; |
|
42 | $misc = $this->misc; |
|
43 | $lang = $this->lang; |
|
44 | $data = $misc->getDatabaseAccessor(); |
|
45 | ||
46 | $this->printTrail('database'); |
|
47 | $this->printTabs('database', 'languages'); |
|
48 | $this->printMsg($msg); |
|
49 | ||
50 | $languages = $data->getLanguages(); |
|
51 | ||
52 | $columns = [ |
|
53 | 'language' => [ |
|
54 | 'title' => $lang['strname'], |
|
55 | 'field' => Decorator::field('lanname'), |
|
56 | ], |
|
57 | 'trusted' => [ |
|
58 | 'title' => $lang['strtrusted'], |
|
59 | 'field' => Decorator::field('lanpltrusted'), |
|
60 | 'type' => 'yesno', |
|
61 | ], |
|
62 | 'function' => [ |
|
63 | 'title' => $lang['strfunction'], |
|
64 | 'field' => Decorator::field('lanplcallf'), |
|
65 | ], |
|
66 | ]; |
|
67 | ||
68 | $actions = []; |
|
69 | ||
70 | echo $this->printTable($languages, $columns, $actions, 'languages-languages', $lang['strnolanguages']); |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * Generate XML for the browser tree. |