ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
14 {
15 
19  protected $write_access = false;
23  protected $gui = null;
24 
25 
34  {
35  global $DIC;
36  $lng = $DIC['lng'];
37  $ilCtrl = $DIC['ilCtrl'];
38 
39  parent::__construct($parent_gui, $cmd);
40  $this->write_access = $write_access;
41  $this->gui = $parent_gui;
42  $this->setTitle($lng->txt('bibl_settings_libraries'));
43  $this->setId('bibl_libraries_tbl');
44  $this->addColumn($lng->txt('bibl_library_name'), '', '30%');
45  $this->addColumn($lng->txt('bibl_library_url'), '' . '30%');
46  $this->addColumn($lng->txt('bibl_library_img'), '', '30%');
47  $this->addColumn($lng->txt('actions'), '', '8%');
48  $this->setEnableNumInfo(false);
49  $this->setFormAction($ilCtrl->getFormAction($parent_gui));
50  $this->setRowTemplate('tpl.bibl_settings_lib_list_row.html', 'Modules/Bibliographic');
51  }
52 
53 
61  public function fillRow($a_set)
62  {
63  global $DIC;
64  $ilCtrl = $DIC['ilCtrl'];
65  $this->tpl->setVariable('VAL_LIBRARY_NAME', $a_set['name']);
66  $this->tpl->setVariable('VAL_LIBRARY_URL', $a_set['url']);
67  $this->tpl->setVariable('VAL_LIBRARY_IMG', $a_set['img']);
68  if ($this->write_access) {
69  $current_selection_list = new ilAdvancedSelectionListGUI();
70  $current_selection_list->setListTitle($this->lng->txt("actions"));
71  $current_selection_list->setId($a_set['id']);
72  $current_selection_list->addItem($this->lng->txt("edit"), "", $ilCtrl->getLinkTarget($this->gui, 'edit') . "&lib_id=" . $a_set['id']);
73  $current_selection_list->addItem($this->lng->txt("delete"), "", $ilCtrl->getLinkTarget($this->gui, 'delete') . "&lib_id=" . $a_set['id']);
74  $this->tpl->setVariable('VAL_ACTIONS', $current_selection_list->getHTML());
75  } else {
76  $this->tpl->setVariable('VAL_ACTIONS', "&nbsp;");
77  }
78  }
79 }
global $DIC
Definition: saml.php:7
setEnableNumInfo($a_val)
Set enable num info.
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.
__construct(ilObjBibliographicAdminLibrariesGUI $parent_gui, $cmd, $write_access)
Constructor.
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.
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.