ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjBibliographicAdminTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 require_once("./Services/Table/classes/class.ilTable2GUI.php");
4 require_once("./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
5 
16 
20  protected $gui = NULL;
21 
22 
32  public function __construct(ilObjBibliographicAdminLibrariesGUI $parent_gui, $cmd) {
33  global $lng, $ilCtrl;
34 
35  parent::__construct($parent_gui, $cmd);
36  $this->gui = $parent_gui;
37  $this->setTitle($lng->txt('bibl_settings_libraries'));
38  $this->setId('bibl_libraries_tbl');
39  $this->addColumn($lng->txt('bibl_library_name'), '', '30%');
40  $this->addColumn($lng->txt('bibl_library_url'), '' . '30%');
41  $this->addColumn($lng->txt('bibl_library_img'), '', '30%');
42  $this->addColumn($lng->txt('actions'), '', '8%');
43  $this->setEnableNumInfo(false);
44  $this->setFormAction($ilCtrl->getFormAction($parent_gui));
45  $this->setRowTemplate('tpl.bibl_settings_lib_list_row.html', 'Modules/Bibliographic');
46  }
47 
48 
56  public function fillRow($a_set) {
57  global $ilCtrl;
58  $this->tpl->setVariable('VAL_LIBRARY_NAME', $a_set['name']);
59  $this->tpl->setVariable('VAL_LIBRARY_URL', $a_set['url']);
60  $this->tpl->setVariable('VAL_LIBRARY_IMG', $a_set['img']);
61  $current_selection_list = new ilAdvancedSelectionListGUI();
62  $current_selection_list->setListTitle($this->lng->txt("actions"));
63  $current_selection_list->setId($a_set['id']);
64  $current_selection_list->addItem($this->lng->txt("edit"), "", $ilCtrl->getLinkTarget($this->gui, 'edit') . "&lib_id=" . $a_set['id']);
65  $current_selection_list->addItem($this->lng->txt("delete"), "", $ilCtrl->getLinkTarget($this->gui, 'delete') . "&lib_id=" . $a_set['id']);
66  $this->tpl->setVariable('VAL_ACTIONS', $current_selection_list->getHTML());
67  }
68 }