<div class="media">
	<a ng-if="reply.user.deleted !== true" href="/intranet/people/viewprofile.php?id={{ reply.user.id }}" class="media-left mr-2">
		<img class="media-object profile-img" width="50" height="50" alt="photo" ng-src="{{ reply.user.photo }}" />
	</a>
	<a ng-if="reply.user.deleted === true" class="media-left mr-2">
		<img class="media-object profile-img" width="50" height="50" alt="photo" ng-src="{{ reply.user.photo }}" />
	</a>
	<div class="media-body comment-row">
		<span ng-if="reply.user.deleted">
			<lmsg src="communication.messages.deleted_user_name">[deleted user]</lmsg>
		</span>
		<span ng-if="reply.user.is_visible && reply.user.deleted !== true">
			<a href="/intranet/people/viewprofile.php?id={{ reply.user.id }}" ng-if="!reply.user.is_blocked">
				<strong>{{ reply.user.is_me ? cc.translations.my_comment : reply.user.name }}</strong>
			</a>
			<strong ng-if="reply.user.is_blocked">{{ reply.user.is_me ? cc.translations.my_comment : reply.user.name }}</strong>
		</span>
		<span ng-if="!reply.user.is_visible">{{reply.user.name}}</span>
		<lmsg src="common.cla_comments.wrote">[wrote]</lmsg>...

		<div ng-show="!reply.edit_mode">
			<p>
				<cla-comment text="reply.text" mentioned="reply.mentioned" comment-id="reply.id"></cla-comment>
			</p>

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

				<!---<span class="cc_add_info text-warning">{{add_info}}</span> &bull;-->

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

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

				<span class="border-right mr-2 pr-2" ng-if="cc.options.likes && reply.like_count > 0">
					<clang-likes-modal class="d-inline-block" object-id="{{ reply.id }}" object-type="132" total="{{ reply.like_count }}"></clang-likes-modal>
				</span>

				<!-- is editable -->
				<span class="border-right mr-2 pr-2" ng-if="reply.permissions.edit">
					<a href="" lmsg="title:common.edit" ng-click="cc.edit( $event, reply )">
						<span lmsg="common.edit">[Edit]</span>
					</a>
				</span>

				<span class="border-right mr-2 pr-2" ng-show="reply.permissions.delete">
					<a href="" lmsg="title:common.delete" ng-click="cc.delete( $event, reply, $index )">
						<span lmsg="common.delete">[Delete]</span>
					</a>
				</span>

				<span date="{{ reply.timestamp.date }}">{{ reply.timestamp.date_str }}</span>
			</small>
		</div>

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

		<!-- reply -->
		<div ng-show="reply.reply_mode">
			<p>
				<comment-edit id="replytext-{{reply.id}}" name="reply_textedit" comment="reply.new_reply"></comment-edit>
			</p>
			<button lmsg="common.notifications.reply" type="button" class="btn btn-primary btn-sm" ng-click="cc.add( $event, reply )" ng-disabled="!cc.can_save">[Reply]</button>
			<button lmsg="common.cancel" type="button" class="btn btn-secondary btn-sm" ng-click="cc.replyMode( $event, reply )">[Cancel]</button>
		</div>

	</div>
</div>
