Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
list css to show border-bottom and padding.
*/
li{
padding: 1.2rem 0;
border-bottom: .1rem solid #DADDE2;
list-style:none;
}

/*
set background color of widget to white.
*/
.main-cont{
background:#ffffff;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="main-cont">
<div class="panel-heading b-b">
<h2 class="panel-title ng-binding">${My Mentions}</h2>
</div>
<div>
<div class="page-container">
<ul>
<li ng-repeat="item in data.mentionArr">
<span>${You have been mentioned in }</span><a href = {{item.url}} target="_blank">{{item.record}}</a> <span>${by }{{item.user_from}}</span>
</li>
</ul>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**How to use**
1. Add this widget to portal homepage or any other page.
2. It will display the top 5 records where user is mentioned in.
3. It will also display the user who has mentioned the logged in user.

**Use Case**
1. User will receive the mentioned items on portal homepage.
2. User can directly go to the record and reply.
3. The link will land the user on tickets page.

<img width="338" height="957" alt="my mentions" src="https://github.com/user-attachments/assets/68499e33-8d57-4c08-8228-b152203fbf4e" />

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(function() {
/*
This code will display the records wher user is mentioned in (@user in Jurnal fields).
This will also provide the link to record.
Only top 5 mentions will be displayed.
*/
data.mentionArr = []; // array to store mentions.
var mentionRec = new GlideRecord('live_notification');
mentionRec.addEncodedQuery('user=' + gs.getUserID()); // get only logged-in user's records
mentionRec.orderBy('sys_created_on'); // get by created date.
mentionRec.setLimit(5);
mentionRec.query();
while (mentionRec.next()) {
tempval = {}; // temp object.
tempval.record = mentionRec.getValue('title');
tempval.user = mentionRec.user.name.toString();
tempval.user_from = mentionRec.user_from.name.toString();
tempval.url = '/' + $sp.getValue('url_suffix') + '?id=ticket&sys_id=' + mentionRec.getValue('document') + '&table=' + mentionRec.getValue('table');
data.mentionArr.push(tempval);
}
})();
Loading