Skip to content

Commit

Permalink
Add type, uid and pid to the overview page in the backend module and …
Browse files Browse the repository at this point in the history
…add some styling.
  • Loading branch information
christianbltr committed Sep 8, 2016
1 parent da1f528 commit daae031
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 39 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ current master
[BUGFIX] Make external tools work w/ UTF-8 file names by using CommandUtility::escapeShellArgument(). Thanks to Martin Voss. https://github.com/teaminmedias-pluswerk/ke_search/pull/61.
[BUGFIX] Fix page browser issues with realurl. Thanks to Toben Schmidt. https://forge.typo3.org/issues/77454. https://github.com/teaminmedias-pluswerk/ke_search/pull/62.
[TASK] Do not hide "layout" field in the backend. https://github.com/teaminmedias-pluswerk/ke_search/issues/60.
[TASK] Add type, uid and pid to the overview page in the backend module and add some styling.

Version 2.3.1, July 2016
[TASK] Set version to 2.3.1, just to match the TER version number.
Expand Down
40 changes: 27 additions & 13 deletions Classes/Controller/BackendModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,6 @@ public function startIndexingAction()
}
}

// show information about indexer configurations and number of records
// if action "start indexing" is not selected
if ($this->do != 'startindexer') {
$content .= $this->printIndexerConfigurations($indexerConfigurations);
$content .= $this->printNumberOfRecords();
}

// check for index process lock in registry
// remove lock if older than 12 hours
Expand All @@ -152,6 +146,13 @@ public function startIndexingAction()
$lockTime = null;
}

// show information about indexer configurations and number of records
// if action "start indexing" is not selected
if ($this->do != 'startindexer') {
$content .= $this->printNumberOfRecords();
$content .= $this->printIndexerConfigurations($indexerConfigurations);
}

// show "start indexing" or "remove lock" button
if ($lockTime !== null) {
if (!$this->getBackendUser()->user['admin']) {
Expand Down Expand Up @@ -277,7 +278,7 @@ public function showLastIndexingReport()
$logrow = $this->databaseConnection->exec_SELECTgetSingleRow('*', 'sys_log', 'details LIKE "[ke_search]%"', '',
'tstamp DESC');
if ($logrow !== false) {
$content = '<pre>' . $logrow['details'] . '</pre>';
$content = '<div class="summary"><pre>' . $logrow['details'] . '</pre></div>';
} else {
$content = 'No report found.';
}
Expand Down Expand Up @@ -315,13 +316,26 @@ public function printIndexerConfigurations($indexerConfigurations)
$content = '';
// show indexer names
if ($indexerConfigurations) {
$content .= '<p>' . LocalizationUtility::translate('LLL:EXT:ke_search/Resources/Private/Language/locallang_mod.xml:configurations_found',
'KeSearch') . '</p>';
$content .= '<ul>';
$content .= '<ol class="orderedlist">';
foreach ($indexerConfigurations as $indexerConfiguration) {
$content .= '<li>' . $indexerConfiguration['title'] . '</li>';
$content .= '<li class="summary infobox">'
. '<span class="title">' . $indexerConfiguration['title'] . '</span>'

. ' <span class="tagsmall">'
. $indexerConfiguration['type']
. '</span>'

. ' <span class="tagsmall">'
. 'UID ' . $indexerConfiguration['uid'] . '</span>'
. '</span>'

. ' <span class="tagsmall">'
. 'PID ' . $indexerConfiguration['pid'] . '</span>'
. '</span>'

. '</li>';
}
$content .= '</ul>';
$content .= '</ol>';
}

return $content;
Expand All @@ -338,7 +352,7 @@ public function printNumberOfRecords()
$content = '';
$numberOfRecords = $this->getNumberOfRecordsInIndex();
if ($numberOfRecords) {
$content .= '<p><i>' . LocalizationUtility::translate('LLL:EXT:ke_search/Resources/Private/Language/locallang_mod.xml:index_contains',
$content .= '<p class="box infobox"><i>' . LocalizationUtility::translate('LLL:EXT:ke_search/Resources/Private/Language/locallang_mod.xml:index_contains',
'KeSearch') . ' ' . $numberOfRecords . ' ' . LocalizationUtility::translate('LLL:EXT:ke_search/Resources/Private/Language/locallang_mod.xml:records',
'KeSearch') . ': ';

Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Language/locallang_mod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<label index="index_contains">The index currently contains</label>
<label index="last_indexing">Last indexing was done on</label>
<label index="records">records</label>
<label index="page">page</label>
<label index="type">type</label>
<label index="configurations_found">Indexer configurations have been found:</label>
</languageKey>
<languageKey index="de" type="array">
Expand Down
61 changes: 35 additions & 26 deletions Resources/Public/Css/backendModule.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@
clear: both;
display:block;
}

.box {
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #666;
padding: 5px;
margin-top: 10px;
background: #DDD;
box-shadow: 2px 2px 2px #AFAFAF;
-moz-box-shadow: 2px 2px 2px #AFAFAF;
-webkit-box-shadow: 2px 2px 2px #AFAFAF;
background: #eee;
box-shadow: 1px 1px 1px #AFAFAF;
-moz-box-shadow: 1px 1px 1px #AFAFAF;
-webkit-box-shadow: 1px 1px 1px #AFAFAF;
}
.box .headline {
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #666;
padding: 1px 1px 1px 5px;
padding: 3px 1px 1px 3px;
background: #888;
color: white;
margin-bottom: 3px;
Expand All @@ -30,34 +29,44 @@
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #666;
padding: 1px 1px 1px 5px;
padding: 1px 3px 1px 3px;
background: white;
}

.info, .tag {
.info, .tag, .tagbig, .tagsmall {
padding: 2px 4px;
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid black;
background: white;
margin-left:2px;
margin-right:2px;
}
.tagbig {
font-size:120%;
font-weight:bold;
color:white;
background:#666;
}
.tagsmall {
font-size:80%;
}
.info {
width:48%;
float:left;
}

.summary {
-moz-border-radius: 2px;
border-radius: 2px;
border: 3px solid #666;
padding: 10px;
border: 2px solid #666;
padding: 12px;
margin-top: 10px;
background: white;
box-shadow: 5px 5px 5px #AFAFAF;
-moz-box-shadow: 5px 5px 5px #AFAFAF;
-webkit-box-shadow: 5px 5px 5px #AFAFAF;

box-shadow: 1px 1px 1px #AFAFAF;
-moz-box-shadow: 1px 1px 1px #AFAFAF;
-webkit-box-shadow: 1px 1px 1px #AFAFAF;
}
.infobox {
max-width: 400px;
}
.summary .title {
font-size: 120%;
Expand All @@ -72,21 +81,29 @@
float: right;
text-align: left;
}
.orderedlist {
list-style: none;
margin:0;
padding:0;
}
.infolabel {
font-weight: bold;
}
.value {
text-align: left;
}

a.lock-button:hover,
.lock-button,
.reindex-button,
a.index-button:hover,
.index-button {
font-size:120%;
-moz-border-radius: 2px;
border-radius: 2px;
background: green;
padding: 5px;
width: 250px;
padding: 8px;
max-width: 400px;
display: block;
text-align: center;
font-weight: bold;
Expand All @@ -103,15 +120,7 @@ a.index-button:hover {

a.lock-button:hover,
.lock-button {
-moz-border-radius: 2px;
border-radius: 2px;
background: red;
padding: 5px;
width: 250px;
display: block;
text-align: center;
font-weight: bold;
color: white
}

a.lock-button:hover {
Expand Down

0 comments on commit daae031

Please sign in to comment.