2 /***************************************************************
5 * (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
28 * Shows information about a database or file item
30 * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj
33 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
37 require ($BACK_PATH.'init.php');
38 require ($BACK_PATH.'template.php');
39 $LANG->includeLLFile('EXT:lang/locallang_show_rechis.xml');
40 require_once ('class.show_rechis.inc');
43 * Script Class for showing the history module of TYPO3s backend
45 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
48 * @see class.show_rechis.inc
50 class SC_show_rechis
{
56 * Document template object
63 * Initialize the module output
69 // Create internal template object:
70 $this->doc
= t3lib_div
::makeInstance('template');
71 $this->doc
->backPath
= $GLOBALS['BACK_PATH'];
72 $this->doc
->setModuleTemplate('templates/show_rechis.html');
74 // Start the page header:
75 $this->content
.= $this->doc
->header($GLOBALS['LANG']->getLL('title'));
79 * Generate module output
85 // Start history object
86 $historyObj = t3lib_div
::makeInstance('recordHistory');
89 $this->content
.= $historyObj->main();
91 // Setting up the buttons and markers for docheader
92 $docHeaderButtons = $this->getButtons();
93 $markers['CONTENT'] = $this->content
;
94 $markers['CSH'] = $docHeaderButtons['csh'];
96 // Build the <body> for the module
97 $this->content
= $this->doc
->startPage($GLOBALS['LANG']->getLL('title'));
98 $this->content
.= $this->doc
->moduleBody($this->pageinfo
, $docHeaderButtons, $markers);
102 * Outputting the accumulated content to screen
106 function printContent() {
107 $this->content
.= $this->doc
->endPage();
108 $this->content
= $this->doc
->insertStylesAndJS($this->content
);
113 * Create the panel of buttons for submitting the form or otherwise perform operations.
115 * @return array all available buttons as an assoc. array
117 protected function getButtons() {
124 $buttons['csh'] = t3lib_BEfunc
::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '', TRUE);
126 // Start history object
127 $historyObj = t3lib_div
::makeInstance('recordHistory');
129 if ($historyObj->returnUrl
) {
130 $buttons['back'] = '<a href="' . htmlspecialchars($historyObj->returnUrl
) . '" class="typo3-goBack">' . t3lib_iconWorks
::getSpriteIcon('actions-view-go-back') . '</a>';
138 $SOBE = t3lib_div
::makeInstance('SC_show_rechis');
141 $SOBE->printContent();