151 $GLOBALS[
'LANG']->includeLLFile(
'EXT:lang/locallang_mod_web_list.xlf');
164 $this->perms_clause =
$GLOBALS[
'BE_USER']->getPagePermsClause(1);
189 $this->MOD_MENU = array(
190 'bigControlPanel' =>
'',
207 if ($this->clear_cache) {
209 $tce->stripslashes_values = 0;
210 $tce->start(array(), array());
211 $tce->clear_cacheCmd($this->
id);
221 public function main() {
224 $this->doc->backPath =
$GLOBALS[
'BACK_PATH'];
225 $this->doc->setModuleTemplate(
'EXT:recordlist/Resources/Private/Templates/db_list.html');
228 $access = is_array($this->pageinfo) ? 1 : 0;
231 if ($this->modTSconfig[
'properties'][
'enableDisplayBigControlPanel'] ===
'activated') {
232 $this->MOD_SETTINGS[
'bigControlPanel'] = TRUE;
233 } elseif ($this->modTSconfig[
'properties'][
'enableDisplayBigControlPanel'] ===
'deactivated') {
234 $this->MOD_SETTINGS[
'bigControlPanel'] = FALSE;
237 if ($this->modTSconfig[
'properties'][
'enableClipBoard'] ===
'activated') {
238 $this->MOD_SETTINGS[
'clipBoard'] = TRUE;
239 } elseif ($this->modTSconfig[
'properties'][
'enableClipBoard'] ===
'deactivated') {
240 $this->MOD_SETTINGS[
'clipBoard'] = FALSE;
243 if ($this->modTSconfig[
'properties'][
'enableLocalizationView'] ===
'activated') {
244 $this->MOD_SETTINGS[
'localization'] = TRUE;
245 } elseif ($this->modTSconfig[
'properties'][
'enableLocalizationView'] ===
'deactivated') {
246 $this->MOD_SETTINGS[
'localization'] = FALSE;
251 $dblist->backPath =
$GLOBALS[
'BACK_PATH'];
253 $dblist->calcPerms =
$GLOBALS[
'BE_USER']->calcPerms($this->pageinfo);
254 $dblist->thumbs =
$GLOBALS[
'BE_USER']->uc[
'thumbnailsByDefault'];
256 $dblist->allFields = $this->MOD_SETTINGS[
'bigControlPanel'] || $this->table ? 1 : 0;
257 $dblist->localizationView = $this->MOD_SETTINGS[
'localization'];
258 $dblist->showClipboard = 1;
259 $dblist->disableSingleTableView = $this->modTSconfig[
'properties'][
'disableSingleTableView'];
260 $dblist->listOnlyInSingleTableMode = $this->modTSconfig[
'properties'][
'listOnlyInSingleTableView'];
261 $dblist->hideTables = $this->modTSconfig[
'properties'][
'hideTables'];
262 $dblist->hideTranslations = $this->modTSconfig[
'properties'][
'hideTranslations'];
263 $dblist->tableTSconfigOverTCA = $this->modTSconfig[
'properties'][
'table.'];
264 $dblist->alternateBgColors = $this->modTSconfig[
'properties'][
'alternateBgColors'] ? 1 : 0;
267 $dblist->newWizards = $this->modTSconfig[
'properties'][
'newWizards'] ? 1 : 0;
270 $dblist->MOD_MENU = array(
'bigControlPanel' =>
'',
'clipBoard' =>
'',
'localization' =>
'');
272 $clickTitleMode = trim($this->modTSconfig[
'properties'][
'clickTitleMode']);
273 $dblist->clickTitleMode = $clickTitleMode ===
'' ?
'edit' : $clickTitleMode;
278 $dblist->clipObj->initializeClipboard();
282 if ($this->cmd ==
'setCB') {
288 if (!$this->MOD_SETTINGS[
'clipBoard']) {
290 $CB[
'setP'] =
'normal';
293 $dblist->clipObj->setCmd($CB);
295 $dblist->clipObj->cleanCurrent();
297 $dblist->clipObj->endClipboard();
300 $dblist->dontShowClipControlPanels = (!$this->MOD_SETTINGS[
'bigControlPanel'] && $dblist->clipObj->current ==
'normal' && !$this->modTSconfig[
'properties'][
'showClipControlPanelsDespiteOfCMlayers']);
302 if ($access || ($this->
id === 0 && $this->search_levels > 0 && strlen($this->search_field) > 0)) {
305 if ($this->cmd ==
'delete') {
309 foreach ($items as $iK => $value) {
310 $iKParts = explode(
'|', $iK);
311 $cmd[$iKParts[0]][$iKParts[1]][
'delete'] = 1;
314 $tce->stripslashes_values = 0;
315 $tce->start(array(),
$cmd);
316 $tce->process_cmdmap();
317 if (isset(
$cmd[
'pages'])) {
325 $dblist->start($this->
id, $this->table, $this->pointer, $this->search_field, $this->search_levels, $this->showLimit);
326 $dblist->setDispFields();
328 if (\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded(
'version')) {
329 $dblist->HTMLcode .= $this->doc->getVersionSelector($this->
id);
332 $dblist->generateList();
333 $listUrl = substr($dblist->listURL(), strlen(
$GLOBALS[
'BACK_PATH']));
335 $this->doc->JScode = $this->doc->wrapScriptTags(
' 336 function jumpExt(URL,anchor) { // 337 var anc = anchor?anchor:""; 338 window.location.href = URL+(T3_THIS_LOCATION?"&returnUrl="+T3_THIS_LOCATION:"")+anc; 341 function jumpSelf(URL) { // 342 window.location.href = URL+(T3_RETURN_URL?"&returnUrl="+T3_RETURN_URL:""); 346 function setHighlight(id) { // 347 top.fsMod.recentIds["web"]=id; 348 top.fsMod.navFrameHighlightedID["web"]="pages"+id+"_"+top.fsMod.currentBank; // For highlighting 350 if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav) { 351 top.content.nav_frame.refresh_nav(); 354 ' . $this->doc->redirectUrls($listUrl) .
' 355 ' . $dblist->CBfunctions() .
' 356 function editRecords(table,idList,addParams,CBflag) { // 357 window.location.href="' .
$GLOBALS[
'BACK_PATH'] .
'alt_doc.php?returnUrl=' . rawurlencode(
GeneralUtility::getIndpEnv(
'REQUEST_URI')) .
'&edit["+table+"]["+idList+"]=edit"+addParams; 359 function editList(table,idList) { // 362 // Checking how many is checked, how many is not 364 var pos = idList.indexOf(","); 366 if (cbValue(table+"|"+idList.substr(pointer,pos-pointer))) { 367 list+=idList.substr(pointer,pos-pointer)+","; 370 pos = idList.indexOf(",",pointer); 372 if (cbValue(table+"|"+idList.substr(pointer))) { 373 list+=idList.substr(pointer)+","; 376 return list ? list : idList; 379 if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->
id .
'; 382 $this->doc->getContextMenuCode();
386 $this->body = $this->doc->header($this->pageinfo[
'title']);
387 $this->body .=
'<form action="' . htmlspecialchars($dblist->listURL()) .
'" method="post" name="dblistForm">';
388 $this->body .= $dblist->HTMLcode;
389 $this->body .=
'<input type="hidden" name="cmd_table" /><input type="hidden" name="cmd" /></form>';
391 if ($dblist->HTMLcode) {
393 if ($dblist->table) {
394 $this->body .= $dblist->fieldSelectBox($dblist->table);
400 Listing options for extended view, clipboard and localization view 402 <div id="typo3-listOptions"> 403 <form action="" method="post">';
405 if ($this->modTSconfig[
'properties'][
'enableDisplayBigControlPanel'] ===
'selectable') {
406 $this->body .=
BackendUtility::getFuncCheck($this->
id,
'SET[bigControlPanel]', $this->MOD_SETTINGS[
'bigControlPanel'],
'', $this->table ?
'&table=' . $this->table :
'',
'id="checkLargeControl"');
407 $this->body .=
'<label for="checkLargeControl">' .
BackendUtility::wrapInHelp(
'xMOD_csh_corebe',
'list_options',
$GLOBALS[
'LANG']->getLL(
'largeControl', TRUE)) .
'</label><br />';
410 if ($this->modTSconfig[
'properties'][
'enableClipBoard'] ===
'selectable') {
411 if ($dblist->showClipboard) {
412 $this->body .=
BackendUtility::getFuncCheck($this->
id,
'SET[clipBoard]', $this->MOD_SETTINGS[
'clipBoard'],
'', $this->table ?
'&table=' . $this->table :
'',
'id="checkShowClipBoard"');
413 $this->body .=
'<label for="checkShowClipBoard">' .
BackendUtility::wrapInHelp(
'xMOD_csh_corebe',
'list_options',
$GLOBALS[
'LANG']->getLL(
'showClipBoard', TRUE)) .
'</label><br />';
417 if ($this->modTSconfig[
'properties'][
'enableLocalizationView'] ===
'selectable') {
418 $this->body .=
BackendUtility::getFuncCheck($this->
id,
'SET[localization]', $this->MOD_SETTINGS[
'localization'],
'', $this->table ?
'&table=' . $this->table :
'',
'id="checkLocalization"');
419 $this->body .=
'<label for="checkLocalization">' .
BackendUtility::wrapInHelp(
'xMOD_csh_corebe',
'list_options',
$GLOBALS[
'LANG']->getLL(
'localization', TRUE)) .
'</label><br />';
426 if ($this->MOD_SETTINGS[
'clipBoard'] && $dblist->showClipboard && ($dblist->HTMLcode || $dblist->clipObj->hasElements())) {
427 $this->body .=
'<div class="db_list-dashboard">' . $dblist->clipObj->printClipboard() .
'</div>';
430 if (!$this->modTSconfig[
'properties'][
'disableSearchBox'] && ($dblist->HTMLcode || $dblist->searchString !==
'')) {
432 $this->body .=
'<div class="db_list-searchbox">' . $this->doc->section($sectionTitle, $dblist->getSearchBox(), FALSE, TRUE, FALSE, TRUE) .
'</div>';
435 $footerContentHook =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'recordlist/mod1/index.php'][
'drawFooterHook'];
436 if (is_array($footerContentHook)) {
437 foreach ($footerContentHook as $hook) {
443 $docHeaderButtons = $dblist->getButtons();
445 'CSH' => $docHeaderButtons[
'csh'],
446 'CONTENT' => $this->body,
447 'EXTRACONTAINERCLASS' => $this->table ?
'singletable' :
'' 450 $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
452 $this->content = $this->doc->render(
'DB list', $this->content);
static getFuncCheck($mainParams, $elementName, $currentValue, $script='', $addParams='', $tagParams='')
static readPageAccess($id, $perms_clause)
static getModTSconfig($id, $TSref)
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
static getIndpEnv($getEnvName)
static makeInstance($className)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static callUserFunction($funcName, &$params, &$ref, $checkPrefix='', $errorMode=0)
static getModuleUrl($moduleName, $urlParameters=array(), $backPathOverride=FALSE, $returnAbsoluteUrl=FALSE)
static wrapInHelp($table, $field, $text='', array $overloadHelpText=array())
static getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')
static setUpdateSignal($set='', $params='')
static sanitizeLocalUrl($url='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]