1 |
<? |
2 |
/** |
3 |
* This file contains the YAA_TranslateEdit child class, it inherits |
4 |
* from the WebExplorer_Module_AbstractNavigationList. |
5 |
* |
6 |
* @author Udo Loeb <udo@rotamente.com> |
7 |
* @author Sebastian Utz <seut@rotamente.com> |
8 |
* @package org.netfrag.app |
9 |
* @name YAA::NewsEdit |
10 |
* |
11 |
*/ |
12 |
|
13 |
/** |
14 |
* Cvs-Log: |
15 |
* |
16 |
* $Id: TranslateEdit.php,v 1.1 2003/12/15 21:08:11 udo Exp $ |
17 |
* |
18 |
* |
19 |
*/ |
20 |
|
21 |
/** |
22 |
* This requires the WebExplorer::Module::DataList |
23 |
* component as base class. |
24 |
* |
25 |
*/ |
26 |
loadModule('WebExplorer::Module::DataList'); |
27 |
|
28 |
/** |
29 |
* The YAA_TranslateEdit child class inherits from a WebExplorer |
30 |
* component to ensure querying against known api/infrastructure. |
31 |
* This could also be decoupled later. |
32 |
* |
33 |
* |
34 |
* |
35 |
* @copyright (c) 2003 - All Rights reserved. |
36 |
* |
37 |
* @link http://www.gnu.org/licenses/lgpl.txt |
38 |
* @license GNU LGPL (GNU Lesser General Public License) |
39 |
* |
40 |
* |
41 |
* @author Udo Loeb <udo@rotamente.com> |
42 |
* @author Sebastian Utz <seut@rotamente.com> |
43 |
* @package org.netfrag.app |
44 |
* @name YAA::TranslateEdit |
45 |
* |
46 |
* |
47 |
*/ |
48 |
|
49 |
|
50 |
|
51 |
class YAA_TranslateEdit extends WebExplorer_Module_DataList { |
52 |
|
53 |
function set_gui_object() { |
54 |
|
55 |
$subtopic = $_REQUEST['subtopic']; |
56 |
|
57 |
if (!empty($_REQUEST['sub_lang'])) { |
58 |
$sub_lang = $_REQUEST['sub_lang'] . "*" . $_REQUEST['lang_show']; |
59 |
} |
60 |
|
61 |
$main = html_div(); |
62 |
|
63 |
if (!empty($sub_lang)) { |
64 |
$whichSub = array(); |
65 |
$whichSub = explode("*", $sub_lang); |
66 |
$whichSubtopic = $whichSub[0]; |
67 |
$EditPageForm = new EditPageForm ('found items form ' . $whichSubtopic . ":", 600, $whichSubtopic, $_REQUEST['lang_show'], $_REQUEST['lang_set'], $_REQUEST['undone'], $this->_args[options]); |
68 |
$content = new FormProcessor($EditPageForm, 'EditPageForm', '', ""); |
69 |
} |
70 |
|
71 |
// the subtopic is passed from the VerticalCSSNavTable in Page_Translate - left_block() |
72 |
// at first another VerticalCSSNavTable will be displayed, so that the language of the |
73 |
// items can be selected. |
74 |
// this second VerticalCSSNavTable keeps the subtopic as a part of the key, which will be |
75 |
// passed as sub_lang |
76 |
|
77 |
|
78 |
|
79 |
if (!empty($subtopic)) { |
80 |
$languages = array("deutsch"=>"de", "englisch"=>"en", "tuerkisch"=>"tur"); |
81 |
$myForm = html_form("specify", $_SERVER['PHP_SELF'] . "?t=Translate" . "&sub_lang=" . $subtopic, "POST"); |
82 |
$table = html_table(400, 0, 2); |
83 |
$table->add_row("translate from:", form_select("lang_show", $languages)); |
84 |
$table->add_row(" to:", form_select("lang_set", $languages)); |
85 |
$table->add_row("only not translated :", form_radio("undone", "yes")); |
86 |
$table->add_row(" all :", form_radio("undone", "no", array("checked"=>"checked"))); |
87 |
|
88 |
if ($subtopic == "searchKey") { |
89 |
$table->add_row("enter search-key :", form_text("sub_lang")); |
90 |
} |
91 |
$table->add_row("submit :", form_submit("submit", "submit")); |
92 |
$myForm->add($table); |
93 |
|
94 |
$content = $myForm; |
95 |
} |
96 |
$this->_gui_object = &$content; |
97 |
} |
98 |
|
99 |
} |
100 |
|
101 |
|
102 |
?> |