[BUGFIX] Simplify UX in Workspace Module 76/60476/4
authorBenni Mack <benni@typo3.org>
Mon, 15 Apr 2019 11:26:52 +0000 (13:26 +0200)
committerBenni Mack <benni@typo3.org>
Tue, 16 Apr 2019 05:38:44 +0000 (07:38 +0200)
Some minor remarks are changed within the Workspace
Module (ReviewController).

- The preview link in docheader now has a text (makes it readable for newcomers)
- The checkboxes are now in the first column
- The modal box is bigger for increased readability

Resolves: #88151
Releases: master, 9.5
Change-Id: I2bbc581d73b0263d77029c533381c52f527dac42
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60476
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/workspaces/Classes/Controller/ReviewController.php
typo3/sysext/workspaces/Resources/Private/Partials/WorkingTable.html
typo3/sysext/workspaces/Resources/Public/JavaScript/Backend.js

index de8e3d8..3b529b8 100644 (file)
@@ -195,6 +195,7 @@ class ReviewController extends ActionController
             $showButton = $buttonBar->makeLinkButton()
                 ->setHref('#')
                 ->setClasses('t3js-preview-link')
+                ->setShowLabelText(true)
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:tooltip.generatePagePreview'))
                 ->setIcon($iconFactory->getIcon('module-workspaces-action-preview-link', Icon::SIZE_SMALL));
             $buttonBar->addButton($showButton);
index f19fb1c..d002d09 100644 (file)
                                        <table class="table table-striped">
                                                <thead>
                                                <tr>
+                                                       <th><button type="button" class="btn btn-default t3js-toggle-all"><core:icon identifier="actions-document-select" /></span></button></th>
                                                        <th><f:translate key="column.wsTitle" /></th>
                                                        <th><f:translate key="column.liveTitle" /></th>
                                                        <th><f:translate key="column.stage" /></th>
                                                        <th><f:translate key="column.integrity" /></th>
                                                        <th><core:icon identifier="flags-multiple" size="small" /></th>
-                                                       <th class="text-right">
-                                                               <button type="button" class="btn btn-default t3js-toggle-all"><core:icon identifier="actions-document-select" /></span></button>
-                                                       </th>
+                                                       <th></th>
                                                </tr>
                                                </thead>
                                                <tbody>
index 505d510..5ed8c2b 100644 (file)
@@ -513,11 +513,7 @@ define([
           'data-toggle': 'tooltip',
           title: TYPO3.lang['tooltip.openPage']
         }).append(Backend.getPreRenderedIcon('actions-version-page-open')),
-        Backend.getAction(item.allowedAction_delete, 'remove', 'actions-version-document-remove').attr('title', TYPO3.lang['tooltip.discardVersion']),
-        $('<label />', {class: 'btn btn-default btn-checkbox'}).append(
-          $('<input />', {type: 'checkbox'}),
-          $('<span />', {class: 't3-icon fa'})
-        )
+        Backend.getAction(item.allowedAction_delete, 'remove', 'actions-version-document-remove').attr('title', TYPO3.lang['tooltip.discardVersion'])
       );
 
       if (item.integrity.messages !== '') {
@@ -533,10 +529,15 @@ define([
         Backend.latestPath = item.path_Workspace;
         Backend.elements.$tableBody.append(
           $('<tr />').append(
+            $('<th />'),
             $('<th />', {colspan: 6}).text(Backend.latestPath)
           )
         );
       }
+      var $checkbox = $('<label />', {class: 'btn btn-default btn-checkbox'}).append(
+        $('<input />', {type: 'checkbox'}),
+        $('<span />', {class: 't3-icon fa'})
+      );
 
       var rowConfiguration = {
         'data-uid': item.uid,
@@ -556,6 +557,7 @@ define([
 
       Backend.elements.$tableBody.append(
         $('<tr />', rowConfiguration).append(
+          $('<td />').html($checkbox),
           $('<td />', {
             class: 't3js-title-workspace',
             style: item.Workspaces_CollectionLevel > 0 ? 'padding-left: ' + Backend.indentationPadding * item.Workspaces_CollectionLevel + 'px' : ''
@@ -771,12 +773,14 @@ define([
         }
       });
 
-      Modal.show(
-        TYPO3.lang['window.recordInformation'].replace('{0}', $.trim($tr.find('.t3js-title-live').text())),
-        $content,
-        Severity.info,
-        modalButtons
-      );
+      Modal.advanced({
+        type: Modal.default,
+        title: TYPO3.lang['window.recordInformation'].replace('{0}', $.trim($tr.find('.t3js-title-live').text())),
+        content: $content,
+        severity: Severity.info,
+        buttons: modalButtons,
+        size: 'medium'
+      });
     });
   };