ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilBiblLibraryTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12{
13 use \ILIAS\Modules\OrgUnit\ARHelper\DIC;
14
15
21 public function __construct(ilBiblLibraryGUI $parent_gui)
22 {
23 parent::__construct($parent_gui);
24 $this->setTitle($this->lng()->txt('bibl_settings_libraries'));
25 $this->setId('bibl_libraries_tbl');
26 $this->initColumns();
27 $this->setEnableNumInfo(false);
28 $this->setFormAction($this->ctrl()->getFormAction($parent_gui));
29 $this->setRowTemplate('tpl.bibl_settings_lib_list_row.html', 'Modules/Bibliographic');
30 }
31
32
36 public function fillRow($a_set)
37 {
38 $this->tpl->setVariable('VAL_LIBRARY_NAME', $a_set['name']);
39 $this->tpl->setVariable('VAL_LIBRARY_URL', $a_set['url']);
40 $this->tpl->setVariable('VAL_LIBRARY_IMG', $a_set['img']);
41
42 if ($this->checkPermissionBoolAndReturn('write')) {
43 $this->ctrl()->setParameter($this->parent_obj, ilBiblLibraryGUI::F_LIB_ID, $a_set['id']);
44 $current_selection_list = new ilAdvancedSelectionListGUI();
45 $current_selection_list->setListTitle($this->lng->txt("actions"));
46 $current_selection_list->setId($a_set['id']);
47 $current_selection_list->addItem(
48 $this->lng->txt(ilBiblLibraryGUI::CMD_EDIT),
49 "",
50 $this->ctrl()->getLinkTarget($this->parent_obj, ilBiblLibraryGUI::CMD_EDIT)
51 );
52 $current_selection_list->addItem(
53 $this->lng->txt(ilBiblLibraryGUI::CMD_DELETE),
54 "",
55 $this->ctrl()->getLinkTarget($this->parent_obj, ilBiblLibraryGUI::CMD_DELETE)
56 );
57 $this->tpl->setVariable('VAL_ACTIONS', $current_selection_list->getHTML());
58 } else {
59 $this->tpl->setVariable('VAL_ACTIONS', "&nbsp;");
60 }
61 }
62
63
64 protected function initColumns()
65 {
66 $this->addColumn($this->lng()->txt('bibl_library_name'), '', '30%');
67 $this->addColumn($this->lng()->txt('bibl_library_url'), '' . '30%');
68 $this->addColumn($this->lng()->txt('bibl_library_img'), '', '30%');
69 $this->addColumn($this->lng()->txt('actions'), '', '8%');
70 }
71}
An exception for terminatinating execution or to throw for unit testing.
User interface class for advanced drop-down selection lists.
Class ilBiblLibraryGUI.
Bibliographic ilBiblLibraryTableGUI.
__construct(ilBiblLibraryGUI $parent_gui)
ilObjBibliographicAdminTableGUI constructor.
Class ilTable2GUI.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
getFormAction()
Get Form action parameter.
setEnableNumInfo($a_val)
Set enable num info.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
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.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.