mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01: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' => '',
|
||||
'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' => [
|
||||
'type' => 'integer',
|
||||
'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--text-color: $ibo-color-grey-700 !default;
|
||||
|
||||
$ibo-activity-entry--author-name--sibling-spacing: 0.2rem !default;
|
||||
|
||||
/* Entry group */
|
||||
.ibo-activity-panel--entry-group{
|
||||
&:not(:last-child){
|
||||
@@ -64,7 +66,7 @@ $ibo-activity-entry--sub-information--text-color: $ibo-color-grey-700 !default;
|
||||
}
|
||||
|
||||
/* Entry */
|
||||
.ibo-activity-entry{
|
||||
.ibo-activity-entry {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
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;
|
||||
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_medallion: '[data-role="ibo-activity-entry--medallion"]',
|
||||
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"]',
|
||||
edits_entry_long_description: '[data-role="ibo-edits-entry--long-description"]',
|
||||
edits_entry_long_description_toggler: '[data-role="ibo-edits-entry--long-description-toggler"]',
|
||||
@@ -1015,16 +1016,22 @@ $(function()
|
||||
aFilterOptions.push($(this).val());
|
||||
});
|
||||
|
||||
for(let sTargetEntryType of aTargetEntryTypes)
|
||||
{
|
||||
for (let sTargetEntryType of aTargetEntryTypes) {
|
||||
me[sCallbackMethod](sTargetEntryType, aFilterOptions);
|
||||
}
|
||||
});
|
||||
|
||||
// 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 + ':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();
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
</div>
|
||||
<div class="ibo-activity-entry--sub-information" data-role="ibo-activity-entry--sub-information">
|
||||
{% 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"
|
||||
data-tooltip-content="{{ oUIBlock.GetFormattedDateTime() }}"
|
||||
data-raw-datetime="{{ oUIBlock.GetRawDateTime() }}"
|
||||
|
||||
Reference in New Issue
Block a user