<div ng-if="!item.show_all_comments">
    <span style="white-space: pre-wrap;">{{item.comments[0].text}}</span>
    <div>[{{item.comments[0].user.username}}]</div>
</div>
<div ng-if="item.show_all_comments" ng-repeat="comment in item.comments">
    <span style="white-space: pre-wrap;">{{comment.text}}</span>
    <div>[{{comment.user.username}}, {{comment.date | formatTimestamp}}]</div><br/>
</div>

<button class="btn btn-default btn-xs glyphicon" ng-class="item.show_all_comments ? 'glyphicon-resize-small' : 'glyphicon-resize-full'" ng-click="item.show_all_comments = !item.show_all_comments"></button>
<button class="btn btn-default btn-xs glyphicon glyphicon-plus" ng-click="aux.mrosAddComment(item)"></button>

<div ng-if="item.has_attachment"><b>{{'ATTACHMENTS' | translate}}</b></div>
<div ng-repeat = "comment in item.comments">
    <div ng-repeat = "attach in comment.attachments">
        <div ng-if="attach.name.substring(attach.name.length - 4) !== '.xml'">
            <a href="{{ attach.path }}" ng-init="item.has_attachment = true">
                {{attach.name}} 
            </a>
            <div ng-if="item.show_all_comments">
                [{{comment.user.username}}, {{comment.date | formatTimestamp}}]
            </div><br/>
        </div>
    </div>
</div>