/[cvs]/nfo/php/libs/org.netfrag.app/YAA/NewsEdit.php
ViewVC logotype

Contents of /nfo/php/libs/org.netfrag.app/YAA/NewsEdit.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Fri Jan 21 16:51:42 2005 UTC (19 years, 5 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
+ changed lang-key for turkish

1 <?
2 /**
3 * This file contains the YAA_NewsEdit 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: NewsEdit.php,v 1.3 2004/11/18 12:28:54 jonen 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_NewsEdit 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::NewsEdit
45 *
46 *
47 */
48
49
50
51 class YAA_NewsEdit 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 $whichLanguage = $whichSub[1];
68
69 if ($whichSubtopic == 1 || $whichSubtopic == 2 || $whichSubtopic == 3 ) {
70 $editTextForm = new EditTextForm ('Upload new feed image', 600, $whichSubtopic, $whichLanguage, $this->_args[options]);
71 // $EditPageForm->set_cancel_action($_SERVER['PHP_SELF'] . "?t=News");
72 $content = new FormProcessor($editTextForm, 'editTextForm', '', "");
73 }
74 /* else {
75 $EditPageForm = new EditPageForm ('found items form ' . $whichSubtopic . ":", 600, $whichSubtopic, $_REQUEST['lang_show'], $_REQUEST['lang_set'], $_REQUEST['undone'], $this->_args[options]);
76 // $EditPageForm->set_cancel_action($_SERVER['PHP_SELF'] . "?t=News");
77 $content = new FormProcessor($EditPageForm, 'EditPageForm', '', "");
78
79 }*/
80 }
81
82 // the subtopic is passed from the VerticalCSSNavTable in Page_News - left_block()
83 // at first another VerticalCSSNavTable will be displayed, so that the language of the
84 // items can be selected.
85 // this second VerticalCSSNavTable keeps the subtopic as a part of the key, which will be
86 // passed as sub_lang
87 // the only exception is the news-admin, which is the EditTextForm, because there we have
88 // the additional option to select an image for the news.
89
90 if (!empty($subtopic))
91 {
92 switch ($subtopic) {
93 case 'upload':
94 $uploadForm = new UploadForm ('Upload new feed image', 600);
95 $content = new FormProcessor($uploadForm, 'UploadForm', '', "multipart/form-data");
96 break;
97 case 'edit_feed1':
98 case 'edit_feed2':
99 case 'edit_feed3':
100 $sub_de = substr($subtopic, 9, 1) . "*de";
101 $sub_en = substr($subtopic, 9, 1) . "*en";
102 $sub_tr = substr($subtopic, 9, 1) . "*tr";
103
104 $nav = array ($sub_de => "deutsch", $sub_en => "englisch", $sub_tr => "tuerkisch");
105 $comp = new VerticalCSSNavTable("Select Language", "", "100");
106 foreach ($nav as $subtopic => $label) {
107 $comp->add("?t=News&sub_lang=$subtopic", $label, "Untergruppe $label ($subtopic) anzeigen");
108 }
109 $content = $comp->render();
110 break;
111 /*
112 case 'searchKey':
113 $languages = array("deutsch"=>"de", "englisch"=>"en", "tuerkisch"=>"tr");
114 $myForm = html_form("specify", $_SERVER['PHP_SELF'] . "?t=News" . "&sub_lang=" . $subtopic, "POST");
115 $table = html_table(400, 0, 2);
116 $table->add_row("translate from:", form_select("lang_show", $languages));
117 $table->add_row(" to:", form_select("lang_set", $languages));
118 $table->add_row("only not translated :", form_radio("undone", "yes"));
119 $table->add_row(" all :", form_radio("undone", "no", array("checked"=>"checked")));
120 $table->add_row("enter search-key :", form_text("sub_lang"));
121 $table->add_row("submit :", form_submit("submit", "submit"));
122 $myForm->add($table);
123 $content = $myForm;
124
125
126 break;
127 default:
128 $languages = array("deutsch"=>"de", "englisch"=>"en", "tuerkisch"=>"tr");
129 $myForm = html_form("specify", $_SERVER['PHP_SELF'] . "?t=News" . "&sub_lang=" . $subtopic, "POST");
130 $table = html_table(400, 0, 2);
131 $table->add_row("translate from:", form_select("lang_show", $languages));
132 $table->add_row(" to:", form_select("lang_set", $languages));
133 $table->add_row("only not translated :", form_radio("undone", "yes"));
134 $table->add_row(" all :", form_radio("undone", "no", array("checked"=>"checked")));
135 $table->add_row("submit :", form_submit("submit", "submit"));
136 $myForm->add($table);
137
138 $content = $myForm;*/
139 }
140 }
141 $this->_gui_object = &$content;
142 }
143
144 }
145
146
147 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed