SmartIT_Extensions/BMC/smart-it-full/components/chat/partials/knowledge.html

41 lines
3.4 KiB
HTML

<div ng-if="message.type == 'knowledgeResourceDetails'" ng-init="showLess=false;showMore=true">
<div class="chat-message__body__details" ng-class="{'my-message': selfMessage}" ng-init="showLess=false;showMore=true">
<img class="chat-message__user-thumbnail__details" thumbnail-img="{{message.author.thumbnail}}" imgplaceholder="user" ng-class="'left-sided' "/>
<font size="0.5">
<b>{{"chat.chatOps.knowledge" | i18n}} {{message.author.firstName}} {{message.created | humanizedAbsoluteDateFormat}}
<div ng-if="message.data.KA.length==0">
{{"chat.chatOps.NoKnowledge" | i18n}}
</div>
<div ng-if="message.data.KA.length>0">
<table>
<tr ng-repeat="i in message.data.KA | limitTo : 5">
<td ng-show="i.related=='true' && message.fromHistory!=true" style="padding: 1px 4px" align="right"><font size="0.25"><span ng-click="unlinkKnowledgeArticle(i.id,'knowledge',message.data.chatWindowParentId);i.related='false'" style="color: #00a79d" class="icon-pin_circle"></span></font></td>
<td ng-show="i.related!='true' && message.fromHistory!=true" style="padding: 1px 4px" align="right"><font size="0.25"><span ng-click="linkKnowledgeArticle(i.id,'knowledge',message.data.chatWindowParentId);i.related='true'" style="color: #999999 " class="icon-pin_circle"></span></font></td>
<td ng-show="i.related=='true' && message.fromHistory==true" style="padding: 1px 4px" align="right"><font size="0.25"><span style="color: #00a79d" class="icon-pin_circle"></span></font></td>
<td ng-show="i.related!='true' && message.fromHistory==true" style="padding: 1px 4px" align="right"><font size="0.25"><span style="color: #999999 " class="icon-pin_circle"></span></font></td>
<td style="padding: 0px 4px"><b class="ng-binding"><a href="#/knowledge/{{i.id}}" target="_blank">{{i.displayId}}</a></b></td>
<td style="padding: 0px 4px">{{i.title}}</td>
</tr>
</table>
<div ng-if="message.data.KA.length>5">
<div ng-show="showMore"><a ng-click="showLess=!showLess;showMore=!showMore"><b>{{"chat.chatOps.showMore" | i18n}}</b></a></div>
<div ng-show="showLess">
<table>
<tr ng-repeat="i in message.data.KA | limitTo : 5:5">
<td ng-show="i.related=='true' && message.fromHistory!=true" style="padding: 1px 4px" align="right"><font size="0.25"><span ng-click="unlinkKnowledgeArticle(i.id,'knowledge',message.data.chatWindowParentId);i.related='false'" style="color: #00a79d" class="icon-pin_circle"></span></font></td>
<td ng-show="i.related!='true' && message.fromHistory!=true" style="padding: 1px 4px" align="right"><font size="0.25"><span ng-click="linkKnowledgeArticle(i.id,'knowledge',message.data.chatWindowParentId);i.related='true'" style="color: #999999 " class="icon-pin_circle"></span></font></td>
<td ng-show="i.related=='true' && message.fromHistory==true" style="padding: 1px 4px" align="right"><font size="0.25"><span style="color: #00a79d" class="icon-pin_circle"></span></font></td>
<td ng-show="i.related!='true' && message.fromHistory==true" style="padding: 1px 4px" align="right"><font size="0.25"><span style="color: #999999 " class="icon-pin_circle"></span></font></td>
<td style="padding: 0px 4px"><b class="ng-binding"><a href="#/knowledge/{{i.id}}" target="_blank">{{i.displayId}}</a></b></td>
<td style="padding: 0px 4px">{{i.title}}</td>
</tr>
</table>
<a ng-click="showLess=!showLess;showMore=!showMore"><b>{{"chat.chatOps.showLess" | i18n}}</b></a>
</div>
</div>
</div>
</b>
</font>
</div>
</div>