mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°3629 - Activity panel: Add "activity_panel.show_author_name_below_entries" config. param. to show the author friendlyname under the last entry
This commit is contained in:
@@ -1213,6 +1213,14 @@ class Config
|
|||||||
'source_of_value' => '',
|
'source_of_value' => '',
|
||||||
'show_in_conf_sample' => false,
|
'show_in_conf_sample' => false,
|
||||||
],
|
],
|
||||||
|
'activity_panel.show_author_name_below_entries' => [
|
||||||
|
'type' => 'bool',
|
||||||
|
'description' => 'Whether or not to show the author friendlyname next to the date on the last entry',
|
||||||
|
'default' => false,
|
||||||
|
'value' => '',
|
||||||
|
'source_of_value' => '',
|
||||||
|
'show_in_conf_sample' => true,
|
||||||
|
],
|
||||||
'activity_panel.lock_watcher_period' => [
|
'activity_panel.lock_watcher_period' => [
|
||||||
'type' => 'integer',
|
'type' => 'integer',
|
||||||
'description' => 'Period (in second) between lock status update.',
|
'description' => 'Period (in second) between lock status update.',
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ $ibo-activity-entry--sub-information--margin-top: 4px !default;
|
|||||||
$ibo-activity-entry--sub-information--margin-bottom: $ibo-activity-entry--sub-information--margin-top !default;
|
$ibo-activity-entry--sub-information--margin-bottom: $ibo-activity-entry--sub-information--margin-top !default;
|
||||||
$ibo-activity-entry--sub-information--text-color: $ibo-color-grey-700 !default;
|
$ibo-activity-entry--sub-information--text-color: $ibo-color-grey-700 !default;
|
||||||
|
|
||||||
|
$ibo-activity-entry--author-name--sibling-spacing: 0.2rem !default;
|
||||||
|
|
||||||
/* Entry group */
|
/* Entry group */
|
||||||
.ibo-activity-panel--entry-group{
|
.ibo-activity-panel--entry-group{
|
||||||
&:not(:last-child){
|
&:not(:last-child){
|
||||||
@@ -64,7 +66,7 @@ $ibo-activity-entry--sub-information--text-color: $ibo-color-grey-700 !default;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Entry */
|
/* Entry */
|
||||||
.ibo-activity-entry{
|
.ibo-activity-entry {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
@@ -207,13 +209,23 @@ $ibo-activity-entry--sub-information--text-color: $ibo-color-grey-700 !default;
|
|||||||
color: $ibo-activity-entry--main-information-icon--text-color;
|
color: $ibo-activity-entry--main-information-icon--text-color;
|
||||||
font-size: $ibo-activity-entry--main-information-icon--font-size;
|
font-size: $ibo-activity-entry--main-information-icon--font-size;
|
||||||
}
|
}
|
||||||
.ibo-activity-entry--main-information-content{
|
|
||||||
|
.ibo-activity-entry--main-information-content {
|
||||||
|
|
||||||
}
|
}
|
||||||
.ibo-activity-entry--sub-information{
|
|
||||||
margin-top: $ibo-activity-entry--sub-information--margin-top;
|
|
||||||
text-align: left;
|
|
||||||
color: $ibo-activity-entry--sub-information--text-color;
|
|
||||||
|
|
||||||
@extend %ibo-font-ral-nor-50;
|
.ibo-activity-entry--sub-information {
|
||||||
|
margin-top: $ibo-activity-entry--sub-information--margin-top;
|
||||||
|
text-align: left;
|
||||||
|
color: $ibo-activity-entry--sub-information--text-color;
|
||||||
|
|
||||||
|
@extend %ibo-font-ral-nor-50;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ibo-activity-entry--author-name {
|
||||||
|
&:after {
|
||||||
|
content: "-";
|
||||||
|
margin-left: $ibo-activity-entry--author-name--sibling-spacing;
|
||||||
|
margin-right: $ibo-activity-entry--author-name--sibling-spacing;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -72,6 +72,7 @@ $(function()
|
|||||||
entry: '[data-role="ibo-activity-entry"]',
|
entry: '[data-role="ibo-activity-entry"]',
|
||||||
entry_medallion: '[data-role="ibo-activity-entry--medallion"]',
|
entry_medallion: '[data-role="ibo-activity-entry--medallion"]',
|
||||||
entry_main_information: '[data-role="ibo-activity-entry--main-information"]',
|
entry_main_information: '[data-role="ibo-activity-entry--main-information"]',
|
||||||
|
entry_author_name: '[data-role="ibo-activity-entry--author-name"]',
|
||||||
entry_datetime: '[data-role="ibo-activity-entry--datetime"]',
|
entry_datetime: '[data-role="ibo-activity-entry--datetime"]',
|
||||||
edits_entry_long_description: '[data-role="ibo-edits-entry--long-description"]',
|
edits_entry_long_description: '[data-role="ibo-edits-entry--long-description"]',
|
||||||
edits_entry_long_description_toggler: '[data-role="ibo-edits-entry--long-description-toggler"]',
|
edits_entry_long_description_toggler: '[data-role="ibo-edits-entry--long-description-toggler"]',
|
||||||
@@ -1015,16 +1016,22 @@ $(function()
|
|||||||
aFilterOptions.push($(this).val());
|
aFilterOptions.push($(this).val());
|
||||||
});
|
});
|
||||||
|
|
||||||
for(let sTargetEntryType of aTargetEntryTypes)
|
for (let sTargetEntryType of aTargetEntryTypes) {
|
||||||
{
|
|
||||||
me[sCallbackMethod](sTargetEntryType, aFilterOptions);
|
me[sCallbackMethod](sTargetEntryType, aFilterOptions);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Show only the last visible entry's medallion of a group (cannot be done through CSS yet 😕)
|
// Show only the last visible entry's medallion of a group (cannot be done through CSS yet 😕)
|
||||||
this.element.find(this.js_selectors.entry_group).each(function(){
|
this.element.find(this.js_selectors.entry_group).each(function () {
|
||||||
|
// Reset everything
|
||||||
$(this).find(me.js_selectors.entry_medallion).removeClass(me.css_classes.is_visible);
|
$(this).find(me.js_selectors.entry_medallion).removeClass(me.css_classes.is_visible);
|
||||||
$(this).find(me.js_selectors.entry + ':visible:last').find(me.js_selectors.entry_medallion).addClass(me.css_classes.is_visible);
|
$(this).find(me.js_selectors.entry_author_name).addClass(me.css_classes.is_hidden);
|
||||||
|
|
||||||
|
// Then show only necessary
|
||||||
|
$(this).find(me.js_selectors.entry+':visible:last')
|
||||||
|
.find(me.js_selectors.entry_medallion).addClass(me.css_classes.is_visible)
|
||||||
|
.end()
|
||||||
|
.find(me.js_selectors.entry_author_name).removeClass(me.css_classes.is_hidden);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._UpdateEntryGroupsVisibility();
|
this._UpdateEntryGroupsVisibility();
|
||||||
|
|||||||
@@ -32,6 +32,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ibo-activity-entry--sub-information" data-role="ibo-activity-entry--sub-information">
|
<div class="ibo-activity-entry--sub-information" data-role="ibo-activity-entry--sub-information">
|
||||||
{% block iboActivityEntrySubInformation %}
|
{% block iboActivityEntrySubInformation %}
|
||||||
|
{% if get_config_parameter('activity_panel.show_author_name_below_entries') %}
|
||||||
|
<span class="ibo-activity-entry--author-name ibo-is-hidden" data-role="ibo-activity-entry--author-name">
|
||||||
|
{{ oUIBlock.GetAuthorFriendlyname() }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
<span class="ibo-activity-entry--datetime" data-role="ibo-activity-entry--datetime"
|
<span class="ibo-activity-entry--datetime" data-role="ibo-activity-entry--datetime"
|
||||||
data-tooltip-content="{{ oUIBlock.GetFormattedDateTime() }}"
|
data-tooltip-content="{{ oUIBlock.GetFormattedDateTime() }}"
|
||||||
data-raw-datetime="{{ oUIBlock.GetRawDateTime() }}"
|
data-raw-datetime="{{ oUIBlock.GetRawDateTime() }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user