From 10823a6c9699fe098c037a1875a604d8358aa40c Mon Sep 17 00:00:00 2001 From: 14987 Date: Thu, 30 Nov 2023 17:36:49 +0530 Subject: [PATCH 1/6] feat(UI): Add subject in timeline communication --- .../js/frappe/form/templates/timeline_message_box.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html index 4efb1f0b10..835b90ff09 100644 --- a/frappe/public/js/frappe/form/templates/timeline_message_box.html +++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html @@ -82,6 +82,11 @@
+ {% if (doc.subject ) { %} +
+ {{__('Subject')}} : {{doc.subject}} +
+ {% } %} {{ doc.content }}
{% if (doc.attachments && doc.attachments.length) { %} From f027034404f2ffcfd4c07c56f5e04955962db775 Mon Sep 17 00:00:00 2001 From: 14987 Date: Fri, 1 Dec 2023 17:14:39 +0530 Subject: [PATCH 2/6] fix: Update subject display location --- .../form/templates/timeline_message_box.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html index 835b90ff09..06da26336b 100644 --- a/frappe/public/js/frappe/form/templates/timeline_message_box.html +++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html @@ -39,6 +39,15 @@ {{ frappe.avatar(doc.owner, "avatar-medium") }} + {% if (doc.subject ) { %} + {% if (doc.subject.length >70 ){ + var display_subject = doc.subject.slice(0, 70) + "..." + }else{ + var display_subject = doc.subject + } + %} + {{display_subject}} + {% } %} {{ doc.user_full_name || frappe.user.full_name(doc.owner) }}
@@ -82,11 +91,6 @@
- {% if (doc.subject ) { %} -
- {{__('Subject')}} : {{doc.subject}} -
- {% } %} {{ doc.content }}
{% if (doc.attachments && doc.attachments.length) { %} From 44a0bef8c97ef019c668a5414e63b101f86f04da Mon Sep 17 00:00:00 2001 From: 14987 Date: Fri, 1 Dec 2023 18:51:13 +0530 Subject: [PATCH 3/6] fix: Update the css --- .../frappe/form/templates/timeline_message_box.html | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html index 06da26336b..6dae793b4a 100644 --- a/frappe/public/js/frappe/form/templates/timeline_message_box.html +++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html @@ -40,14 +40,8 @@ {{ frappe.avatar(doc.owner, "avatar-medium") }} {% if (doc.subject ) { %} - {% if (doc.subject.length >70 ){ - var display_subject = doc.subject.slice(0, 70) + "..." - }else{ - var display_subject = doc.subject - } - %} - {{display_subject}} - {% } %} +
{{doc.subject}}
+ {% } %} {{ doc.user_full_name || frappe.user.full_name(doc.owner) }}
@@ -56,7 +50,7 @@ {% } %} - + {% if (doc._doc_status && doc._doc_status_indicator) { %} Date: Fri, 1 Dec 2023 19:22:44 +0530 Subject: [PATCH 4/6] fix(UI): Display timestamp beside name --- .../form/templates/timeline_message_box.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html index 6dae793b4a..2d7110bd36 100644 --- a/frappe/public/js/frappe/form/templates/timeline_message_box.html +++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html @@ -39,15 +39,17 @@ {{ frappe.avatar(doc.owner, "avatar-medium") }} - {% if (doc.subject ) { %} -
{{doc.subject}}
- {% } %} - +
{{ doc.user_full_name || frappe.user.full_name(doc.owner) }} -
+ . + {{ comment_when(doc.creation) }} -
- + + {% if (doc.subject ) { %} +
{{doc.subject}}
+ {% } %} + +
{% } %}
From a703bf398d283d1ca8fb207cd0e66d743097b71a Mon Sep 17 00:00:00 2001 From: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> Date: Fri, 1 Dec 2023 19:37:09 +0530 Subject: [PATCH 5/6] chore: linter fix --- .../frappe/form/templates/timeline_message_box.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html index 2d7110bd36..92a1320de3 100644 --- a/frappe/public/js/frappe/form/templates/timeline_message_box.html +++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html @@ -30,8 +30,9 @@ {{ frappe.avatar(doc.owner, "avatar-medium") }} {{ doc.user_full_name || frappe.user.full_name(doc.owner) }} - {{ __("commented") }} - + {{ __("commented") }} + . + {{ comment_when(doc.creation) }} @@ -45,10 +46,9 @@ {{ comment_when(doc.creation) }} - {% if (doc.subject ) { %} -
{{doc.subject}}
- {% } %} - + {% if (doc.subject) { %} +
{{doc.subject}}
+ {% } %}
{% } %}
From 78e63be26d005bf6298ebdc0fb5249b50bbf6164 Mon Sep 17 00:00:00 2001 From: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> Date: Fri, 1 Dec 2023 19:37:55 +0530 Subject: [PATCH 6/6] chore: linter fix --- .../public/js/frappe/form/templates/timeline_message_box.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html index 92a1320de3..e6de6c9c6b 100644 --- a/frappe/public/js/frappe/form/templates/timeline_message_box.html +++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html @@ -42,8 +42,8 @@
{{ doc.user_full_name || frappe.user.full_name(doc.owner) }} - . - + . + {{ comment_when(doc.creation) }} {% if (doc.subject) { %}