ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjGlossaryListGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 
35 include_once "Services/Object/classes/class.ilObjectListGUI.php";
36 
38 {
44  {
45  $this->ilObjectListGUI();
46  }
47 
53  function init()
54  {
55  $this->static_link_enabled = true;
56  $this->delete_enabled = true;
57  $this->cut_enabled = true;
58  $this->copy_enabled = false;
59  $this->subscribe_enabled = true;
60  $this->link_enabled = true;
61  $this->payment_enabled = false;
62  $this->info_screen_enabled = true;
63  $this->type = "glo";
64  $this->gui_class_name = "ilobjglossarygui";
65 
66  // general commands array
67  include_once("./Modules/Glossary/classes/class.ilObjGlossaryAccess.php");
68  $this->commands = ilObjGlossaryAccess::_getCommands();
69  }
70 
80  function getCommandLink($a_cmd)
81  {
82  switch($a_cmd)
83  {
84  case "view":
85  $cmd_link = "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$this->ref_id;
86  break;
87 
88  case "edit":
89  $cmd_link = "ilias.php?baseClass=ilGlossaryEditorGUI&amp;ref_id=".$this->ref_id;
90  break;
91 
92  case "infoScreen":
93  $cmd_link = "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;cmd=infoScreen&amp;ref_id=".$this->ref_id;
94  break;
95 
96  default:
97  $cmd_link = "repository.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
98  break;
99  }
100 
101  return $cmd_link;
102  }
103 
111  function getCommandFrame($a_cmd)
112  {
113  global $ilias;
114 
115  switch($a_cmd)
116  {
117  case "view":
118  case "edit":
119  $frame = ilFrameTargetInfo::_getFrame("MainContent");
120  break;
121 
122  default:
123  $frame = "";
124  break;
125  }
126 
127  return $frame;
128  }
129 
130 
139  function getProperties()
140  {
141  global $lng, $rbacsystem;
142 
143  $props = array();
144 
145  include_once("./Modules/Glossary/classes/class.ilObjGlossaryAccess.php");
146 
147  if (!ilObjGlossaryAccess::_lookupOnline($this->obj_id))
148  {
149  $props[] = array("alert" => true, "property" => $lng->txt("status"),
150  "value" => $lng->txt("offline"));
151  }
152  return $props;
153  }
154 
155 
156 } // END class.ilObjCategoryGUI
157 ?>