ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 $DIC;
34  $lng = $DIC['lng'];
35  $ilCtrl = $DIC['ilCtrl'];
36 
37  parent::__construct($parent_gui, $cmd);
38  $this->gui = $parent_gui;
39  $this->setTitle($lng->txt('bibl_settings_libraries'));
40  $this->setId('bibl_libraries_tbl');
41  $this->addColumn($lng->txt('bibl_library_name'), '', '30%');
42  $this->addColumn($lng->txt('bibl_library_url'), '' . '30%');
43  $this->addColumn($lng->txt('bibl_library_img'), '', '30%');
44  $this->addColumn($lng->txt('actions'), '', '8%');
45  $this->setEnableNumInfo(false);
46  $this->setFormAction($ilCtrl->getFormAction($parent_gui));
47  $this->setRowTemplate('tpl.bibl_settings_lib_list_row.html', 'Modules/Bibliographic');
48  }
49 
50 
58  public function fillRow($a_set) {
59  global $DIC;
60  $ilCtrl = $DIC['ilCtrl'];
61  $this->tpl->setVariable('VAL_LIBRARY_NAME', $a_set['name']);
62  $this->tpl->setVariable('VAL_LIBRARY_URL', $a_set['url']);
63  $this->tpl->setVariable('VAL_LIBRARY_IMG', $a_set['img']);
64  $current_selection_list = new ilAdvancedSelectionListGUI();
65  $current_selection_list->setListTitle($this->lng->txt("actions"));
66  $current_selection_list->setId($a_set['id']);
67  $current_selection_list->addItem($this->lng->txt("edit"), "", $ilCtrl->getLinkTarget($this->gui, 'edit') . "&lib_id=" . $a_set['id']);
68  $current_selection_list->addItem($this->lng->txt("delete"), "", $ilCtrl->getLinkTarget($this->gui, 'delete') . "&lib_id=" . $a_set['id']);
69  $this->tpl->setVariable('VAL_ACTIONS', $current_selection_list->getHTML());
70  }
71 }
setEnableNumInfo($a_val)
Set enable num info.
$cmd
Definition: sahs_server.php:35
__construct(ilObjBibliographicAdminLibrariesGUI $parent_gui, $cmd)
Constructor.
Bibliographic ilObjBibliographicAdminTableGUI.
setId($a_val)
Set id.
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $lng
Definition: privfeed.php:17
global $DIC
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
fillRow($a_set)
Fills table rows with content from $a_set.