ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.assFileUploadFileTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once('./Services/Table/classes/class.ilTable2GUI.php');
5 
16 {
24  public function __construct($a_parent_obj, $a_parent_cmd, $formname = 'test_output')
25  {
26  global $lng,$ilCtrl;
27 
28  $this->lng = $lng;
29  $this->ctrl = $ilCtrl;
30 
31  parent::__construct($a_parent_obj, $a_parent_cmd);
32 
33  $this->setFormName($formname);
34  $this->setStyle('table', 'std');
35  $this->addColumn('','f','1%');
36  $this->addColumn($this->lng->txt('filename'),'filename', '70%');
37  $this->addColumn($this->lng->txt('date'),'date', '29%');
38  $this->setDisplayAsBlock(true);
39 
40  $this->setPrefix('deletefiles');
41  $this->setSelectAllCheckbox('deletefiles');
42 
43  $this->addCommandButton($a_parent_cmd, $this->lng->txt('delete'));
44  $this->setRowTemplate("tpl.il_as_qpl_fileupload_file_row.html", "Modules/TestQuestionPool");
45 
46  $this->disable('sort');
47  $this->disable('linkbar');
48  $this->enable('header');
49  $this->enable('select_all');
50  }
51 
59  public function fillRow($a_set)
60  {
61  global $ilUser,$ilAccess;
62 
63  $this->tpl->setVariable('VAL_ID', $a_set['solution_id']);
64  if (strlen($a_set['webpath']))
65  {
66  $this->tpl->setVariable('VAL_FILE', '<a href="' . $a_set['webpath'] . $a_set['value1'] . '" target=\"_blank\">' . ilUtil::prepareFormOutput($a_set['value2']) . '</a>');
67  }
68  else
69  {
70  $this->tpl->setVariable('VAL_FILE', ilUtil::prepareFormOutput($a_set['value2']));
71  }
73  $this->tpl->setVariable('VAL_DATE', ilDatePresentation::formatDate(new ilDateTime($a_set["tstamp"],IL_CAL_UNIX)));
74  }
75 
76 }
77 ?>