<a ng-if="comment.user.deleted !==true" href="/intranet/people/viewprofile.php?id={{ comment.user.id }}" class="media-left mr-2">
	<img class="media-object profile-img" width="50" height="50" alt="photo" ng-src="{{ comment.user.photo }}" />
</a>
<a ng-if="comment.user.deleted ===true" class="media-left mr-2">
	<img class="media-object profile-img" width="50" height="50" alt="photo" ng-src="{{ comment.user.photo }}" />
</a>

<div class="media-body comment-row">
	<span ng-if="comment.user.deleted">
		<lmsg src="communication.messages.deleted_user_name">[deleted user]</lmsg>
	</span>
	<span ng-if="comment.user.is_visible && comment.user.deleted !== true">
    	<a href="/intranet/people/viewprofile.php?id={{ comment.user.id }}&from_list=true" ng-if="!comment.user.is_blocked">
			<strong>{{ comment.user.is_me ? cc.translations.my_comment : comment.user.name }}</strong>
		</a>
		<strong ng-if="comment.user.is_blocked">{{ comment.user.is_me ? cc.translations.my_comment : comment.user.name }}</strong>
	</span>
	<span ng-if="!comment.user.is_visible">{{comment.user.name}}</span>
    <lmsg src="common.cla_comments.wrote">[wrote]</lmsg>...

    <div ng-if="!comment.edit_mode" ng-class="{'read-acknowledgement': !!comment.is_acknowledged && !comment.user.is_me}">
        <cla-comment text="comment.text" mentioned="comment.mentioned" comment-id="comment.id" class="text-break"></cla-comment>

        <ng-include src="'/intranet/comments/html/ui/attachments.html'"></ng-include>

        <small class="text-muted" ng-show="!comment.reply_mode">

            <!--<span class="cc_add_info text-warning">frsfgrdgdrg</span> &bull;-->

            <!-- replies enabled -->
            <span class="border-right mr-2 pr-2"  ng-show="cc.options.replies && comment.permissions.add">
                <a href="" lmsg="title:common.notifications.reply" ng-click="cc.replyMode( $event, comment )">
									<lmsg src="common.notifications.reply">[Reply]</lmsg>
								</a>
            </span>

			<!-- likes enabled -->
            <span class="border-right mr-2 pr-2" ng-show="cc.options.likes && !comment.user.is_me">
                <span ng-show="!comment.have_i_liked">
                    <a href="" lmsg="title:common.notifications.like" ng-click="cc.like( $event, comment )">
											<ion-icon name="thumbs-up"></ion-icon>
											<lmsg src="common.notifications.like">[Like]</lmsg>
										</a>
                </span>
                <span ng-show="comment.have_i_liked">
                    <a href="" lmsg="title:common.notifications.unlike" ng-click="cc.unlike( $event, comment )">
											<lmsg src="common.notifications.unlike">[Unlike]</lmsg>
										</a>
                </span>
            </span>



						<span class="border-right pr-1 mr-2" ng-show="cc.options.likes && comment.like_count > 0">
							<a href="" lmsg="title:common.notifications.like" ng-click="cc.showLikes( $event, comment )">
								{{comment.like_count}}
								<span ng-if="comment.like_count==1">
									<lmsg src="common.notifications.post_like">[like]</lmsg>
								</span>
								<span ng-if="comment.like_count>1">
									<lmsg src="common.notifications.post_likes">[likes]</lmsg>
								</span>
							</a>
						</span>

            <!-- is editable -->
            <span class="border-right mr-2 pr-2"  ng-show="comment.permissions.edit">
                <a href="" lmsg="title:common.edit" ng-click="cc.edit( $event, comment )">
									<span lmsg="common.edit">[Edit]</span>
								</a>
            </span>
            <!-- is deletable -->
            <span class="border-right mr-2 pr-2"  ng-show="comment.permissions.delete && comment.reply_count === 0">
                <a href="" lmsg="title:common.delete" ng-click="cc.delete( $event, comment, $index )">
									<span lmsg="common.delete">[Delete]</span>
								</a>
            </span>

            <span class="border-right mr-2 pr-2" ng-if="!cc.is_thread_only">
                <a href="/comments/permalink/{{ comment.id }}" lmsg="title:comments.permalink">
					<ion-icon name="link-outline"></ion-icon>
				</a>
            </span>

            <span date="{{ comment.timestamp.date }}">{{ comment.timestamp.date_str }}</span>

			<span class="border-left ml-2 pl-2" ng-if="comment.can_acknowledge && cc.config.require_acknowledgement">
				<button ng-if="!comment.is_acknowledged && !comment.user.is_me" lmsg="" type="button" class="btn btn-outline-info btn-sm" ng-click="cc.markAsRead($event, comment)">
					<ion-icon name="checkmark-circle-outline"></ion-icon>
					<lmsg src="common.cla_comments.mark_as_read">[Mark as read]</lmsg>
				</button>

				<span ng-if="!!comment.is_acknowledged && !comment.user.is_me" class="font-green">
					<ion-icon name="checkmark-done-circle-outline"></ion-icon>
					<lmsg src="common.cla_comments.read">[Read]</lmsg>
				</span>

				<span ng-if="comment.user.is_me">
					<button class="btn btn-light btn-sm" data-toggle="modal" data-target="#acknowledge-users-list-popup_{{ comment.id }}" rel="tooltip" data-placement="bottom" data-original-title="" ng-click="cc.initAcknowledgementsPerComment($event, comment, 1)">
						<ion-icon name="checkmark-done-circle-outline"></ion-icon>
						<lmsg src="common.cla_comments.read_status">[Read status]</lmsg>
					</button>
					<ng-include src="'/intranet/comments/html/ui/include/modalAcknowledgementsList.html'"></ng-include>
				</span>
			</span>
		</small>
    </div>

    <!-- is editable -->
    <div ng-if="comment.edit_mode">
        <p>
			<comment-edit id="edittext-{{comment.id}}" name="comment_textedit" comment="comment"></comment-edit>
        </p>
        <button lmsg="common.update" type="button" class="btn btn-primary btn-sm" ng-click="cc.update( $event, comment )">[Update]</button>
        <button lmsg="common.cancel" type="button" class="btn btn-secondary btn-sm" ng-click="cc.reset( $event, comment )">[Cancel]</button>
    </div>

    <!-- reply -->
    <div ng-if="comment.reply_mode">
        <p>
			<comment-edit id="replytext-{{comment.id}}" name="comment_textreply" comment="comment.new_reply"></comment-edit>
        </p>

        <button lmsg="common.notifications.reply" type="button" class="btn btn-primary btn-sm" ng-click="cc.add( $event, comment )" ng-disabled="!cc.can_save">[Reply]</button>
        <button lmsg="common.cancel" type="button" class="btn btn-secondary btn-sm" ng-click="cc.replyMode( $event, comment )">[Cancel]</button>
    </div>

    <ng-include src="'/intranet/comments/html/ui/replies.html'"></ng-include>
</div>
