• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

chat/classes/class.ilObjChatGUIAdapter.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software        
00020          |
00021         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00022         +-----------------------------------------------------------------------------+
00023 */
00024 
00025 
00036 require_once "./classes/class.ilObjectGUIAdapter.php";
00037 
00038 class ilObjChatGUIAdapter extends ilObjectGUIAdapter
00039 {
00044         function ilObjChatGUIAdapter($a_ref_id,$a_cmd = '')
00045         {
00046                 define("ILIAS_MODULE","chat");
00047 
00048                 parent::ilObjectGUIAdapter($a_ref_id,true,false,$a_cmd);
00049                 $this->gui_obj->setTabTargetScript("chat_rep.php");
00050                 $this->gui_obj->setInModule(true);
00051                 $this->gui_obj->setTargetScript("chat_rep.php");
00052                 $this->__setStyleSheetLocation();
00053                 $this->__setReturnLocation();
00054                 $this->__setFormAction();
00055                 $this->__prepareOutput();
00056 
00057                 // FINALLY PERFORM ACTION
00058                 $this->performAction();
00059         }
00060 
00061         
00062         // PRIVATE METHODS
00063         function __prepareOutput()
00064         {
00065                 $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
00066                 $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
00067 
00068                 $title = $this->gui_obj->object->getTitle();
00069 
00070                 // catch feedback message
00071                 sendInfo();
00072 
00073                 if (!empty($title))
00074                 {
00075                         $this->tpl->setVariable("HEADER", $title);
00076                 }
00077 
00078                 $this->setAdminTabs();
00079                 $this->__showLocator();
00080         }
00081 
00082         function __setReturnLocation()
00083         {
00084                 
00085                 $this->gui_obj->setReturnLocation("permSave","chat_rep.php?cmd=perm&ref_id=".$this->getId());
00086                 $this->gui_obj->setReturnLocation("addRole","chat_rep.php?cmd=perm&ref_id=".$this->getId());
00087                 $this->gui_obj->setReturnLocation("addRole","chat_rep.php?cmd=perm&ref_id=".$this->getId());
00088                 $this->gui_obj->setReturnLocation("cancel","chat_rep.php?cmd=view&ref_id=".$this->getId());
00089                 $this->gui_obj->setReturnLocation("update","chat_rep.php?cmd=edit&ref_id=".$this->getId());
00090                 $this->gui_obj->setReturnLocation("uploadFile","chat_rep.php?cmd=edit&ref_id=".$this->getId());
00091                 $this->gui_obj->setReturnLocation("members","chat_rep.php?cmd=members&ref_id=".$this->getId());
00092 
00093                 $this->gui_obj->setReturnLocation("view","chat_rep.php?ref_id=".$this->getId());
00094                 $this->gui_obj->setReturnLocation("save","chat_rep.php?cmd=view&ref_id=".$current_ref_id);
00095                 $this->gui_obj->setReturnLocation("cut","chat_rep.php?cmd=view&ref_id=".$this->getId());
00096                 $this->gui_obj->setReturnLocation("clear","chat_rep.php?cmd=view&ref_id=".$this->getId());
00097                 $this->gui_obj->setReturnLocation("copy","chat_rep.php?cmd=view&ref_id=".$this->getId());
00098                 $this->gui_obj->setReturnLocation("link","chat_rep.php?cmd=view&ref_id=".$this->getId());
00099                 $this->gui_obj->setReturnLocation("paste","chat_rep.php?cmd=view&ref_id=".$this->getId());
00100                 $this->gui_obj->setReturnLocation("cancelDelete","chat_rep.php?cmd=view&ref_id=".$this->getId());
00101                 $this->gui_obj->setReturnLocation("confirmedDelete","chat_rep.php?cmd=view&ref_id=".$this->getId());
00102                 $this->gui_obj->setReturnLocation("removeFromSystem","chat_rep.php?cmd=view&ref_id=".$this->getId());
00103                 $this->gui_obj->setReturnLocation("undelete","chat_rep.php?cmd=view&ref_id=".$this->getId());
00104         }
00105 
00106         function __setFormAction()
00107         {
00108                 $this->gui_obj->setFormAction("update","chat_rep.php?cmd=gateway&ref_id=".$this->getId());
00109                 $this->gui_obj->setFormAction("gateway","chat_rep.php?cmd=gateway&ref_id=".$this->getId());
00110                 $this->gui_obj->setFormAction("permSave","chat_rep.php?cmd=permSave&ref_id=".$this->getId());
00111                 $this->gui_obj->setFormAction("addRole","chat_rep.php?cmd=addRole&ref_id=".$this->getId());
00112                 $this->gui_obj->setFormAction("updateMembers","chat_rep.php?cmd=updateMembers&ref_id=".$this->getId());
00113                 $this->gui_obj->setFormAction("newMembers","chat_rep.php?cmd=newMembers&ref_id=".$this->getId());
00114                 $this->gui_obj->setFormAction("downloadFile","chat_rep.php?cmd=downloadFile&ref_id=".$this->getId());
00115         }
00116         function __showLocator()
00117         {
00118                 $path_info = $this->gui_obj->tree->getPathFull($this->getId());
00119 
00120                 $this->tpl->addBlockFile("LOCATOR","locator","tpl.locator.html");
00121 
00122                 $this->tpl->setCurrentBlock("locator_item");
00123                 $this->tpl->setVariable("LINK_ITEM","../repository.php");
00124                 $this->tpl->setVariable("ITEM",$this->lng->txt("repository"));
00125                 $this->tpl->parseCurrentBlock();
00126 
00127                 $repository_link = true;
00128                 for($i = 1; $i < count($path_info); ++$i)
00129                 {
00130                         if($path_info[$i]["child"] == $this->getId())
00131                         {
00132                                 $repository_link = false;
00133                         }
00134                         $this->tpl->touchBlock("locator_separator_prefix");
00135                         $this->tpl->setCurrentBlock("locator_item");
00136                         if($repository_link)
00137                         {
00138                                 $this->tpl->setVariable("LINK_ITEM","../repository.php?ref_id=".$path_info[$i]["child"]);
00139                         }
00140                         else
00141                         {
00142                                 $this->tpl->setVariable("LINK_ITEM","./chat_rep.php?ref_id=".$path_info[$i]["child"]);
00143                         }
00144                         $this->tpl->setVariable("ITEM",$path_info[$i]["title"]);
00145                         $this->tpl->parseCurrentBlock();
00146                 }
00147                 $this->tpl->setCurrentBlock("locator");
00148                 $this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
00149                 $this->tpl->parseCurrentBlock();
00150         }
00151 
00152         function __setStyleSheetLocation()
00153         {
00154                 $this->tpl->setCurrentBlock("ChatStyle");
00155                 $this->tpl->setVariable("LOCATION_CHAT_STYLESHEET",ilUtil::getStyleSheetLocation());
00156                 $this->tpl->parseCurrentBlock();
00157         }
00158                 
00159 } // END class.ilChatGUIAdapter
00160 ?>

Generated on Fri Dec 13 2013 13:52:06 for ILIAS Release_3_7_x_branch .rev 46817 by  doxygen 1.7.1