Index: typo3/db_new.php
===================================================================
--- typo3/db_new.php (revision 10098)
+++ typo3/db_new.php (working copy)
@@ -121,6 +121,7 @@
var $newPagesInto;
var $newContentInto;
var $newPagesAfter;
+ var $newPagesSelectPosition = 1;
var $web_list_modTSconfig;
var $allowedNewTables;
var $deniedNewTables;
@@ -376,6 +377,20 @@
$secondLevelLast = 'doc->backPath,'gfx/ol/line.gif', 'width="18" height="16"') . ' alt="" />
doc->backPath, 'gfx/ol/joinbottom.gif', 'width="18" height="16"') . ' alt="" />';
+ // Get TSconfig for current page
+ $pageTS = t3lib_BEfunc::getPagesTSconfig($this->id);
+ // Finish initializing new pages options with TSconfig
+ // Each new page option may be hidden by TSconfig
+ if (isset($pageTS['mod.']['wizards.']['newRecord.']['pages.']['show.']['pageInside']) && $pageTS['mod.']['wizards.']['newRecord.']['pages.']['show.']['pageInside'] === '0') {
+ $this->newPagesInto = 0;
+ }
+ if (isset($pageTS['mod.']['wizards.']['newRecord.']['pages.']['show.']['pageAfter']) && $pageTS['mod.']['wizards.']['newRecord.']['pages.']['show.']['pageAfter'] === '0') {
+ $this->newPagesAfter = 0;
+ }
+ if (isset($pageTS['mod.']['wizards.']['newRecord.']['pages.']['show.']['pageSelectPosition']) && $pageTS['mod.']['wizards.']['newRecord.']['pages.']['show.']['pageSelectPosition'] === '0') {
+ $this->newPagesSelectPosition = 0;
+ }
+
// Slight spacer from header:
$this->code .= $halfLine;
@@ -385,7 +400,7 @@
$pageIcon = t3lib_iconWorks::getSpriteIconForRecord($table,array());
$newPageIcon = t3lib_iconWorks::getSpriteIcon('actions-page-new');
- $rowContent = $firstLevel . $newPageIcon . ' ' . $GLOBALS['LANG']->getLL('createNewPage') . '';
+ $rowContent = '';
// New pages INSIDE this pages
if ($this->newPagesInto
@@ -420,19 +435,25 @@
}
- // Link to page-wizard:
- $rowContent.= '
' . $secondLevelLast .
- '' .
- $pageIcon .
- htmlspecialchars($GLOBALS['LANG']->getLL('pageSelectPosition')) .
- '';
+ if ($this->newPagesSelectPosition) {
+ // Link to page-wizard:
+ $rowContent.= '
' . $secondLevelLast .
+ '' .
+ $pageIcon .
+ htmlspecialchars($GLOBALS['LANG']->getLL('pageSelectPosition')) .
+ '';
- // Half-line:
- $rowContent.= '
' . $halfLine;
+ // Half-line:
+ $rowContent.= '
' . $halfLine;
+ }
+ // Add row header if not empty
+ if (!empty($rowContent)) {
+ $rowContent = $firstLevel . $newPageIcon . ' ' . $GLOBALS['LANG']->getLL('createNewPage') . '' . $rowContent;
+ }
// Compile table row to show the icon for "new page (select position)"
$startRows = array();
- if ($this->showNewRecLink('pages')) {
+ if ($this->showNewRecLink('pages') && !empty($rowContent)) {
$startRows[] = '