• Main Page
  • Related Pages
  • 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         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00024 
00035 require_once "./classes/class.ilObjectGUIAdapter.php";
00036 
00037 class ilObjChatGUIAdapter extends ilObjectGUIAdapter
00038 {
00043         function ilObjChatGUIAdapter($a_ref_id,$a_cmd = '')
00044         {
00045                 define("ILIAS_MODULE","chat");
00046 
00047                 parent::ilObjectGUIAdapter($a_ref_id,true,false,$a_cmd);
00048                 $this->gui_obj->setTabTargetScript("chat_rep.php");
00049                 $this->gui_obj->setInModule(true);
00050                 $this->gui_obj->setTargetScript("chat_rep.php");
00051                 $this->__setStyleSheetLocation();
00052                 $this->__setReturnLocation();
00053                 $this->__setFormAction();
00054                 $this->__prepareOutput();
00055 
00056                 // FINALLY PERFORM ACTION
00057                 $this->performAction();
00058         }
00059 
00060         
00061         // PRIVATE METHODS
00062         function __prepareOutput()
00063         {
00064                 $this->tpl->addBlockFile("CONTENT", "content", "tpl.chat.html",true);
00065                 $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
00066 
00067                 $title = $this->gui_obj->object->getTitle();
00068 
00069                 // catch feedback message
00070                 sendInfo();
00071 
00072                 if (!empty($title))
00073                 {
00074                         $this->tpl->setVariable("HEADER", $title);
00075                 }
00076 
00077                 $this->setAdminTabs();
00078                 $this->__showLocator();
00079         }
00080 
00081         function __setReturnLocation()
00082         {
00083                 
00084                 $this->gui_obj->setReturnLocation("permSave","chat_rep.php?cmd=perm&ref_id=".$this->getId());
00085                 $this->gui_obj->setReturnLocation("addRole","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("cancel","chat_rep.php?cmd=view&ref_id=".$this->getId());
00088                 $this->gui_obj->setReturnLocation("update","chat_rep.php?cmd=edit&ref_id=".$this->getId());
00089                 $this->gui_obj->setReturnLocation("uploadFile","chat_rep.php?cmd=edit&ref_id=".$this->getId());
00090                 $this->gui_obj->setReturnLocation("members","chat_rep.php?cmd=members&ref_id=".$this->getId());
00091 
00092                 $this->gui_obj->setReturnLocation("view","chat_rep.php?ref_id=".$this->getId());
00093                 $this->gui_obj->setReturnLocation("save","chat_rep.php?cmd=view&ref_id=".$current_ref_id);
00094                 $this->gui_obj->setReturnLocation("cut","chat_rep.php?cmd=view&ref_id=".$this->getId());
00095                 $this->gui_obj->setReturnLocation("clear","chat_rep.php?cmd=view&ref_id=".$this->getId());
00096                 $this->gui_obj->setReturnLocation("copy","chat_rep.php?cmd=view&ref_id=".$this->getId());
00097                 $this->gui_obj->setReturnLocation("link","chat_rep.php?cmd=view&ref_id=".$this->getId());
00098                 $this->gui_obj->setReturnLocation("paste","chat_rep.php?cmd=view&ref_id=".$this->getId());
00099                 $this->gui_obj->setReturnLocation("cancelDelete","chat_rep.php?cmd=view&ref_id=".$this->getId());
00100                 $this->gui_obj->setReturnLocation("confirmedDelete","chat_rep.php?cmd=view&ref_id=".$this->getId());
00101                 $this->gui_obj->setReturnLocation("removeFromSystem","chat_rep.php?cmd=view&ref_id=".$this->getId());
00102                 $this->gui_obj->setReturnLocation("undelete","chat_rep.php?cmd=view&ref_id=".$this->getId());
00103         }
00104 
00105         function __setFormAction()
00106         {
00107                 $this->gui_obj->setFormAction("update","chat_rep.php?cmd=gateway&ref_id=".$this->getId());
00108                 $this->gui_obj->setFormAction("gateway","chat_rep.php?cmd=gateway&ref_id=".$this->getId());
00109                 $this->gui_obj->setFormAction("permSave","chat_rep.php?cmd=permSave&ref_id=".$this->getId());
00110                 $this->gui_obj->setFormAction("addRole","chat_rep.php?cmd=addRole&ref_id=".$this->getId());
00111                 $this->gui_obj->setFormAction("updateMembers","chat_rep.php?cmd=updateMembers&ref_id=".$this->getId());
00112                 $this->gui_obj->setFormAction("newMembers","chat_rep.php?cmd=newMembers&ref_id=".$this->getId());
00113                 $this->gui_obj->setFormAction("downloadFile","chat_rep.php?cmd=downloadFile&ref_id=".$this->getId());
00114         }
00115         function __showLocator()
00116         {
00117                 $path_info = $this->gui_obj->tree->getPathFull($this->getId());
00118 
00119                 $this->tpl->addBlockFile("LOCATOR","locator","tpl.locator.html");
00120 
00121                 $this->tpl->setCurrentBlock("locator_item");
00122                 $this->tpl->setVariable("LINK_ITEM","../repository.php");
00123                 $this->tpl->setVariable("ITEM",$this->lng->txt("repository"));
00124                 $this->tpl->parseCurrentBlock();
00125 
00126                 $repository_link = true;
00127                 for($i = 1; $i < count($path_info); ++$i)
00128                 {
00129                         if($path_info[$i]["child"] == $this->getId())
00130                         {
00131                                 $repository_link = false;
00132                         }
00133                         $this->tpl->touchBlock("locator_separator_prefix");
00134                         $this->tpl->setCurrentBlock("locator_item");
00135                         if($repository_link)
00136                         {
00137                                 $this->tpl->setVariable("LINK_ITEM","../repository.php?ref_id=".$path_info[$i]["child"]);
00138                         }
00139                         else
00140                         {
00141                                 $this->tpl->setVariable("LINK_ITEM","./chat_rep.php?ref_id=".$path_info[$i]["child"]);
00142                         }
00143                         $this->tpl->setVariable("ITEM",$path_info[$i]["title"]);
00144                         $this->tpl->parseCurrentBlock();
00145                 }
00146                 $this->tpl->setCurrentBlock("locator");
00147                 $this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
00148                 $this->tpl->parseCurrentBlock();
00149         }
00150 
00151         function __setStyleSheetLocation()
00152         {
00153                 $this->tpl->setCurrentBlock("ChatStyle");
00154                 $this->tpl->setVariable("LOCATION_CHAT_STYLESHEET",ilUtil::getStyleSheetLocation());
00155                 $this->tpl->parseCurrentBlock();
00156         }
00157                 
00158 } // END class.ilChatGUIAdapter
00159 ?>

Generated on Fri Dec 13 2013 09:06:33 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1