issue33291_nowhitespace.diff
| mod1/index.php (working copy) | ||
|---|---|---|
| 49 | 49 |
var $pageinfo; |
| 50 | 50 | |
| 51 | 51 |
/** |
| 52 |
* @var array Cache of the page details already fetched from the database |
|
| 53 |
*/ |
|
| 54 |
protected $pageDetails = array(); |
|
| 55 | ||
| 56 |
/** |
|
| 57 |
* @var array Cache of the language records already fetched from the database |
|
| 58 |
*/ |
|
| 59 |
protected $languageDetails = array(); |
|
| 60 | ||
| 61 |
/** |
|
| 52 | 62 |
* Initializes the Module |
| 53 | 63 |
* |
| 54 | 64 |
* @return void |
| 55 | 65 |
*/ |
| 56 |
function init() {
|
|
| 66 |
public function init() {
|
|
| 57 | 67 |
global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS; |
| 58 | 68 | |
| 59 | 69 |
parent::init(); |
| ... | ... | |
| 65 | 75 |
* |
| 66 | 76 |
* @return void |
| 67 | 77 |
*/ |
| 68 |
function main() {
|
|
| 69 |
global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS,$_EXTKEY; |
|
| 78 |
public function main() {
|
|
| 70 | 79 | |
| 71 |
// Draw the header. |
|
| 72 |
$this->doc = t3lib_div::makeInstance("bigDoc");
|
|
| 73 |
$this->doc->backPath = $BACK_PATH; |
|
| 80 |
// Get a template instance and load the template |
|
| 81 |
$this->doc = t3lib_div::makeInstance('template');
|
|
| 82 |
$this->doc->backPath = $GLOBALS['BACK_PATH']; |
|
| 83 |
// NOTE: this module uses the same template as the CM1 module |
|
| 84 |
$this->doc->setModuleTemplate(t3lib_extMgm::extPath('l10nmgr') . 'templates/cm1_template.html');
|
|
| 74 | 85 |
$this->doc->form = '<form action="" method="POST">'; |
| 86 |
// Load the styles and JavaScript for the tooltips |
|
| 87 |
$this->doc->addStyleSheet('tx_l10nmgr_module1', t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/jquery.tooltip.css');
|
|
| 88 |
$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/jquery-1.2.3.js');
|
|
| 89 |
$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/jquery.tooltip.js');
|
|
| 90 |
$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('l10nmgr') . 'templates/mod1_list.js');
|
|
| 75 | 91 | |
| 76 |
$configurationObjectsArray = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( |
|
| 92 |
// Get the actual content |
|
| 93 |
$this->content = $this->moduleContent(); |
|
| 94 |
$markers['CONTENT'] = $this->content; |
|
| 95 | ||
| 96 |
// Build the <body> for the module |
|
| 97 |
$docHeaderButtons = $this->getButtons(); |
|
| 98 |
$this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('general.title'));
|
|
| 99 |
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); |
|
| 100 |
$this->content .= $this->doc->endPage(); |
|
| 101 |
$this->content = $this->doc->insertStylesAndJS($this->content); |
|
| 102 |
} |
|
| 103 | ||
| 104 |
/** |
|
| 105 |
* Generates and returns the content of the module |
|
| 106 |
* |
|
| 107 |
* @return string HTML to display |
|
| 108 |
*/ |
|
| 109 |
protected function moduleContent() {
|
|
| 110 |
$content = ''; |
|
| 111 |
$content .= $this->doc->header($GLOBALS['LANG']->getLL('general.title'));
|
|
| 112 |
// Get the available configurations |
|
| 113 |
$l10nConfigurations = $this->getAllConfigurations(); |
|
| 114 |
// No configurations, issue a simple message |
|
| 115 |
if (count($l10nConfigurations) == 0) {
|
|
| 116 |
$content .= $this->doc->section('', nl2br($GLOBALS['LANG']->getLL('general.no_date')));
|
|
| 117 | ||
| 118 |
// List all configurations |
|
| 119 |
} else {
|
|
| 120 |
$content .= $this->doc->section('', nl2br($GLOBALS['LANG']->getLL('general.description.message')));
|
|
| 121 |
$content .= $this->doc->section($GLOBALS['LANG']->getLL('general.list.configuration.title'),'');
|
|
| 122 |
$content .= '<table class="typo3-dblist" border="0" cellpadding="0" cellspacing="0">'; |
|
| 123 |
// Assemble the header row |
|
| 124 |
$content .= '<thead>'; |
|
| 125 |
$content .= '<tr class="t3-row-header">'; |
|
| 126 |
$content .= '<td>' . $GLOBALS['LANG']->getLL('general.list.headline.info.title') . '</td>';
|
|
| 127 |
$content .= '<td>' . $GLOBALS['LANG']->getLL('general.list.headline.title.title') . '</td>';
|
|
| 128 |
$content .= '<td>' . $GLOBALS['LANG']->getLL('general.list.headline.path.title') . '</td>';
|
|
| 129 |
$content .= '<td>' . $GLOBALS['LANG']->getLL('general.list.headline.depth.title') . '</td>';
|
|
| 130 |
$content .= '<td>' . $GLOBALS['LANG']->getLL('general.list.headline.tables.title') . '</td>';
|
|
| 131 |
$content .= '<td>' . $GLOBALS['LANG']->getLL('general.list.headline.exclude.title') . '</td>';
|
|
| 132 |
$content .= '<td>' . $GLOBALS['LANG']->getLL('general.list.headline.include.title') . '</td>';
|
|
| 133 |
$content .= '<td>' . $GLOBALS['LANG']->getLL('general.list.headline.incfcewithdefaultlanguage.title') . '</td>';
|
|
| 134 |
$content .= '</tr>'; |
|
| 135 |
$content .= '</thead>'; |
|
| 136 |
$content .= '<tbody>'; |
|
| 137 |
$informationIcon = t3lib_iconWorks::getSpriteIcon('actions-document-info');
|
|
| 138 |
foreach ($l10nConfigurations as $record) {
|
|
| 139 |
$configurationDetails = '<a class="tooltip" href="#tooltip_' . $record['uid'] . '">' . $informationIcon . '</a>'; |
|
| 140 |
$configurationDetails .= '<div style="display:none;" id="tooltip_' . $record['uid'] . '" class="infotip">'; |
|
| 141 |
$configurationDetails .= $this->renderConfigurationDetails($record); |
|
| 142 |
$configurationDetails .= '</div>'; |
|
| 143 |
$content .= '<tr class="db_list_normal">'; |
|
| 144 |
$content .= '<td>' . $configurationDetails . '</td>'; |
|
| 145 |
$content .= '<td><a href="' . t3lib_div::resolveBackPath($this->doc->backPath .t3lib_extMgm::extRelPath('l10nmgr')) . 'cm1/index.php?id=' . $record['uid'] . '&srcPID=' . intval($this->id) . '">' . $record['title'] . '</a>' . '</td>';
|
|
| 146 |
// Get the full page path |
|
| 147 |
// If very long, make sure to still display the full path |
|
| 148 |
$pagePath = t3lib_BEfunc::getRecordPath($record['pid'], '1', 20, 50); |
|
| 149 |
$path = (is_array($pagePath)) ? $pagePath[1] : $pagePath; |
|
| 150 |
$content .= '<td>' . $path . '</td>'; |
|
| 151 |
$content .= '<td>' . $record['depth'] . '</td>'; |
|
| 152 |
$content .= '<td>' . $record['tablelist'] . '</td>'; |
|
| 153 |
$content .= '<td>' . $record['exclude'] . '</td>'; |
|
| 154 |
$content .= '<td>' . $record['include'] . '</td>'; |
|
| 155 |
$content .= '<td>' . $record['incfcewithdefaultlanguage'] . '</td>'; |
|
| 156 |
$content .= '</tr>'; |
|
| 157 |
} |
|
| 158 |
$content .= '</tbody>'; |
|
| 159 |
} |
|
| 160 |
return $content; |
|
| 161 |
} |
|
| 162 | ||
| 163 |
/** |
|
| 164 |
* Returns all l10nmgr configurations to which the current user has access, based on page permissions |
|
| 165 |
* |
|
| 166 |
* @return array List of l10nmgr configurations |
|
| 167 |
*/ |
|
| 168 |
protected function getAllConfigurations() {
|
|
| 169 |
// Read all l10nmgr configurations from the database |
|
| 170 |
$configurations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( |
|
| 77 | 171 |
'*', |
| 78 | 172 |
'tx_l10nmgr_cfg', |
| 79 | 173 |
'1=1'.t3lib_BEfunc::deleteClause('tx_l10nmgr_cfg')
|
| 80 | 174 |
); |
| 175 |
// Filter out the configurations which the user is allowed to see, base on the page access rights |
|
| 176 |
$pagePermissionsClause = $GLOBALS['BE_USER']->getPagePermsClause(1); |
|
| 177 |
$allowedConfigurations = array(); |
|
| 178 |
foreach ($configurations as $row) {
|
|
| 179 |
if (t3lib_BEfunc::readPageAccess($row['pid'], $pagePermissionsClause) !== FALSE) {
|
|
| 180 |
$allowedConfigurations[] = $row; |
|
| 181 |
} |
|
| 182 |
} |
|
| 183 |
return $allowedConfigurations; |
|
| 184 |
} |
|
| 81 | 185 | |
| 82 |
// JavaScript |
|
| 83 |
$this->doc->JScode = ' |
|
| 84 |
<link rel="stylesheet" type="text/css" href="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'templates/mod1_list.css') . '" />
|
|
| 85 |
<link rel="stylesheet" type="text/css" href="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/jquery.tooltip.css') . '" />
|
|
| 86 |
<script language="javascript" type="text/javascript" src="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/webtoolkit.scrollabletable.js') . '"></script>
|
|
| 87 |
<script language="javascript" type="text/javascript" src="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/jquery-1.2.3.js') . '"></script>
|
|
| 88 |
<script language="javascript" type="text/javascript" src="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/jquery.scrollable.js') . '"></script>
|
|
| 89 |
<script language="javascript" type="text/javascript" src="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/jquery.dimensions.js') . '"></script>
|
|
| 90 |
<script language="javascript" type="text/javascript" src="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/jquery.tooltip.js') . '"></script>
|
|
| 91 |
<script language="javascript" type="text/javascript" src="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'templates/mod1_list.js') . '"></script>
|
|
| 92 |
'; |
|
| 93 |
$Template = t3lib_div::makeInstance('tx_l10nmgr_template',
|
|
| 94 |
$configurationObjectsArray, |
|
| 95 |
t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'templates/mod1_list.php')
|
|
| 96 |
); |
|
| 97 |
$Template->setDocument($this->doc); |
|
| 98 |
$Template->setPageId($this->id); |
|
| 99 |
$this->content = $Template->render(); |
|
| 186 |
/** |
|
| 187 |
* Renders a detailed view of a l10nmgr configuration |
|
| 188 |
* |
|
| 189 |
* @param array $configuration A configuration record from the database |
|
| 190 |
* @return string The HTML to display |
|
| 191 |
*/ |
|
| 192 |
protected function renderConfigurationDetails($configuration) {
|
|
| 193 |
$parentPageArray = $this->getPageDetails($configuration['pid']); |
|
| 194 |
$languageArray = $this->getPageDetails($configuration['sourceLangStaticId']); |
|
| 195 |
$details = ''; |
|
| 196 |
$details .= '<table class="typo3-dblist" border="0" cellspacing="0" cellpadding="0">'; |
|
| 197 |
$details .= '<tr>'; |
|
| 198 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.pid.title') . '</td>';
|
|
| 199 |
$details .= '<td>' . $parentPageArray['title'] . ' (' . $parentPageArray['uid'] . ')</td>';
|
|
| 200 |
$details .= '</tr><tr class="db_list_normal">'; |
|
| 201 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.title.title') . '</td>';
|
|
| 202 |
$details .= '<td>' . $configuration['title'] . '</td>'; |
|
| 203 |
$details .= '</tr><tr class="db_list_normal">'; |
|
| 204 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.filenameprefix.title') . '</td>';
|
|
| 205 |
$details .= '<td>' . $configuration['filenameprefix'] . '</td>'; |
|
| 206 |
$details .= '</tr><tr class="db_list_normal">'; |
|
| 207 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.depth.title') . '</td>';
|
|
| 208 |
$details .= '<td>' . $configuration['depth'] . '</td>'; |
|
| 209 |
$details .= '</tr><tr class="db_list_normal">'; |
|
| 210 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.sourceLangStaticId.title') . '</td>';
|
|
| 211 |
$details .= '<td>' . ((empty($languageArray['lg_name_en'])) ? $GLOBALS['LANG']->getLL('general.list.infodetail.default') : $languageArray['lg_name_en']) . '</td>';
|
|
| 212 |
$details .= '</tr><tr class="db_list_normal">'; |
|
| 213 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.tablelist.title') . '</td>';
|
|
| 214 |
$details .= '<td>' . $configuration['tablelist'] . '</td>'; |
|
| 215 |
$details .= '</tr><tr class="db_list_normal">'; |
|
| 216 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.exclude.title') . '</td>';
|
|
| 217 |
$details .= '<td>' . $configuration['exclude'] . '</td>'; |
|
| 218 |
$details .= '</tr><tr class="db_list_normal">'; |
|
| 219 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.include.title') . '</td>';
|
|
| 220 |
$details .= '<td>' . $configuration['include'] . '</td>'; |
|
| 221 |
$details .= '</tr><tr class="db_list_normal">'; |
|
| 222 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.displaymode.title') . '</td>';
|
|
| 223 |
$details .= '<td>' . $configuration['displaymode'] . '</td>'; |
|
| 224 |
$details .= '</tr><tr class="db_list_normal">'; |
|
| 225 |
$details .= '<td>' . $GLOBALS['LANG']->getLL('general.list.infodetail.incfcewithdefaultlanguage.title') . '</td>';
|
|
| 226 |
$details .= '<td>' . $configuration['incfcewithdefaultlanguage'] . '</td>'; |
|
| 227 |
$details .= '</tr>'; |
|
| 228 |
$details .= '</table>'; |
|
| 229 |
return $details; |
|
| 100 | 230 |
} |
| 101 | 231 | |
| 102 | 232 |
/** |
| 233 |
* Returns the details of a given page record, possibly from cache if already fetched earlier |
|
| 234 |
* |
|
| 235 |
* @param int $uid Id of a page |
|
| 236 |
* @return array Page record from the database |
|
| 237 |
*/ |
|
| 238 |
protected function getPageDetails($uid) {
|
|
| 239 |
$uid = intval($uid); |
|
| 240 |
if (isset($this->pageDetails[$uid])) {
|
|
| 241 |
$record = $this->pageDetails[$uid]; |
|
| 242 |
} else {
|
|
| 243 |
$record = t3lib_BEfunc::getRecord('pages', $uid);
|
|
| 244 |
$this->pageDetails[$uid] = $record; |
|
| 245 |
} |
|
| 246 |
return $record; |
|
| 247 |
} |
|
| 248 | ||
| 249 |
/** |
|
| 250 |
* Returns the details of a given static language record, possibly from cache if already fetched earlier |
|
| 251 |
* |
|
| 252 |
* @param int $uid Id of a language |
|
| 253 |
* @return array Language record from the database |
|
| 254 |
*/ |
|
| 255 |
protected function getLanguageDetails($uid) {
|
|
| 256 |
$record = array(); |
|
| 257 |
$uid = intval($uid); |
|
| 258 |
if ($uid > 0) {
|
|
| 259 |
if (isset($this->languageDetails[$uid])) {
|
|
| 260 |
$record = $this->languageDetails[$uid]; |
|
| 261 |
} else {
|
|
| 262 |
$record = t3lib_BEfunc::getRecord('static_languages', $uid);
|
|
| 263 |
$this->languageDetails[$uid] = $record; |
|
| 264 |
} |
|
| 265 |
} |
|
| 266 |
return $record; |
|
| 267 |
} |
|
| 268 | ||
| 269 |
/** |
|
| 103 | 270 |
* Prints out the module HTML |
| 104 | 271 |
* |
| 105 | 272 |
* @return void |
| 106 | 273 |
*/ |
| 107 |
function printContent() {
|
|
| 274 |
public function printContent() {
|
|
| 108 | 275 |
print $this->content; |
| 109 | 276 |
} |
| 277 | ||
| 278 |
/** |
|
| 279 |
* Create the panel of buttons for submitting the form or otherwise perform operations. |
|
| 280 |
* |
|
| 281 |
* @return array all available buttons as an assoc. array |
|
| 282 |
*/ |
|
| 283 |
protected function getButtons() {
|
|
| 284 |
$buttons = array(); |
|
| 285 | ||
| 286 |
$buttons['reload'] = '<a href="' . $GLOBALS['MCONF']['_'] . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.reload', TRUE) . '">' .
|
|
| 287 |
t3lib_iconWorks::getSpriteIcon('actions-system-refresh') .
|
|
| 288 |
'</a>'; |
|
| 289 | ||
| 290 |
// Shortcut |
|
| 291 |
if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
|
|
| 292 |
$buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);
|
|
| 110 | 293 |
} |
| 111 | 294 | |
| 295 |
return $buttons; |
|
| 296 |
} |
|
| 297 |
} |
|
| 112 | 298 | |
| 113 | 299 | |
| 300 | ||
| 114 | 301 |
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/l10nmgr/mod1/index.php']) {
|
| 115 | 302 |
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/l10nmgr/mod1/index.php']); |
| 116 | 303 |
} |
| ... | ... | |
| 119 | 306 | |
| 120 | 307 | |
| 121 | 308 |
// Make instance: |
| 309 |
/** @var $SOBE tx_l10nmgr_module1 */ |
|
| 122 | 310 |
$SOBE = t3lib_div::makeInstance('tx_l10nmgr_module1');
|
| 123 | 311 |
$SOBE->init(); |
| 124 | 312 | |
| mod1/locallang.xml (working copy) | ||
|---|---|---|
| 6 | 6 |
</meta> |
| 7 | 7 |
<data type="array"> |
| 8 | 8 |
<languageKey index="default" type="array"> |
| 9 |
<label index="general.title">L10N Manager</label> |
|
| 10 |
<label index="general.description.message">Please select one of the following L10N Manager configurations to start the export/import.</label> |
|
| 9 |
<label index="general.title">L10N Manager</label> |
|
| 10 |
<label index="general.no_data">No configurations are available.</label> |
|
| 11 |
<label index="general.description.message">Please select one of the following L10N Manager configurations to start the export/import (click on the title).</label> |
|
| 11 | 12 |
<label index="general.list.configuration.title">Available configurations:</label> |
| 12 |
<label index="general.list.headline.info.title">Info</label> |
|
| 13 |
<label index="general.list.headline.info.title">Info</label> |
|
| 13 | 14 |
<label index="general.list.headline.title.title">Title</label> |
| 14 | 15 |
<label index="general.list.headline.path.title">Path</label> |
| 15 | 16 |
<label index="general.list.headline.depth.title">Depth</label> |
| 16 | 17 |
<label index="general.list.headline.pid.title">PID</label> |
| 17 | 18 |
<label index="general.list.headline.tables.title">Tables</label> |
| 18 | 19 |
<label index="general.list.headline.exclude.title">Exclude</label> |
| 19 |
<label index="general.list.headline.include.title">Include</label> |
|
| 20 |
|
|
| 21 |
<label index="general.list.infodetail.pid.title">Parent page: </label> |
|
| 22 |
<label index="general.list.infodetail.title.title">Title: </label> |
|
| 23 |
<label index="general.list.infodetail.filenameprefix.title">Filename: </label> |
|
| 24 |
<label index="general.list.infodetail.depth.title">Depth: </label> |
|
| 25 |
<label index="general.list.infodetail.sourceLangStaticId.title">Language: </label> |
|
| 26 |
<label index="general.list.infodetail.tablelist.title">Tables: </label> |
|
| 27 |
<label index="general.list.infodetail.exclude.title">Exclude: </label> |
|
| 28 |
<label index="general.list.infodetail.include.title">Include: </label> |
|
| 20 |
<label index="general.list.headline.include.title">Include</label> |
|
| 21 | ||
| 22 |
<label index="general.list.infodetail.pid.title">Parent page: </label> |
|
| 23 |
<label index="general.list.infodetail.title.title">Title: </label> |
|
| 24 |
<label index="general.list.infodetail.filenameprefix.title">Filename: </label> |
|
| 25 |
<label index="general.list.infodetail.depth.title">Depth: </label> |
|
| 26 |
<label index="general.list.infodetail.sourceLangStaticId.title">Language: </label> |
|
| 27 |
<label index="general.list.infodetail.default">Default</label> |
|
| 28 |
<label index="general.list.infodetail.tablelist.title">Tables: </label> |
|
| 29 |
<label index="general.list.infodetail.exclude.title">Exclude: </label> |
|
| 30 |
<label index="general.list.infodetail.include.title">Include: </label> |
|
| 29 | 31 |
<label index="general.list.headline.incfcewithdefaultlanguage.title">Default FCE</label> |
| 30 |
<label index="general.list.infodetail.displaymode.title">Display mode: </label> |
|
| 31 |
<label index="general.list.infodetail.incfcewithdefaultlanguage.title">Include FCE width default language: </label> |
|
| 32 |
<label index="general.list.infodetail.displaymode.title">Display mode: </label> |
|
| 33 |
<label index="general.list.infodetail.incfcewithdefaultlanguage.title">Include FCE width default language: </label> |
|
| 32 | 34 |
</languageKey> |
| 33 | 35 |
<languageKey index="de" type="array"> |
| 34 |
<label index="general.title">L10N Manager</label> |
|
| 36 |
<label index="general.title">L10N Manager</label> |
|
| 35 | 37 |
<label index="general.description.message">Wählen Sie eine der folgenden L10N-Manager-Konfigurationen aus, um mit dem Export/Import zu beginnen.</label> |
| 36 | 38 |
<label index="general.list.configuration.title">Verfügbare Konfigurationen:</label> |
| 37 |
<label index="general.list.headline.info.title">Info</label> |
|
| 39 |
<label index="general.list.headline.info.title">Info</label> |
|
| 38 | 40 |
<label index="general.list.headline.title.title">Titel</label> |
| 39 | 41 |
<label index="general.list.headline.path.title">Pfad</label> |
| 40 | 42 |
<label index="general.list.headline.depth.title">Ebenen</label> |
| 41 | 43 |
<label index="general.list.headline.pid.title">PID</label> |
| 42 | 44 |
<label index="general.list.headline.tables.title">Tabellen</label> |
| 43 | 45 |
<label index="general.list.headline.exclude.title">Auszuschließen</label> |
| 44 |
<label index="general.list.headline.include.title">Einzuschließen</label> |
|
| 46 |
<label index="general.list.headline.include.title">Einzuschließen</label> |
|
| 45 | 47 |
<label index="general.list.headline.incfcewithdefaultlanguage.title">Default FCE</label> |
| 46 |
|
|
| 47 |
<label index="general.list.infodetail.pid.title">Übergeordnete Seite: </label> |
|
| 48 |
<label index="general.list.infodetail.title.title">Titel: </label> |
|
| 49 |
<label index="general.list.infodetail.filenameprefix.title">Dateiname: </label> |
|
| 50 |
<label index="general.list.infodetail.depth.title">Ebenen: </label> |
|
| 51 |
<label index="general.list.infodetail.sourceLangStaticId.title">Sprache: </label> |
|
| 52 |
<label index="general.list.infodetail.tablelist.title">Tabellen: </label> |
|
| 53 |
<label index="general.list.infodetail.exclude.title">Auszuschließen: </label> |
|
| 54 |
<label index="general.list.infodetail.include.title">Einzuschließen: </label> |
|
| 55 |
<label index="general.list.infodetail.displaymode.title">Anzeigemodus: </label> |
|
| 56 |
<label index="general.list.infodetail.incfcewithdefaultlanguage.title">FCE mit Standardsprache einschließen: </label> |
|
| 48 | ||
| 49 |
<label index="general.list.infodetail.pid.title">Übergeordnete Seite: </label> |
|
| 50 |
<label index="general.list.infodetail.title.title">Titel: </label> |
|
| 51 |
<label index="general.list.infodetail.filenameprefix.title">Dateiname: </label> |
|
| 52 |
<label index="general.list.infodetail.depth.title">Ebenen: </label> |
|
| 53 |
<label index="general.list.infodetail.sourceLangStaticId.title">Sprache: </label> |
|
| 54 |
<label index="general.list.infodetail.tablelist.title">Tabellen: </label> |
|
| 55 |
<label index="general.list.infodetail.exclude.title">Auszuschließen: </label> |
|
| 56 |
<label index="general.list.infodetail.include.title">Einzuschließen: </label> |
|
| 57 |
<label index="general.list.infodetail.displaymode.title">Anzeigemodus: </label> |
|
| 58 |
<label index="general.list.infodetail.incfcewithdefaultlanguage.title">FCE mit Standardsprache einschließen: </label> |
|
| 57 | 59 |
</languageKey> |
| 58 | 60 |
<languageKey index="fr" type="array"> |
| 59 | 61 |
<label index="general.title">L10N Manager</label> |
| ... | ... | |
| 102 | 104 |
<label index="general.list.infodetail.incfcewithdefaultlanguage.title">Incluir FCE con idoma estándar: </label> |
| 103 | 105 |
</languageKey> |
| 104 | 106 |
<languageKey index="it" type="array"> |
| 105 |
<label index="general.title">L10N Manager</label> |
|
| 107 |
<label index="general.title">L10N Manager</label> |
|
| 106 | 108 |
<label index="general.description.message">Per favore, seleziona una delle seguenti configurazioni L10N Manager per iniziare la exportazione/importazione.</label> |
| 107 | 109 |
<label index="general.list.configuration.title">Configurazioni disponibli:</label> |
| 108 |
<label index="general.list.headline.info.title">Info</label> |
|
| 110 |
<label index="general.list.headline.info.title">Info</label> |
|
| 109 | 111 |
<label index="general.list.headline.title.title">Titolo</label> |
| 110 | 112 |
<label index="general.list.headline.path.title">Percorso</label> |
| 111 | 113 |
<label index="general.list.headline.depth.title">Livelli</label> |
| 112 | 114 |
<label index="general.list.headline.pid.title">PID</label> |
| 113 | 115 |
<label index="general.list.headline.tables.title">Tabelle</label> |
| 114 | 116 |
<label index="general.list.headline.exclude.title">Excludere</label> |
| 115 |
<label index="general.list.headline.include.title">Includere</label> |
|
| 116 |
|
|
| 117 |
<label index="general.list.infodetail.pid.title">Pagina padre: </label> |
|
| 118 |
<label index="general.list.infodetail.title.title">Titolo: </label> |
|
| 119 |
<label index="general.list.infodetail.filenameprefix.title">Nome del file: </label> |
|
| 120 |
<label index="general.list.infodetail.depth.title">Livelli: </label> |
|
| 121 |
<label index="general.list.infodetail.sourceLangStaticId.title">Lingua: </label> |
|
| 122 |
<label index="general.list.infodetail.tablelist.title">Tabelle: </label> |
|
| 123 |
<label index="general.list.infodetail.exclude.title">Excludere: </label> |
|
| 124 |
<label index="general.list.infodetail.include.title">Includere: </label> |
|
| 125 |
<label index="general.list.infodetail.displaymode.title">Modo display: </label> |
|
| 126 |
<label index="general.list.infodetail.incfcewithdefaultlanguage.title">Includere FCE con lingua default: </label> |
|
| 117 |
<label index="general.list.headline.include.title">Includere</label> |
|
| 118 | ||
| 119 |
<label index="general.list.infodetail.pid.title">Pagina padre: </label> |
|
| 120 |
<label index="general.list.infodetail.title.title">Titolo: </label> |
|
| 121 |
<label index="general.list.infodetail.filenameprefix.title">Nome del file: </label> |
|
| 122 |
<label index="general.list.infodetail.depth.title">Livelli: </label> |
|
| 123 |
<label index="general.list.infodetail.sourceLangStaticId.title">Lingua: </label> |
|
| 124 |
<label index="general.list.infodetail.tablelist.title">Tabelle: </label> |
|
| 125 |
<label index="general.list.infodetail.exclude.title">Excludere: </label> |
|
| 126 |
<label index="general.list.infodetail.include.title">Includere: </label> |
|
| 127 |
<label index="general.list.infodetail.displaymode.title">Modo display: </label> |
|
| 128 |
<label index="general.list.infodetail.incfcewithdefaultlanguage.title">Includere FCE con lingua default: </label> |
|
| 127 | 129 |
</languageKey> |
| 128 | 130 |
</data> |
| 129 | 131 |
<orig_hash type="array"> |
| mod2/list.php (working copy) | ||
|---|---|---|
| 46 | 46 |
require_once(t3lib_extMgm::extPath('l10nmgr').'class.l10nmgr_tcemain_hook.php');
|
| 47 | 47 |
|
| 48 | 48 | |
| 49 |
class tx_l10nmgr_module1 extends t3lib_SCbase {
|
|
| 49 |
class tx_l10nmgr_module2 extends t3lib_SCbase {
|
|
| 50 | 50 |
var $pageinfo; |
| 51 | 51 | |
| 52 | 52 |
/** |
| ... | ... | |
| 254 | 254 | |
| 255 | 255 | |
| 256 | 256 |
// Make instance: |
| 257 |
$SOBE = t3lib_div::makeInstance('tx_l10nmgr_module1');
|
|
| 257 |
$SOBE = t3lib_div::makeInstance('tx_l10nmgr_module2');
|
|
| 258 | 258 |
$SOBE->init(); |
| 259 | 259 | |
| 260 | 260 |
// Include files? |
| cm1/index.php (working copy) | ||
|---|---|---|
| 84 | 84 |
* @subpackage tx_l10nmgr |
| 85 | 85 |
*/ |
| 86 | 86 |
class tx_l10nmgr_cm1 extends t3lib_SCbase {
|
| 87 |
/** |
|
| 88 |
* @var array Extension configuration |
|
| 89 |
*/ |
|
| 90 |
protected $lConf = array(); |
|
| 87 | 91 | |
| 88 | 92 |
var $flexFormDiffArray = array(); // Internal |
| 89 | 93 | |
| ... | ... | |
| 115 | 119 |
); |
| 116 | 120 | |
| 117 | 121 |
// Load system languages into menu: |
| 122 |
/** @var $t8Tools t3lib_transl8tools */ |
|
| 118 | 123 |
$t8Tools = t3lib_div::makeInstance('t3lib_transl8tools');
|
| 119 | 124 |
$sysL = $t8Tools->getSystemLanguages(); |
| 120 | 125 | |
| ... | ... | |
| 136 | 141 |
* |
| 137 | 142 |
* @return void |
| 138 | 143 |
*/ |
| 139 |
function main() {
|
|
| 140 |
global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS; |
|
| 144 |
public function main() {
|
|
| 145 |
global $BE_USER,$LANG,$BACK_PATH,$TYPO3_CONF_VARS; |
|
| 141 | 146 | |
| 142 | 147 |
// Get language to export/import |
| 143 | 148 |
$this->sysLanguage = $this->MOD_SETTINGS["lang"]; |
| 144 | 149 | |
| 145 | 150 |
// Draw the header. |
| 146 |
$this->doc = t3lib_div::makeInstance('noDoc');
|
|
| 151 |
$this->doc = t3lib_div::makeInstance('template');
|
|
| 147 | 152 |
$this->doc->backPath = $BACK_PATH; |
| 153 |
$this->doc->setModuleTemplate(t3lib_extMgm::extPath('l10nmgr') . 'templates/cm1_template.html');
|
|
| 148 | 154 |
$this->doc->form='<form action="" method="post" enctype="'.$TYPO3_CONF_VARS['SYS']['form_enctype'].'">'; |
| 149 | 155 | |
| 150 | 156 |
// JavaScript |
| ... | ... | |
| 159 | 165 |
<link rel="stylesheet" type="text/css" href="' . t3lib_div::resolveBackPath($BACK_PATH . t3lib_extMgm::extRelPath('l10nmgr') . 'res/contrib/tabs.css') . '" />';
|
| 160 | 166 | |
| 161 | 167 | |
| 162 |
// Find l10n configuration record: |
|
| 168 |
// Find l10n configuration record |
|
| 169 |
/** @var $l10ncfgObj tx_l10nmgr_l10nConfiguration */ |
|
| 163 | 170 |
$l10ncfgObj=t3lib_div::makeInstance('tx_l10nmgr_l10nConfiguration');
|
| 164 | 171 |
$l10ncfgObj->load($this->id); |
| 165 | 172 | |
| ... | ... | |
| 173 | 180 |
if ($this->id && $access) {
|
| 174 | 181 | |
| 175 | 182 |
// Header: |
| 176 |
$this->content.=$this->doc->startPage($LANG->getLL('general.title'));
|
|
| 177 |
$this->content.=$this->doc->header($LANG->getLL('general.title'));
|
|
| 183 |
// $this->content.=$this->doc->startPage($LANG->getLL('general.title'));
|
|
| 184 |
// $this->content.=$this->doc->header($LANG->getLL('general.title'));
|
|
| 178 | 185 | |
| 179 |
//create and render view to show details for the current l10nmgrcfg |
|
| 186 |
// Create and render view to show details for the current l10nmgrcfg |
|
| 187 |
/** @var $l10nmgrconfigurationView tx_l10nmgr_l10ncfgDetailView */ |
|
| 180 | 188 |
$l10nmgrconfigurationView= t3lib_div::makeInstance('tx_l10nmgr_l10ncfgDetailView',$l10ncfgObj, $this->doc);
|
| 181 | 189 |
$this->content.=$this->doc->section('',$l10nmgrconfigurationView->render());
|
| 182 | 190 | |
| ... | ... | |
| 194 | 202 |
} else {
|
| 195 | 203 |
$this->moduleContent($l10ncfgObj); |
| 196 | 204 |
} |
| 197 | ||
| 198 |
// ShortCut |
|
| 199 |
if ($BE_USER->mayMakeShortcut()) {
|
|
| 200 |
$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));
|
|
| 201 | 205 |
} |
| 202 | 206 |
} |
| 203 |
} |
|
| 204 | 207 | |
| 205 | 208 |
$this->content.=$this->doc->spacer(10); |
| 209 | ||
| 210 |
$markers['CONTENT'] = $this->content; |
|
| 211 | ||
| 212 |
// Build the <body> for the module |
|
| 213 |
$docHeaderButtons = $this->getButtons(); |
|
| 214 |
$this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('general.title'));
|
|
| 215 |
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); |
|
| 216 |
$this->content .= $this->doc->endPage(); |
|
| 217 |
$this->content = $this->doc->insertStylesAndJS($this->content); |
|
| 206 | 218 |
} |
| 207 | 219 | |
| 208 | 220 |
/** |
| ... | ... | |
| 210 | 222 |
* |
| 211 | 223 |
* @return void |
| 212 | 224 |
*/ |
| 213 |
function printContent() {
|
|
| 225 |
public function printContent() {
|
|
| 214 | 226 | |
| 215 |
$this->content.=$this->doc->endPage(); |
|
| 227 |
// $this->content .= $this->doc->endPage(); |
|
| 216 | 228 |
echo $this->content; |
| 217 | 229 |
} |
| 218 | 230 | |
| 219 | 231 |
function inlineEditAction($l10ncfgObj) {
|
| 220 | 232 |
global $LANG, $BACK_PATH; |
| 221 | 233 | |
| 234 |
/** @var $service tx_l10nmgr_l10nBaseService */ |
|
| 222 | 235 |
$service=t3lib_div::makeInstance('tx_l10nmgr_l10nBaseService');
|
| 223 | 236 |
$info=''; |
| 224 | 237 |
// Buttons: |
| ... | ... | |
| 226 | 239 |
$info.= '<input type="submit" value="'.$LANG->getLL('general.action.cancel.button.title').'" name="_" onclick="return confirm(\''.$LANG->getLL('inlineedit.cancel.alert.title').'\');" />';
|
| 227 | 240 | |
| 228 | 241 |
//simple init of translation object: |
| 242 |
/** @var $translationData tx_l10nmgr_translationData */ |
|
| 229 | 243 |
$translationData=t3lib_div::makeInstance('tx_l10nmgr_translationData');
|
| 230 | 244 |
$translationData->setTranslationData(t3lib_div::_POST('translation'));
|
| 231 | 245 |
$translationData->setLanguage($this->sysLanguage); |
| ... | ... | |
| 239 | 253 | |
| 240 | 254 | |
| 241 | 255 |
function _getSelectField($elementName,$currentValue,$menuItems) {
|
| 256 |
$options = array(); |
|
| 242 | 257 | |
| 243 | 258 |
foreach($menuItems as $value => $label) {
|
| 244 | 259 |
$options[] = '<option value="'.htmlspecialchars($value).'"'.(!strcmp($currentValue,$value)?' selected="selected"':'').'>'. |
| ... | ... | |
| 246 | 261 |
'</option>'; |
| 247 | 262 |
} |
| 248 | 263 | |
| 249 |
if (count($options)) {
|
|
| 264 |
if (count($options) > 0) {
|
|
| 250 | 265 |
return ' |
| 251 | 266 |
<select name="'.$elementName.'" > |
| 252 | 267 |
'.implode('
|
| ... | ... | |
| 268 | 283 |
'sdlpassolo' => 'SDLPassolo.xfg', |
| 269 | 284 |
); |
| 270 | 285 | |
| 286 |
/** @var $service tx_l10nmgr_l10nBaseService */ |
|
| 271 | 287 |
$service=t3lib_div::makeInstance('tx_l10nmgr_l10nBaseService');
|
| 272 | 288 | |
| 273 |
$info .= '<br/>'; |
|
| 289 |
$info = '<br/>'; |
|
| 274 | 290 |
$info .= '<input type="submit" value="'.$LANG->getLL('general.action.refresh.button.title').'" name="_" /><br /><br/>';
|
| 275 | 291 | |
| 276 | 292 |
$info .= '<div id="ddtabs" class="basictab" style="border:0px solid gray;margin:0px;"> |
| ... | ... | |
| 319 | 335 |
$info .= '<a href="'.t3lib_extMgm::extRelPath('l10nmgr').'doc/manual.sxw" target="_new">Download</a>';
|
| 320 | 336 |
$info .= '</div>'; |
| 321 | 337 |
$info .= '</div>'; |
| 322 |
$info .= $this->doc->header($LANG->getLL('misc.messages.title'));
|
|
| 323 | 338 | |
| 339 |
$actionInfo = ''; |
|
| 324 | 340 |
// Read uploaded file: |
| 325 | 341 |
if (t3lib_div::_POST('import_xml') && $_FILES['uploaded_import_file']['tmp_name'] && is_uploaded_file($_FILES['uploaded_import_file']['tmp_name'])) {
|
| 326 | 342 |
$uploadedTempFile = t3lib_div::upload_to_tempfile($_FILES['uploaded_import_file']['tmp_name']); |
| 343 |
/** @var $factory tx_l10nmgr_translationDataFactory */ |
|
| 327 | 344 |
$factory=t3lib_div::makeInstance('tx_l10nmgr_translationDataFactory');
|
| 328 | 345 | |
| 329 | 346 |
//print "<pre>"; |
| ... | ... | |
| 331 | 348 |
//print "</pre>"; |
| 332 | 349 |
if (t3lib_div::_POST('import_oldformat')=='1') {
|
| 333 | 350 |
//Support for the old Format of XML Import (without pageGrp element) |
| 334 |
$info.=$LANG->getLL('import.xml.old-format.message');
|
|
| 351 |
$actionInfo .= $LANG->getLL('import.xml.old-format.message');
|
|
| 335 | 352 |
$translationData=$factory->getTranslationDataFromOldFormatCATXMLFile($uploadedTempFile); |
| 336 | 353 |
$translationData->setLanguage($sysLang); |
| 337 | 354 |
$service->saveTranslation($l10ncfgObj,$translationData); |
| 338 |
$info.='<br/><br/>'.$this->doc->icons(1).'Import done<br/><br/>(Command count:'.$service->lastTCEMAINCommandsCount.')'; |
|
| 355 |
$actionInfo .= '<br/><br/>'.$this->doc->icons(1).'Import done<br/><br/>(Command count:'.$service->lastTCEMAINCommandsCount.')'; |
|
| 339 | 356 |
} |
| 340 | 357 |
else {
|
| 341 | 358 |
// Relevant processing of XML Import with the help of the Importmanager |
| 359 |
/** @var $importManager tx_l10nmgr_CATXMLImportManager */ |
|
| 342 | 360 |
$importManager=t3lib_div::makeInstance('tx_l10nmgr_CATXMLImportManager',$uploadedTempFile,$this->sysLanguage, $xmlString="");
|
| 343 | 361 |
if ($importManager->parseAndCheckXMLFile()===false) {
|
| 344 |
$info.='<br/><br/>'.$this->doc->header($LANG->getLL('import.error.title')).$importManager->getErrorMessages();
|
|
| 362 |
$actionInfo .= '<br/><br/>'.$this->doc->header($LANG->getLL('import.error.title')).$importManager->getErrorMessages();
|
|
| 345 | 363 |
} |
| 346 | 364 |
else {
|
| 347 | 365 |
if (t3lib_div::_POST('import_delL10N')=='1') {
|
| 348 |
$info.=$LANG->getLL('import.xml.delL10N.message').'<br/>';
|
|
| 366 |
$actionInfo .= $LANG->getLL('import.xml.delL10N.message').'<br/>';
|
|
| 349 | 367 |
$delCount = $importManager->delL10N($importManager->getDelL10NDataFromCATXMLNodes($importManager->xmlNodes)); |
| 350 |
$info.= sprintf($LANG->getLL('import.xml.delL10N.count.message'),$delCount).'<br/><br/>';
|
|
| 368 |
$actionInfo .= sprintf($LANG->getLL('import.xml.delL10N.count.message'),$delCount).'<br/><br/>';
|
|
| 351 | 369 |
} |
| 352 | 370 |
if (t3lib_div::_POST('make_preview_link')=='1') {
|
| 353 | 371 |
$pageIds = $importManager->getPidsFromCATXMLNodes($importManager->xmlNodes); |
| 354 |
$info.='<b>'.$LANG->getLL('import.xml.preview_links.title').'</b><br/>';
|
|
| 372 |
$actionInfo .= '<b>'.$LANG->getLL('import.xml.preview_links.title').'</b><br/>';
|
|
| 373 |
/** @var $mkPreviewLinks tx_l10nmgr_mkPreviewLinkService */ |
|
| 355 | 374 |
$mkPreviewLinks=t3lib_div::makeInstance('tx_l10nmgr_mkPreviewLinkService',$t3_workspaceId=$importManager->headerData['t3_workspaceId'], $t3_sysLang=$importManager->headerData['t3_sysLang'], $pageIds);
|
| 356 |
$info.=$mkPreviewLinks->renderPreviewLinks($mkPreviewLinks->mkPreviewLinks()); |
|
| 375 |
$actionInfo .= $mkPreviewLinks->renderPreviewLinks($mkPreviewLinks->mkPreviewLinks()); |
|
| 357 | 376 |
} |
| 358 | 377 |
$translationData=$factory->getTranslationDataFromCATXMLNodes($importManager->getXMLNodes()); |
| 359 | 378 |
$translationData->setLanguage($this->sysLanguage); |
| 360 |
//$info.="<pre>".var_export($GLOBALS['BE_USER'],true)."</pre>"; |
|
| 379 |
//$actionInfo.="<pre>".var_export($GLOBALS['BE_USER'],true)."</pre>"; |
|
| 361 | 380 |
unset($importManager); |
| 362 | 381 |
$service->saveTranslation($l10ncfgObj,$translationData); |
| 363 |
$info.='<br/>'.$this->doc->icons(-1).$LANG->getLL('import.xml.done.message').'<br/><br/>(Command count:'.$service->lastTCEMAINCommandsCount.')';
|
|
| 382 |
$actionInfo .= '<br/>'.$this->doc->icons(-1).$LANG->getLL('import.xml.done.message').'<br/><br/>(Command count:'.$service->lastTCEMAINCommandsCount.')';
|
|
| 364 | 383 |
} |
| 365 | 384 |
} |
| 366 | 385 |
t3lib_div::unlink_tempfile($uploadedTempFile); |
| ... | ... | |
| 385 | 404 |
} |
| 386 | 405 |
//Check the export |
| 387 | 406 |
if ((t3lib_div::_POST('check_exports')=='1') && ($viewClass->checkExports() == FALSE)) {
|
| 388 |
$info .= '<br />'.$this->doc->icons(2).$LANG->getLL('export.process.duplicate.message');
|
|
| 389 |
$info .= $viewClass->renderExports(); |
|
| 407 |
$actionInfo .= '<br />'.$this->doc->icons(2).$LANG->getLL('export.process.duplicate.message');
|
|
| 408 |
$actionInfo .= $viewClass->renderExports(); |
|
| 390 | 409 |
} else {
|
| 391 | 410 |
$viewClass->saveExportInformation(); |
| 392 | 411 |
$this->_downloadXML($viewClass); |
| 393 | 412 |
} |
| 394 | 413 |
} |
| 414 |
if (!empty($actionInfo)) {
|
|
| 415 |
$info .= $this->doc->header($LANG->getLL('misc.messages.title'));
|
|
| 416 |
$info .= $actionInfo; |
|
| 417 |
} |
|
| 418 | ||
| 395 | 419 |
$info .= '</div>'; |
| 396 | 420 | |
| 397 | 421 |
return $info; |
| ... | ... | |
| 404 | 428 |
// Buttons: |
| 405 | 429 |
$_selectOptions=array('0'=>'-default-');
|
| 406 | 430 |
$_selectOptions=$_selectOptions+$this->MOD_MENU["lang"]; |
| 407 |
$info.= $LANG->getLL('export.xml.source-language.title') . $this->_getSelectField("export_xml_forcepreviewlanguage",'0',$_selectOptions).'<br/>';
|
|
| 431 |
$info = $LANG->getLL('export.xml.source-language.title') . $this->_getSelectField("export_xml_forcepreviewlanguage",'0',$_selectOptions).'<br/>';
|
|
| 408 | 432 |
$info.= '<input type="submit" value="'.$LANG->getLL('general.action.refresh.button.title').'" name="_" />';
|
| 409 | 433 |
$info.= '<input type="submit" value="'.$LANG->getLL('general.action.export.xml.button.title').'" name="export_excel" />';
|
| 410 | 434 |
$info.= '<input type="submit" value="'.$LANG->getLL('general.action.import.xml.button.title').'" name="import_excel" /><input type="file" size="60" name="uploaded_import_file" />';
|
| ... | ... | |
| 457 | 481 |
* @return void |
| 458 | 482 |
*/ |
| 459 | 483 |
function moduleContent($l10ncfgObj) {
|
| 460 |
global $TCA,$LANG,$BE_USER; |
|
| 484 |
global $LANG,$BE_USER; |
|
| 461 | 485 | |
| 462 | 486 |
switch ($this->MOD_SETTINGS["action"]) {
|
| 463 |
case 'inlineEdit': case 'link': |
|
| 487 |
case 'inlineEdit': |
|
| 488 |
case 'link': |
|
| 489 |
/** @var $htmlListView tx_l10nmgr_l10nHTMLListView */ |
|
| 464 | 490 |
$htmlListView=t3lib_div::makeInstance('tx_l10nmgr_l10nHTMLListView',$l10ncfgObj,$this->sysLanguage);
|
| 465 | 491 |
$subheader=$LANG->getLL('inlineEdit');
|
| 492 |
$subcontent = ''; |
|
| 466 | 493 | |
| 467 | 494 |
if ($this->MOD_SETTINGS["action"]=='inlineEdit') {
|
| 468 | 495 |
$subheader=$LANG->getLL('link');
|
| ... | ... | |
| 536 | 563 |
*/ |
| 537 | 564 |
function diffCMP($old, $new) {
|
| 538 | 565 |
// Create diff-result: |
| 566 |
/** @var $t3lib_diff_Obj t3lib_diff */ |
|
| 539 | 567 |
$t3lib_diff_Obj = t3lib_div::makeInstance('t3lib_diff');
|
| 540 | 568 |
return $t3lib_diff_Obj->makeDiffDisplay($old,$new); |
| 541 | 569 |
} |
| ... | ... | |
| 549 | 577 |
// Load the configuration |
| 550 | 578 |
$this->lConf = unserialize( $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['l10nmgr'] ); |
| 551 | 579 |
} |
| 580 | ||
| 581 |
/** |
|
| 582 |
* Create the panel of buttons for submitting the form or otherwise perform operations. |
|
| 583 |
* |
|
| 584 |
* @return array all available buttons as an assoc. array |
|
| 585 |
*/ |
|
| 586 |
protected function getButtons() {
|
|
| 587 |
$buttons = array(); |
|
| 588 | ||
| 589 |
$buttons['reload'] = '<a href="' . $GLOBALS['MCONF']['_'] . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.reload', TRUE) . '">' .
|
|
| 590 |
t3lib_iconWorks::getSpriteIcon('actions-system-refresh') .
|
|
| 591 |
'</a>'; |
|
| 592 | ||
| 593 |
// Shortcut |
|
| 594 |
if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
|
|
| 595 |
$buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);
|
|
| 552 | 596 |
} |
| 553 | 597 | |
| 598 |
return $buttons; |
|
| 599 |
} |
|
| 600 |
} |
|
| 554 | 601 | |
| 602 | ||
| 555 | 603 |
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/l10nmgr/cm1/index.php']) {
|
| 556 | 604 |
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/l10nmgr/cm1/index.php']); |
| 557 | 605 |
} |
| 558 | 606 | |
| 559 | 607 | |
| 560 | 608 |
// Make instance: |
| 609 |
/** @var $SOBE tx_l10nmgr_cm1 */ |
|
| 561 | 610 |
$SOBE = t3lib_div::makeInstance('tx_l10nmgr_cm1');
|
| 562 | 611 |
$SOBE->init(); |
| 563 | 612 | |
| res/contrib/jquery.tooltip.css (working copy) | ||
|---|---|---|
| 2 | 2 |
#tooltip {
|
| 3 | 3 |
position: absolute; |
| 4 | 4 |
z-index: 3000; |
| 5 |
border: 1px solid #111; |
|
| 6 |
background-color: #eee; |
|
| 7 |
padding: 5px; |
|
| 8 | 5 |
opacity: 0.85; |
| 9 | 6 |
} |
| 10 | 7 |
#tooltip h3, #tooltip div { margin: 0; }
|
| views/class.tx_l10nmgr_abstractExportView.php (working copy) | ||
|---|---|---|
| 73 | 73 |
* create a filename to save the File |
| 74 | 74 |
*/ |
| 75 | 75 |
function getLocalFilename(){
|
| 76 |
$sourceLang = ''; |
|
| 77 |
$targetLang = ''; |
|
| 78 | ||
| 76 |
$sourceLang = ''; |
|
| 77 |
$targetLang = ''; |
|
| 78 |
|
|
| 79 | 79 |
if($this->exportType == '0'){
|
| 80 | 80 |
$fileType = 'excel_export'; |
| 81 | 81 |
}else{
|
| 82 | 82 |
$fileType = 'catxml_export'; |
| 83 |
} |
|
| 84 | ||
| 85 |
if ($this->l10ncfgObj->getData('sourceLangStaticId') && t3lib_extMgm::isLoaded('static_info_tables')) {
|
|
| 86 |
$sourceIso2L = ''; |
|
| 87 |
$staticLangArr = t3lib_BEfunc::getRecord('static_languages',$this->l10ncfgObj->getData('sourceLangStaticId'),'lg_iso_2');
|
|
| 88 |
$sourceIso2L = ' sourceLang="'.$staticLangArr['lg_iso_2'].'"'; |
|
| 89 |
} |
|
| 90 | ||
| 91 |
if ($this->sysLang && t3lib_extMgm::isLoaded('static_info_tables')) {
|
|
| 92 |
$targetLangSysLangArr = t3lib_BEfunc::getRecord('sys_language',$this->sysLang);
|
|
| 93 |
$targetLangArr = t3lib_BEfunc::getRecord('static_languages',$targetLangSysLangArr['static_lang_isocode']);
|
|
| 94 |
} |
|
| 95 | ||
| 96 |
// Set sourceLang for filename |
|
| 97 |
if (isset( $staticLangArr['lg_iso_2'] ) && !empty( $staticLangArr['lg_iso_2'] )) {
|
|
| 98 |
$sourceLang = $staticLangArr['lg_iso_2']; |
|
| 99 |
} |
|
| 100 | ||
| 101 |
// Use locale for targetLang in filename if available |
|
| 102 |
if (isset( $targetLangArr['lg_collate_locale'] ) && !empty( $targetLangArr['lg_collate_locale'] )) {
|
|
| 103 |
$targetLang = $targetLangArr['lg_collate_locale']; |
|
| 104 |
// Use two letter ISO code if locale is not available |
|
| 105 |
}else if (isset( $targetLangArr['lg_iso_2'] ) && !empty( $targetLangArr['lg_iso_2'] )) {
|
|
| 106 |
$targetLang = $targetLangArr['lg_iso_2']; |
|
| 107 |
} |
|
| 108 | ||
| 109 |
$fileNamePrefix = (trim( $this->l10ncfgObj->getData('filenameprefix') )) ? $this->l10ncfgObj->getData('filenameprefix') : $fileType ;
|
|
| 110 | ||
| 111 |
// Setting filename: |
|
| 112 |
$filename = $fileNamePrefix . '_' . $sourceLang . '_to_' . $targetLang . '_' . date('dmy-His').'.xml';
|
|
| 83 |
} |
|
| 84 |
|
|
| 85 |
if ($this->l10ncfgObj->getData('sourceLangStaticId') && t3lib_extMgm::isLoaded('static_info_tables')) {
|
|
| 86 |
$sourceIso2L = ''; |
|
| 87 |
$staticLangArr = t3lib_BEfunc::getRecord('static_languages',$this->l10ncfgObj->getData('sourceLangStaticId'),'lg_iso_2');
|
|
| 88 |
$sourceIso2L = ' sourceLang="'.$staticLangArr['lg_iso_2'].'"'; |
|
| 89 |
} |
|
| 90 |
|
|
| 91 |
if ($this->sysLang && t3lib_extMgm::isLoaded('static_info_tables')) {
|
|
| 92 |
$targetLangSysLangArr = t3lib_BEfunc::getRecord('sys_language',$this->sysLang);
|
|
| 93 |
$targetLangArr = t3lib_BEfunc::getRecord('static_languages',$targetLangSysLangArr['static_lang_isocode']);
|
|
| 94 |
} |
|
| 95 |
|
|
| 96 |
// Set sourceLang for filename |
|
| 97 |
if (isset( $staticLangArr['lg_iso_2'] ) && !empty( $staticLangArr['lg_iso_2'] )) {
|
|
| 98 |
$sourceLang = $staticLangArr['lg_iso_2']; |
|
| 99 |
} |
|
| 100 |
|
|
| 101 |
// Use locale for targetLang in filename if available |
|
| 102 |
if (isset( $targetLangArr['lg_collate_locale'] ) && !empty( $targetLangArr['lg_collate_locale'] )) {
|
|
| 103 |
$targetLang = $targetLangArr['lg_collate_locale']; |
|
| 104 |
// Use two letter ISO code if locale is not available |
|
| 105 |
}else if (isset( $targetLangArr['lg_iso_2'] ) && !empty( $targetLangArr['lg_iso_2'] )) {
|
|
| 106 |
$targetLang = $targetLangArr['lg_iso_2']; |
|
| 107 |
} |
|
| 108 |
|
|
| 109 |
$fileNamePrefix = (trim( $this->l10ncfgObj->getData('filenameprefix') )) ? $this->l10ncfgObj->getData('filenameprefix') : $fileType ;
|
|
| 110 |
|
|
| 111 |
// Setting filename: |
|
| 112 |
$filename = $fileNamePrefix . '_' . $sourceLang . '_to_' . $targetLang . '_' . date('dmy-His').'.xml';
|
|
| 113 | 113 |
return $filename; |
| 114 | 114 |
} |
| 115 | 115 |
|
| ... | ... | |
| 151 | 151 |
$ret = FALSE; |
| 152 | 152 |
|
| 153 | 153 |
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('l10ncfg_id,exportType,translation_lang','tx_l10nmgr_exportdata','l10ncfg_id ='.$this->l10ncfgObj->getData('uid').' AND exportType ='.$this->exportType.' AND translation_lang ='.$this->sysLang);
|
| 154 | ||
| 155 |
if ( !$GLOBALS['TYPO3_DB']->sql_error() ) {
|
|
| 156 |
$numRows = $GLOBALS['TYPO3_DB']->sql_num_rows($res); |
|
| 157 |
}else{
|
|
| 158 |
$numRows = 0; |
|
| 159 |
} |
|
| 160 | 154 |
|
| 155 |
if ( !$GLOBALS['TYPO3_DB']->sql_error() ) {
|
|
| 156 |
$numRows = $GLOBALS['TYPO3_DB']->sql_num_rows($res); |
|
| 157 |
}else{
|
|
| 158 |
$numRows = 0; |
|
| 159 |
} |
|
| 160 |
|
|
| 161 | 161 |
if ( $numRows > 0){
|
| 162 | 162 |
$ret = FALSE; |
| 163 | 163 |
}else{
|
| 164 | 164 |
$ret = TRUE; |
| 165 |
} |
|
| 166 | ||
| 165 |
} |
|
| 166 |
|
|
| 167 | 167 |
return $ret; |
| 168 | 168 |
} |
| 169 | ||
| 170 |
/** |
|
| 171 |
* Fetches saved exports based on configuration, export format and target language. |
|
| 172 |
* |
|
| 173 |
* @author Andreas Otto <andreas.otto@dkd.de> |
|
| 174 |
* @return array Information about exports. |
|
| 175 |
*/ |
|
| 176 |
function fetchExports() {
|
|
| 177 |
$exports = array(); |
|
| 178 | ||
| 179 |
$res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('crdate,l10ncfg_id,exportType,translation_lang,filename','tx_l10nmgr_exportdata','l10ncfg_id ='.$this->l10ncfgObj->getData('uid').' AND exportType ='.$this->exportType.' AND translation_lang ='.$this->sysLang);
|
|
| 180 | ||
| 181 |
if ( is_array( $res ) ) {
|
|
| 182 |
$exports = $res; |
|
| 183 |
} |
|
| 184 | ||
| 185 |
return $exports; |
|
| 186 |
} |
|
| 187 | ||
| 188 |
/** |
|
| 189 |
* Renders a list of saved exports as HTML table. |
|
| 190 |
* |
|
| 191 |
* @return string HTML table |
|
| 192 |
*/ |
|
| 193 |
function renderExports() {
|
|
| 194 |
global $LANG; |
|
| 195 |
$out = ''; |
|
| 196 |
$content = array(); |
|
| 197 |
$exports = $this->fetchExports(); |
|
| 198 | ||
| 199 |
foreach( $exports AS $export => $exportData ) {
|
|
| 200 |
$content[$export] = sprintf('
|
|
| 201 |
<tr class="bgColor3"> |
|
| 202 |
<td>%s</td> |
|
| 203 |
<td>%s</td> |
|
| 204 |
<td>%s</td> |
|
| 205 |
<td>%s</td> |
|
| 206 |
<td>%s</td> |
|
| 207 |
</tr>', |
|
| 208 |
t3lib_BEfunc::datetime($exportData['crdate']), |
|
| 209 |
$exportData['l10ncfg_id'], |
|
| 210 |
$exportData['exportType'], |
|
| 211 |
$exportData['translation_lang'], |
|
| 212 |
sprintf('<a href="%suploads/tx_l10nmgr/saved_files/%s">%s</a>', t3lib_div::getIndpEnv('TYPO3_SITE_URL'), $exportData['filename'], $exportData['filename'])
|
|
| 213 |
); |
|
| 214 |
} |
|
| 215 | ||
| 216 |
$out = sprintf('
|
|
| 217 |
<table> |
|
| 218 |
<thead> |
|
| 219 |
<tr class="bgColor5 tableheader"> |
|
| 220 |
<th>%s</th> |
|
| 221 |
<th>%s</th> |
|
| 222 |
<th>%s</th> |
|
| 223 |
<th>%s</th> |
|
| 224 |
<th>%s</th> |
|
| 225 |
</tr> |
|
| 226 |
</thead> |
|
| 227 |
<tbody> |
|
| 228 |
%s |
|
| 229 |
</tbody> |
|
| 230 |
</table>', |
|
| 231 |
$LANG->getLL('export.overview.date.label'),
|
|
| 232 |
$LANG->getLL('export.overview.configuration.label'),
|
|
| 233 |
$LANG->getLL('export.overview.type.label'),
|
|
| 234 |
$LANG->getLL('export.overview.targetlanguage.label'),
|
|
| 235 |
$LANG->getLL('export.overview.filename.label'),
|
|
| 236 |
implode( chr(10), $content ) |
|
| 237 |
); |
|
| 238 | ||
| 239 |
return $out; |
|
| 240 |
} |
|
| 241 | 169 |
|
| 242 | 170 |
/** |
| 171 |
* Fetches saved exports based on configuration, export format and target language. |
|
| 172 |
* |
|
| 173 |
* @author Andreas Otto <andreas.otto@dkd.de> |
|
| 174 |
* @return array Information about exports. |
|
| 175 |
*/ |
|
| 176 |
function fetchExports() {
|
|
| 177 |
$exports = array(); |
|
| 178 |
|
|
| 179 |
$res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('crdate,l10ncfg_id,exportType,translation_lang,filename','tx_l10nmgr_exportdata','l10ncfg_id ='.$this->l10ncfgObj->getData('uid').' AND exportType ='.$this->exportType.' AND translation_lang ='.$this->sysLang);
|
|
| 180 |
|
|
| 181 |
if ( is_array( $res ) ) {
|
|
| 182 |
$exports = $res; |
|
| 183 |
} |
|
| 184 |
|
|
| 185 |
return $exports; |
|
| 186 |
} |
|
| 187 |
|
|
| 188 |
/** |
|
| 189 |
* Renders a list of saved exports as HTML table. |
|
| 190 |
* |
|
| 191 |
* @return string HTML table |
|
| 192 |
*/ |
|
| 193 |
function renderExports() {
|
|
| 194 |
global $LANG; |
|
| 195 |
$out = ''; |
|
| 196 |
$content = array(); |
|
| 197 |
$exports = $this->fetchExports(); |
|
| 198 |
|
|
| 199 |
foreach( $exports AS $export => $exportData ) {
|
|
| 200 |
$content[$export] = sprintf('
|
|
| 201 |
<tr class="db_list_normal"> |
|
| 202 |
<td>%s</td> |
|
| 203 |
<td>%s</td> |
|
| 204 |
<td>%s</td> |
|
| 205 |
<td>%s</td> |
|
| 206 |
<td>%s</td> |
|
| 207 |
</tr>', |
|
| 208 |
t3lib_BEfunc::datetime($exportData['crdate']), |
|
| 209 |
$exportData['l10ncfg_id'], |
|
| 210 |
$exportData['exportType'], |
|
| 211 |
$exportData['translation_lang'], |
|
| 212 |
sprintf('<a href="%suploads/tx_l10nmgr/saved_files/%s">%s</a>', t3lib_div::getIndpEnv('TYPO3_SITE_URL'), $exportData['filename'], $exportData['filename'])
|
|
| 213 |
); |
|
| 214 |
} |
|
| 215 |
|
|
| 216 |
$out = sprintf('
|
|
| 217 |
<table border="0" cellpadding="0" cellspacing="0" class="typo3-dblist"> |
|
| 218 |
<thead> |
|
| 219 |
<tr class="t3-row-header"> |
|
| 220 |
<td>%s</td> |
|
| 221 |
<td>%s</td> |
|
| 222 |
<td>%s</td> |
|
| 223 |
<td>%s</td> |
|
| 224 |
<td>%s</td> |
|
| 225 |
</tr> |
|
| 226 |
</thead> |
|
| 227 |
<tbody> |
|
| 228 |
%s |
|
| 229 |
</tbody> |
|
| 230 |
</table>', |
|
| 231 |
$LANG->getLL('export.overview.date.label'),
|
|
| 232 |
$LANG->getLL('export.overview.configuration.label'),
|
|
| 233 |
$LANG->getLL('export.overview.type.label'),
|
|
| 234 |
$LANG->getLL('export.overview.targetlanguage.label'),
|
|
| 235 |
$LANG->getLL('export.overview.filename.label'),
|
|
| 236 |
implode( chr(10), $content ) |
|
| 237 |
); |
|
| 238 |
|
|
| 239 |
return $out; |
|
| 240 |
} |
|
| 241 |
|
|
| 242 |
/** |
|
| 243 | 243 |
* save the exported files in the file /uploads/tx_l10nmgr/saved_files/ |
| 244 | 244 |
*/ |
| 245 | 245 |
function saveExportFile($fileContent){
|
| ... | ... | |
| 261 | 261 |
} |
| 262 | 262 |
|
| 263 | 263 |
} |
| 264 | ||
| 265 | 264 |
|
| 265 |
|
|
| 266 | 266 |
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/l10nmgr/views/class.tx_l10nmgr_abstractExportView.php']) {
|
| 267 | 267 |
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/l10nmgr/views/class.tx_l10nmgr_abstractExportView.php']); |
| 268 | 268 |
} |
| 269 | ||
| 270 | ||
| 269 |
|
|
| 270 |
|
|
| 271 | 271 |
?> |
| views/class.tx_l10nmgr_l10nHTMLListView.php (working copy) | ||
|---|---|---|
| 140 | 140 |
$fieldCells[] = nl2br(htmlspecialchars(current($tData['previewLanguageValues']))); |
| 141 | 141 |
} |
| 142 | 142 | |
| 143 |
$FtableRows[] = '<tr><td>'.implode('</td><td>',$fieldCells).'</td></tr>';
|
|
| 143 |
$FtableRows[] = '<tr class="db_list_normal"><td>'.implode('</td><td>',$fieldCells).'</td></tr>';
|
|
| 144 | 144 |
} |
| 145 | 145 |
} |
| 146 | 146 |
} |
| ... | ... | |
| 162 | 162 |
} |
| 163 | 163 |
} else $editLink = ''; |
| 164 | 164 | |
| 165 |
$tableRows[] = '<tr class="bgColor3"> |
|
| 165 |
$tableRows[] = '<tr class="t3-row-header"> |
|
| 166 | 166 |
<td colspan="2" style="width:300px;"><a href="'.htmlspecialchars('index.php?id='.t3lib_div::_GET('id').'&showSingle='.rawurlencode($table.':'.$elementUid)).'">'.htmlspecialchars($table.':'.$elementUid).'</a>'.$editLink.'</td>
|
| 167 | 167 |
<td colspan="3" style="width:200px;">'.htmlspecialchars(t3lib_div::arrayToLogString($flags)).'</td> |
| 168 | 168 |
</tr>'; |
| 169 | 169 | |
| 170 | 170 |
if (!$showSingle || $showSingle===$table.':'.$elementUid) {
|
| 171 |
$tableRows[] = '<tr class="bgColor5 tableheader"> |
|
| 171 |
$tableRows[] = '<tr class="bgColor-20 tableheader"> |
|
| 172 | 172 |
<td>Fieldname:</td> |
| 173 | 173 |
<td width="25%">Default:</td> |
| 174 | 174 |
<td width="25%">Translation:</td> |
| ... | ... | |
| 184 | 184 |
} |
| 185 | 185 | |
| 186 | 186 |
if (count($tableRows)) {
|
| 187 |
$output.= '<table border="1" cellpadding="1" cellspacing="1" class="bgColor2" style="border: 1px solid #999999;">'.implode('',$tableRows).'</table>';
|
|
| 187 |
$output.= '<table class="typo3-dblist" border="0" cellpadding="0" cellspacing="0">'.implode('',$tableRows).'</table>';
|
|
| 188 | 188 |
} |
| 189 | 189 |
} |
| 190 | 190 | |
| 191 | 191 |
return $output; |
| 192 | 192 |
} |
| 193 |
|
|
| 194 |
|
|
| 195 |
|
|
| 196 |
|
|
| 197 | 193 |
} |
| 198 | 194 | |
| 199 | 195 | |
| views/class.tx_l10nmgr_l10ncfgDetailView.php (working copy) | ||
|---|---|---|
| 36 | 36 |
*/ |
| 37 | 37 |
class tx_l10nmgr_l10ncfgDetailView {
|
| 38 | 38 | |
| 39 |
var $l10ncfgObj = array(); // Internal array (=datarow of config record) |
|
| 40 |
|
|
| 41 |
/** |
|
| 42 |
* @var $doc |
|
| 43 |
*/ |
|
| 39 |
/** |
|
| 40 |
* @var tx_l10nmgr_l10nConfiguration |
|
| 41 |
*/ |
|
| 42 |
var $l10ncfgObj; // Internal array (=datarow of config record) |
|
| 43 | ||
| 44 |
/** |
|
| 45 |
* @var $doc |
|
| 46 |
*/ |
|
| 44 | 47 |
var $doc = null; |
| 45 | 48 |
|
| 46 | 49 |
/** |
| 47 |
* constructor. Set the internal required objects as paramter in constructor (kind of dependency injection, and communicate the dependencies) |
|
| 48 |
* @param tx_l10nmgr_l10nConfiguration |
|
| 50 |
* constructor. Set the internal required objects as parameter in constructor (kind of dependency injection, and communicate the dependencies) |
|
| 51 |
* @param tx_l10nmgr_l10nConfiguration $l10ncfgObj |
|
| 52 |
* @param template $doc Reference to the calling template object |
|
| 53 |
* @return void |
|
| 49 | 54 |
**/ |
| 50 | 55 |
function tx_l10nmgr_l10ncfgDetailView($l10ncfgObj, $doc) {
|
| 51 |
$this->l10ncfgObj=&$l10ncfgObj; |
|
| 56 |
$this->l10ncfgObj = $l10ncfgObj; |
|
| 52 | 57 |
$this->doc = $doc; |
| 53 | 58 |
} |
| 54 | 59 |
|
| 55 | 60 |
/** |
| 56 | 61 |
* checks if the internal tx_l10nmgr_l10nConfiguration object is valid |
| 62 |
* |
|
| 63 |
* @return void |
|
| 57 | 64 |
**/ |
| 58 | 65 |
function _hasValidConfig() {
|
| 59 | 66 |
if (is_object($this->l10ncfgObj) && $this->l10ncfgObj->isLoaded()) {
|
| ... | ... | |
| 66 | 73 |
/** |
| 67 | 74 |
* returns HTML table with infos for the l10nmgr config. |
| 68 | 75 |
* (needs valid configuration to be set) |
| 76 |
* |
|
| 77 |
* @return string HTML to display |
|
| 69 | 78 |
**/ |
| 70 |
function render() {
|
|
| 71 |
global $LANG; |
|
| 72 |
$content = ''; |
|
| 79 |
function render() {
|
|
| 80 |
global $LANG; |
|
| 81 |
$content = ''; |
|
| 73 | 82 | |
| 74 | 83 |
if (!$this->_hasValidConfig()) {
|
| 75 | 84 |
return $LANG->getLL('general.export.configuration.error.title');
|
| 76 |
} |
|
| 77 |
|
|
| 78 |
$configurationSettings = ' |
|
| 79 |
<table border="1" cellpadding="1" cellspacing="0" width="400"> |
|
| 80 |
<tr class="bgColor5 tableheader"> |
|
| 81 |
<td colspan="4"><strong>'.htmlspecialchars($this->l10ncfgObj->getData('title')).' ['.$this->l10ncfgObj->getData('uid').']</strong></td>
|
|
| 82 |
</tr> |
|
| 83 |
<tr class="bgColor3"> |
|
| 84 |
<td><strong>'.$LANG->getLL('general.list.headline.depth.title').':</strong></td>
|
|
| 85 |
<td>'.htmlspecialchars($this->l10ncfgObj->getData('depth')).' </td>
|
|
| 86 |
<td><strong>'.$LANG->getLL('general.list.headline.tables').':</strong></td>
|
|
| 87 |
<td>'.htmlspecialchars($this->l10ncfgObj->getData('tablelist')).' </td>
|
|
| 88 |
</tr> |
|
| 89 |
<tr class="bgColor3"> |
|
| 90 |
<td><strong>'.$LANG->getLL('general.list.headline.exclude.title').':</strong></td>
|
|
| 91 |
<td>'.htmlspecialchars($this->l10ncfgObj->getData('exclude')).' </td>
|
|
| 92 |
<td><strong>'.$LANG->getLL('general.list.headline.include.title').':</strong></td>
|
|
| 93 |
<td>'.htmlspecialchars($this->l10ncfgObj->getData('include')).' </td>
|
|
| 94 |
</tr> |
|
| 95 |
</table>'; |
|
| 96 |
|
|
| 97 |
$content .= $this->doc->section($LANG->getLL('general.export.configuration.title'), $configurationSettings);
|
|
| 98 |
|
|
| 99 |
return $content; |
|
| 85 |
} |
|
| 100 | 86 | |
| 87 |
$configurationSettings = ' |
|
| 88 |
<table border="0" cellpadding="0" cellspacing="0" class="typo3-dblist"> |
|
| 89 |
<tr class="t3-row-header"> |
|
| 90 |
<td colspan="4"><strong>'.htmlspecialchars($this->l10ncfgObj->getData('title')).' ['.$this->l10ncfgObj->getData('uid').']</strong></td>
|
|
| 91 |
</tr> |
|
| 92 |
<tr class="db_list_normal"> |
|
| 93 |
<td><strong>'.$LANG->getLL('general.list.headline.depth.title').':</strong></td>
|
|
| 94 |
<td>'.htmlspecialchars($this->l10ncfgObj->getData('depth')).' </td>
|
|
| 95 |
<td><strong>'.$LANG->getLL('general.list.headline.tables').':</strong></td>
|
|
| 96 |
<td>'.htmlspecialchars($this->l10ncfgObj->getData('tablelist')).' </td>
|
|
| 97 |
</tr> |
|
| 98 |
<tr class="db_list_normal"> |
|
| 99 |
<td><strong>'.$LANG->getLL('general.list.headline.exclude.title').':</strong></td>
|
|
| 100 |
<td>'.htmlspecialchars($this->l10ncfgObj->getData('exclude')).' </td>
|
|
| 101 |
<td><strong>'.$LANG->getLL('general.list.headline.include.title').':</strong></td>
|
|
| 102 |
<td>'.htmlspecialchars($this->l10ncfgObj->getData('include')).' </td>
|
|
| 103 |
</tr> |
|
| 104 |
</table>'; |
|
| 105 | ||
| 106 |
$content .= $this->doc->section($LANG->getLL('general.export.configuration.title'), $configurationSettings);
|
|
| 107 | ||
| 108 |
return $content; |
|
| 109 | ||
| 101 | 110 |
} |
| 102 | 111 |
|
| 103 | 112 |
|
| templates/cm1_template.html (revision 0) | ||
|---|---|---|
| 1 |
<!-- ###FULLDOC### begin --> |
|
| 2 |
<div class="typo3-fullDoc"> |
|
| 3 |
<!-- Page header with buttons, path details and csh --> |
|
| 4 |
<div id="typo3-docheader"> |
|
| 5 |
<div id="typo3-docheader-row1"> |
|
| 6 |
<div class="buttonsleft">###BUTTONLIST_LEFT###</div> |
|
| 7 |
<div class="buttonsright">###BUTTONLIST_RIGHT###</div> |
|
| 8 |
</div> |
|
| 9 |
<div id="typo3-docheader-row2"> |
|
| 10 |
<!-- |
|
| 11 |
<div class="docheader-row2-left"><div class="docheader-funcmenu">###FUNC_MENU###</div></div> |
|
| 12 |
<div class="docheader-row2-right">###PAGEPATH######PAGEINFO###</div> |
|
| 13 |
--> |
|
| 14 |
</div> |
|
| 15 |
</div> |
|
| 16 |
<!-- Content of module, for instance listing, info or editing --> |
|
| 17 |
<div id="typo3-docbody"> |
|
| 18 |
<div id="typo3-inner-docbody"> |
|
| 19 |
###CONTENT### |
|
| 20 |
</div> |
|
| 21 |
</div> |
|
| 22 |
</div> |
|
| 23 |
<!-- ###FULLDOC### end --> |
|
| 24 | ||
| 25 |
<!-- Grouping the icons on top --> |
|
| 26 | ||
| 27 |
<!-- ###BUTTON_GROUP_WRAP### --> |
|
| 28 |
<div class="buttongroup">###BUTTONS###</div> |
|
| 29 |
<!-- ###BUTTON_GROUP_WRAP### --> |
|
| 30 | ||
| 31 |
<!-- ###BUTTON_GROUPS_LEFT### --> |
|
| 32 |
<!-- ###BUTTON_GROUPS_LEFT### --> |
|
| 33 | ||
| 34 |
<!-- ###BUTTON_GROUPS_RIGHT### --> |
|
| 35 |
<!-- ###BUTTON_GROUP1### -->###RELOAD######SHORTCUT###<!-- ###BUTTON_GROUP1### --> |
|
| 36 |
<!-- ###BUTTON_GROUPS_RIGHT### --> |
|
| templates/mod1_list.js (working copy) | ||
|---|---|---|
| 1 | 1 |
$(document).ready(function() {
|
| 2 |
|
|
| 3 |
var tableheight = 500; |
|
| 4 |
var tableWidth = $("h2").width();
|
|
| 5 |
var tableToScroll = $("#translationObjectList");
|
|
| 6 |
|
|
| 7 |
$("tr:odd", tableToScroll).addClass("odd");
|
|
| 8 |
|
|
| 9 |
if ( tableToScroll.height() > tableheight) {
|
|
| 10 |
tableToScroll.Scrollable(tableheight, tableWidth); |
|
| 11 |
} |
|
| 12 |
|
|
| 13 | 2 |
$("a.tooltip").tooltip({
|
| 14 | 3 |
bodyHandler: function () {
|
| 15 | 4 |
return $($(this).attr("href")).html();
|