internal post dev

This commit is contained in:
yuri
2016-06-14 12:56:18 +03:00
parent 81cf82c99f
commit aa67575ecb
4 changed files with 18 additions and 1 deletions

View File

@@ -295,7 +295,7 @@ class Stream extends \Espo\Core\Services\Base
$select = [
'id', 'number', 'type', 'post', 'data', 'parentType', 'parentId', 'relatedType', 'relatedId',
'targetType', 'createdAt', 'createdById', 'createdByName', 'isGlobal'
'targetType', 'createdAt', 'createdById', 'createdByName', 'isGlobal', 'isInternal'
];
$selectParamsList = [];

View File

@@ -9,7 +9,13 @@
<div class="stream-head-container">
<div class="pull-left">
{{{avatar}}}
{{#if isInternal}}
<div class="internal-badge">
<span class="glyphicon glyphicon-lock small"></span>
</div>
{{/if}}
</div>
<div class="stream-head-text-container">
<span class="text-muted message">{{{message}}}</span>
</div>

View File

@@ -42,6 +42,7 @@ Espo.define('views/stream/notes/post', 'views/stream/note', function (Dep) {
var data = Dep.prototype.data.call(this);
data.showAttachments = !!(this.model.get('attachmentsIds') || []).length;
data.showPost = !!this.model.get('post');
data.isInternal = this.isInternal;
return data;
},
@@ -50,6 +51,8 @@ Espo.define('views/stream/notes/post', 'views/stream/note', function (Dep) {
this.createField('post', null, null, 'views/stream/fields/post');
this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple');
this.isInternal = this.model.get('isInternal');
if (!this.model.get('post') && this.model.get('parentId')) {
this.messageName = 'attach';
if (this.isThis) {

View File

@@ -840,6 +840,14 @@ body > footer > p a:visited {
margin-bottom: -2px;
}
.stream-head-container .internal-badge {
position: absolute; top: 34px; left: 19px;
}
.stream-head-container .internal-badge > span {
color: @brand-danger;
}
img.avatar.avatar-link {
display: inline-block;
margin-top: -2px;