[BUGFIX] Fix alignment for button "copy default content elements" 14/28214/2
authorPatrick Broens <patrick@patrickbroens.nl>
Mon, 10 Mar 2014 10:44:05 +0000 (11:44 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 11 Mar 2014 16:49:54 +0000 (17:49 +0100)
In the page module in the "languages" view, the alignment of the button
"copy default content elements" is off. The button needs some padding on
the left side.

This patch fixes this by adding a div which gets the padding. It also
replaces the br's in front of this button with CSS for spacing.

Change-Id: Ic21097e8db078f2a2612c89d9496bf20fa5c0585
Resolves: #56636
Releases: 6.2
Reviewed-on: https://review.typo3.org/28214
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Sebastian Fischer
Tested-by: Sebastian Fischer
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/t3skin/Resources/Public/Css/structure/module_web_page.css

index 63edde0..1ff30ed 100644 (file)
@@ -443,7 +443,10 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                                if ($this->tt_contentConfig['languageMode']) {
                                                        $languageColumn[$key][$lP] = $head[$key] . $content[$key];
                                                        if (!$this->defLangBinding) {
-                                                               $languageColumn[$key][$lP] .= '<br /><br />' . $this->newLanguageButton($this->getNonTranslatedTTcontentUids($defLanguageCount[$key], $id, $lP), $lP);
+                                                               $languageColumn[$key][$lP] .= $this->newLanguageButton(
+                                                                       $this->getNonTranslatedTTcontentUids($defLanguageCount[$key], $id, $lP),
+                                                                       $lP
+                                                               );
                                                        }
                                                }
                                                if (is_array($row) && !VersionState::cast($row['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {
@@ -519,7 +522,10 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        foreach ($cList as $k => $key) {
                                                $languageColumn[$key][$lP] = $head[$key] . $content[$key];
                                                if (!$this->defLangBinding) {
-                                                       $languageColumn[$key][$lP] .= '<br /><br />' . $this->newLanguageButton($this->getNonTranslatedTTcontentUids($defLanguageCount[$key], $id, $lP), $lP);
+                                                       $languageColumn[$key][$lP] .= $this->newLanguageButton(
+                                                               $this->getNonTranslatedTTcontentUids($defLanguageCount[$key], $id, $lP),
+                                                               $lP
+                                                       );
                                                }
                                        }
                                } else {
@@ -628,7 +634,10 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                                foreach ($defLanguageCount[$cKey] as $defUid) {
                                                        $cCont = array();
                                                        foreach ($langListArr as $lP) {
-                                                               $cCont[] = $defLangBinding[$cKey][$lP][$defUid] . '<br/>' . $this->newLanguageButton($this->getNonTranslatedTTcontentUids(array($defUid), $id, $lP), $lP);
+                                                               $cCont[] = $defLangBinding[$cKey][$lP][$defUid] . $this->newLanguageButton(
+                                                                       $this->getNonTranslatedTTcontentUids(array($defUid), $id, $lP),
+                                                                       $lP
+                                                               );
                                                        }
                                                        $out .= '
                                                        <tr>
@@ -1450,7 +1459,11 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                        }
                        // Copy for language:
                        $onClick = 'window.location.href=\'' . $GLOBALS['SOBE']->doc->issueCommand($params) . '\'; return false;';
-                       $theNewButton = $GLOBALS['SOBE']->doc->t3Button($onClick, $GLOBALS['LANG']->getLL('newPageContent_copyForLang') . ' [' . count($defLanguageCount) . ']');
+                       $theNewButton = '<div class="t3-page-lang-copyce">' .
+                               $GLOBALS['SOBE']->doc->t3Button(
+                                       $onClick,
+                                       $GLOBALS['LANG']->getLL('newPageContent_copyForLang') . ' [' . count($defLanguageCount) . ']'
+                               ) . '</div>';
                        return $theNewButton;
                }
        }
index 8cb1f34..d792952 100644 (file)
@@ -112,10 +112,15 @@ table.typo3-page-columnsMode img.c-divider {
        margin: 10px 0 5px 0;
 }
 
-td.t3-gridCell div.t3-page-ce {
+td.t3-gridCell div.t3-page-ce,
+div.t3-page-lang-copyce {
        padding: 1px 12px 0 12px;
 }
 
+div.t3-page-lang-copyce {
+       margin-top: 30px;
+}
+
 .t3-page-ce.active .t3-page-ce-body {
        margin: 0;
 }