N°1736 Portal: Add option to display ManageBrick's current tab description as the brick subtitle

Actually, every brick can now display a subtitle if they populate the sBrickSubtitle variable for the template.
This commit is contained in:
Molkobain
2019-07-30 17:19:07 +02:00
parent 34d4f6b1f9
commit fb6e47e42a
5 changed files with 25 additions and 3 deletions

View File

@@ -387,7 +387,7 @@ footer {
transition: all 0.2s linear;
}
.home .tile:hover {
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.10);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
}
.home .tile .tile_decoration {
display: block;
@@ -514,6 +514,11 @@ footer {
#main-header-title {
margin-bottom: 15px;
}
#main-header-title .subtitle {
display: block;
margin-top: 8px;
margin-bottom: 20px;
}
#main-header-actions {
margin-bottom: 15px;
}
@@ -857,7 +862,7 @@ table .group-actions {
}
.mosaic-item:hover, .mosaic-item:focus {
background-color: #ea7d1e;
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.20);
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
}
.mosaic-item-text .mosaic-item-text-wrapper {
max-height: 100px;

View File

@@ -544,6 +544,11 @@ footer{
}
#main-header-title{
margin-bottom: 15px;
.subtitle{
display: block;
margin-top: 8px;
margin-bottom: 20px;
}
}
#main-header-actions{

View File

@@ -851,6 +851,7 @@ class ManageBrick extends PortalBrick
$aGroup[$oGroupProperty->nodeName] = (int)$oGroupProperty->GetText(0);
break;
case 'title':
case 'description':
case 'condition':
$aGroup[$oGroupProperty->nodeName] = $oGroupProperty->GetText();
break;

View File

@@ -362,6 +362,7 @@ class ManageBrickController extends BrickController
'value' => $aGroup['id'],
'label' => Dict::S($aGroup['title']),
'label_html' => Dict::S($aGroup['title']),
'description' => array_key_exists('description',$aGroup) ? Dict::S($aGroup['description']) : null,
'condition' => $oConditionQuery,
'count' => $iGroupCount,
);
@@ -400,6 +401,9 @@ class ManageBrickController extends BrickController
}
}
// Retrieve the current tab description to set the page subtitle (if it exists)
$aData['sBrickSubtitle'] = !empty($aGroupingTabsValues[$sGroupingTab]['description']) ? $aGroupingTabsValues[$sGroupingTab]['description'] : null;
// - Adding search clause if necessary
$this->ManageSearchValue($aData, $oQuery, $sClass, $aColumnsAttrs);

View File

@@ -16,7 +16,14 @@
{% block pMainHeader %}
<div class="col-xs-12">
<div id="main-header-title">
<h2>{% block pMainHeaderTitle %}{% endblock %}</h2>
<h2>
{% block pMainHeaderTitle %}{% endblock %}
{% block pMainHeaderSubtitle %}
{% if sBrickSubtitle is not null %}
<small class="subtitle">{{ sBrickSubtitle }}</small>
{% endif %}
{% endblock %}
</h2>
</div>
<div id="main-header-actions">
{% block pMainHeaderActions %}