[TASK] Add scheduler task description 21/40921/7
authorAlexandru Catalin Dinis <dinisalexandrucatalin@gmail.com>
Sat, 4 Jul 2015 21:39:10 +0000 (23:39 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 9 Jul 2015 22:03:25 +0000 (00:03 +0200)
Shows the task description below the task name in list.

Releases: master
Resolves: #67332
Resolves: #67830
Change-Id: I986a1df5c578e9d3160603a3b9c3d8e8fb8ce6ab
Reviewed-on: http://review.typo3.org/40921
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_module_scheduler.less [new file with mode: 0644]
typo3/sysext/t3skin/Resources/Private/Styles/t3skin.less
typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css

index 608ce58..3b1bb4f 100644 (file)
@@ -1011,7 +1011,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                                                        $name .= $this->renderTaskProgressBar($progress);
                                                }
                                                if (!empty($additionalInformation)) {
-                                                       $name .= '<div class="additional-information"><span title="' . htmlspecialchars($additionalInformation) . '">[' . GeneralUtility::fixed_lgd_cs(htmlspecialchars($additionalInformation), (int)$this->getBackendUser()->uc['titleLen']) . ']</span></div>';
+                                                       $name .= '<div class="additional-information">' . nl2br(htmlspecialchars($additionalInformation)) . '</div>';
                                                }
                                                // Check if task currently has a running execution
                                                if (!empty($schedulerRecord['serialized_executions'])) {
@@ -1098,17 +1098,17 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                                                }
                                                // Format the execution status,
                                                // including failure feedback, if any
+                                               $taskDesc = '';
                                                if ($schedulerRecord['description'] !== '') {
-                                                       $taskName = '<span title="' . htmlspecialchars($schedulerRecord['description']) . '">' . $name . '</span>';
-                                               } else {
-                                                       $taskName = $name;
+                                                       $taskDesc = '<span class="description">' . nl2br(htmlspecialchars($schedulerRecord['description'])) . '</span>';
                                                }
+                                               $taskName = '<span class="name">' . $name . '</span>';
 
                                                $table[] =
                                                        '<tr class="' . ($showAsDisabled ? 'disabled' : '') . '">'
                                                                . '<td>' . $startExecutionElement . '</td>'
                                                                . '<td class="right">' . $schedulerRecord['uid'] . '</td>'
-                                                               . '<td>' . $taskName . ' ' . $this->makeStatusLabel($labels) . '</td>'
+                                                               . '<td>' . $this->makeStatusLabel($labels) . $taskName . $taskDesc . '</td>'
                                                                . '<td>' . $execType . '</td>'
                                                                . '<td>' . $frequency . '</td>'
                                                                . '<td>' . $multiple . '</td>'
@@ -1139,7 +1139,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                        }
                        $this->getDatabaseConnection()->sql_free_result($res);
 
-                       $this->view->assign('table', '<div class="table-fit"><table class="table table-striped table-hover">' . implode(LF, $table) . '</table></div>');
+                       $this->view->assign('table', '<table class="table table-striped table-hover">' . implode(LF, $table) . '</table>');
 
                        // Server date time
                        $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] . ' T (e';
@@ -1161,7 +1161,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                        if (empty($label['text'])) {
                                continue;
                        }
-                       $htmlLabels[] = '<span class="label label-' . $label['class'] . '" title="' . htmlspecialchars($label['description']) . '">' . $label['text'] . '</span>';
+                       $htmlLabels[] = '<span class="label label-' . htmlspecialchars($label['class']) . ' pull-right" title="' . htmlspecialchars($label['description']) . '">' . htmlspecialchars($label['text']) . '</span>';
                }
 
                return implode('&nbsp;', $htmlLabels);
diff --git a/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_module_scheduler.less b/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_module_scheduler.less
new file mode 100644 (file)
index 0000000..cf6d68e
--- /dev/null
@@ -0,0 +1,19 @@
+
+//
+// Scheduler module
+//
+.tx_scheduler_mod1 {
+       .table {
+               td {
+                       vertical-align: top;
+               }
+               span.name {
+                       display: block;
+               }
+               span.description {
+                       font-style: italic;
+                       white-space: normal;
+                       color: @gray;
+               }
+       }
+}
index 538be22..da1cd30 100644 (file)
 @import "TYPO3/_main_scaffolding.less";
 @import "TYPO3/_module_menu.less";
 @import "TYPO3/_module_database.less";
+@import "TYPO3/_module_scheduler.less";
 @import "TYPO3/_module_web_page.less";
 @import "TYPO3/_topbar.less";
 @import "TYPO3/_debugconsole.less";
index 4bd4579..9ec8d0a 100644 (file)
@@ -12346,6 +12346,17 @@ iframe {
 .query-builder .indent {
   padding-left: 20px;
 }
+.tx_scheduler_mod1 .table td {
+  vertical-align: top;
+}
+.tx_scheduler_mod1 .table span.name {
+  display: block;
+}
+.tx_scheduler_mod1 .table span.description {
+  font-style: italic;
+  white-space: normal;
+  color: #737373;
+}
 .t3-grid-table {
   border-collapse: separate;
   border-spacing: 10px 0;