Fixed bug #16852: Bugfix: Grid View must be combined with Column View and get some...
authorSteffen Kamper <info@sk-typo3.de>
Tue, 28 Dec 2010 00:38:59 +0000 (00:38 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 28 Dec 2010 00:38:59 +0000 (00:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9929 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/layout/locallang.xml
typo3/sysext/t3skin/stylesheets/structure/module_web_page.css
typo3/sysext/t3skin/stylesheets/visual/module_web_page.css

index f1e8526..c0be168 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
 
 2010-12-27  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #16852: Bugfix: Grid View must be combined with Column View and get some visual usability enhancements (Thanks to Jo Hasenau)
        * Add sysext pagetree to required extension list
        * Fixed bug #16387: Optimize stdWrap usage for TypoScript content element QTOBJECT (Thanks to Jo Hasenau)
        * Fixed bug #16429: Optimize stdWrap usage for tslib_content (Thanks to Jo Hasenau)
index 42398b7..3fec659 100755 (executable)
@@ -537,14 +537,14 @@ class tx_cms_layout extends recordList {
                                // For EACH column, fit the rendered content into a table cell:
                                $out = '';
 
-                               if ($this->tt_contentConfig['showAsGrid']) {
-                                       $backendLayoutUid = $this->getSelectedBackendLayoutUid($id);
-                                       $backendLayoutRecord = t3lib_BEfunc::getRecord('be_layouts', intval($backendLayoutUid));
-                                       if (empty($backendLayoutRecord['config'])) {
-                                               // TODO: show a message that no layout was found
-                                               $this->tt_contentConfig['showAsGrid'] = 0;
-                                       }
-                               }
+                               $backendLayoutUid = $this->getSelectedBackendLayoutUid($id);
+                               $backendLayoutRecord = t3lib_BEfunc::getRecord('be_layouts', intval($backendLayoutUid));
+                               if (empty($backendLayoutRecord['config'])) {
+                    $this->tt_contentConfig['showAsGrid'] = FALSE;
+                               } else {
+                    $this->tt_contentConfig['showAsGrid'] = TRUE;
+
+                }
 
                                if (!$this->tt_contentConfig['showAsGrid']) {
                                        foreach ($cList as $k => $key) {
@@ -620,17 +620,20 @@ class tx_cms_layout extends recordList {
                                                                        (isset($columnConfig['colspan']) ? ' colspan="' . $columnConfig['colspan'] . '"' : '') .
                                                                        (isset($columnConfig['rowspan']) ? ' rowspan="' . $columnConfig['rowspan'] . '"' : '') .
                                                                        ' class="t3-gridCell t3-page-column t3-page-column-' . $columnKey .
-                                                                       (!isset($columnConfig['colPos']) ? ' t3-gridCell-disabled' : '') .
+                                     (!isset($columnConfig['colPos']) ? ' t3-gridCell-unassigned' : '') .
+                                     ((isset($columnConfig['colPos']) && ! $head[$columnKey]) ? ' t3-gridCell-restricted' : '') .
                                                                        (isset($columnConfig['colspan']) ? ' t3-gridCell-width' . $columnConfig['colspan'] : '') .
                                                                        (isset($columnConfig['rowspan']) ? ' t3-gridCell-height' . $columnConfig['rowspan'] : '') . '">';
 
                                                        // Draw the pre-generated header with edit and new buttons if a colPos is assigned.
                                                        // If not, a new header without any buttons will be generated.
-                                                       if (isset($columnConfig['colPos'])) {
+                                                       if (isset($columnConfig['colPos']) && $head[$columnKey]) {
                                                                $grid .= $head[$columnKey] . $content[$columnKey];
+                                                       } else if ($head[$columnKey]) {
+                                                               $grid .= $this->tt_content_drawColHeader($GLOBALS['LANG']->getLL('notAssigned'), '', '');
                                                        } else {
-                                                               $grid .= $this->tt_content_drawColHeader($columnConfig['name'], '', '');
-                                               }
+                                                               $grid .= $this->tt_content_drawColHeader($GLOBALS['LANG']->getLL('noAccess'), '', '');
+                                                       }
 
                                                        $grid .= '</td>';
                                                }
@@ -2739,4 +2742,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/cms/layout/class.tx_cms_layout.php']);
 }
 
-?>
+?>
\ No newline at end of file
index dbef98e..76174a4 100755 (executable)
@@ -323,7 +323,6 @@ class SC_db_layout {
                                1 => $LANG->getLL('m_function_1'),
                                2 => $LANG->getLL('m_function_2'),
                                3 => $LANG->getLL('pageInformation'),
-                               4 => $LANG->getLL('gridView')
                        ),
                        'language' => array(
                                0 => $LANG->getLL('m_default')
@@ -1415,4 +1414,4 @@ $SOBE->clearCache();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
+?>
\ No newline at end of file
index a3fb0dc..08cfa50 100755 (executable)
@@ -46,6 +46,7 @@
                        <label index="newPage2">New page</label>
                        <label index="noAccess">No edit access</label>
                        <label index="noAccess_msg">You do not have access to edit the requested record.</label>
+                       <label index="notAssigned">Not assigned</label>
                        <label index="undoLastChange">Undo/Redo last change (%s ago)</label>
                        <label index="recordHistory">View record change history</label>
                        <label index="viewContent">Viewing content of</label>
@@ -87,4 +88,4 @@
                        <label index="goToListModuleMessage">The current page is of the type "Sysfolder". Sysfolders usually don't contain content elements but are used for collecting other types of records in a single folder.</label>
                </languageKey>
        </data>
-</T3locallang>
\ No newline at end of file
+</T3locallang>
index 2b05949..53738b0 100644 (file)
@@ -85,3 +85,7 @@ table.typo3-page-stdlist tr.c-table-row-spacer td {
 table.typo3-page-stdlist tr td div.typo3-DBctrl {
        padding: 2px;
 }
+
+td.t3-gridCell div.t3-page-ce {
+       padding: 1px 5px 5px 5px;
+}
\ No newline at end of file
index b29dfe5..22ab87c 100644 (file)
@@ -82,3 +82,23 @@ table#typo3-page-stdlist tr td.c-headLine {
 table.typo3-page-buttons td {
        padding-right: 10px;
 }
+
+td.t3-gridCell-restricted {
+       background-color: #e8e0e0;
+}
+
+td.t3-gridCell-unassigned {
+       background-color: #e5e5e5;
+}
+
+td.t3-gridCell-restricted div.t3-row-header, td.t3-gridCell-unassigned div.t3-row-header {
+       -moz-opacity: 0.4;
+       opacity: .40;
+       filter: alpha(opacity = 40);
+}
+
+td.t3-gridCell-restricted div.t3-row-header div, td.t3-gridCell-unassigned div.t3-row-header div {
+       -moz-opacity: 0.6;
+       opacity: .60;
+       filter: alpha(opacity = 60);
+}
\ No newline at end of file