mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
Merge branch 'master' of git://github.com/Abijeet/BookStack into Abijeet-master
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<div class="comment-editor" ng-controller="CommentReplyController as vm" ng-cloak>
|
||||
<form novalidate>
|
||||
<textarea name="markdown" rows="3" ng-model="comment.text" placeholder="{{ trans('entities.comment_placeholder') }}"></textarea>
|
||||
<input type="hidden" ng-model="comment.pageId" name="comment.pageId" value="{{$pageId}}" ng-init="comment.pageId = {{$pageId }}">
|
||||
<button type="button" ng-if="::(isReply || isEdit)" class="button muted" ng-click="closeBox()">{{ trans('entities.comment_cancel') }}</button>
|
||||
<button type="submit" class="button pos" ng-click="vm.saveComment()">{{ trans('entities.comment_save') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@if($errors->has('markdown'))
|
||||
<div class="text-neg text-small">{{ $errors->first('markdown') }}</div>
|
||||
@endif
|
@@ -1,18 +1,11 @@
|
||||
<script type="text/ng-template" id="comment-list-item.html">
|
||||
@include('comments/list-item')
|
||||
</script>
|
||||
<script type="text/ng-template" id="comment-reply.html">
|
||||
@include('comments/comment-reply', ['pageId' => $pageId])
|
||||
</script>
|
||||
<div ng-controller="CommentListController as vm" ng-init="pageId = <?= $page->id ?>" class="comments-list" ng-cloak>
|
||||
<h3>@{{vm.totalCommentsStr}}</h3>
|
||||
<hr>
|
||||
<div class="comment-box" ng-repeat="comment in vm.comments track by comment.id">
|
||||
<div ng-include src="'comment-list-item.html'">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="::vm.canComment()">
|
||||
@include('comments/comment-reply', ['pageId' => $pageId])
|
||||
</div>
|
||||
<div id="page-comments" page-id="<?= $page->id ?>" class="comments-list" v-cloak>
|
||||
<h3>@{{totalCommentsStr}}</h3>
|
||||
<hr>
|
||||
<comment v-for="(comment, index) in comments" :initial-comment="comment" :index="index" :level=1
|
||||
v-on:comment-added.stop="commentAdded"
|
||||
:current-user-id="currentUserId" :key="comment.id" :permissions="permissions"></comment>
|
||||
<div v-if="canComment">
|
||||
<comment-reply v-on:comment-added.stop="commentAdded" :page-id="<?= $page->id ?>">
|
||||
</comment-reply>
|
||||
</div>
|
||||
</div>
|
@@ -1,30 +0,0 @@
|
||||
<div class='page-comment' id="comment-@{{::pageId}}-@{{::comment.id}}">
|
||||
<div class="user-image">
|
||||
<img ng-src="@{{::comment.created_by.avatar_url}}" alt="user avatar">
|
||||
</div>
|
||||
<div class="comment-container">
|
||||
<div class="comment-header">
|
||||
<a href="@{{::comment.created_by.profile_url}}">@{{ ::comment.created_by.name }}</a>
|
||||
</div>
|
||||
<div ng-bind-html="comment.html" ng-if="::comment.active" class="comment-body" ng-class="!comment.active ? 'comment-inactive' : ''">
|
||||
|
||||
</div>
|
||||
<div ng-if="::!comment.active" class="comment-body comment-inactive">
|
||||
{{ trans('entities.comment_deleted') }}
|
||||
</div>
|
||||
<div class="comment-actions">
|
||||
<ul ng-if="!comment.is_hidden">
|
||||
<li ng-if="::(level < 3 && vm.canComment())"><a href="#" comment-reply-link no-comment-reply-dupe="true" comment="comment" is-reply="true">{{ trans('entities.comment_reply') }}</a></li>
|
||||
<li ng-if="::vm.canEditDelete(comment, 'comment_update')"><a href="#" comment-reply-link no-comment-reply-dupe="true" comment="comment" >{{ trans('entities.comment_edit') }}</a></li>
|
||||
<li ng-if="::vm.canEditDelete(comment, 'comment_delete')"><a href="#" comment-delete-link comment="comment" >{{ trans('entities.comment_delete') }}</a></li>
|
||||
<li>{{ trans('entities.comment_create') }} <a title="@{{::comment.created.day_time_str}}" href="#?cm=comment-@{{::pageId}}-@{{::comment.id}}">@{{::comment.created.diff}}</a></li>
|
||||
<li ng-if="::comment.updated"><span title="@{{::comment.updated.day_time_str}}">@{{ ::vm.trans('entities.comment_updated_text', { updateDiff: comment.updated.diff }) }}
|
||||
<a href="@{{::comment.updated_by.profile_url}}">@{{::comment.updated_by.name}}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="comment-box" ng-repeat="comment in comments = comment.sub_comments track by comment.id" ng-init="level = level + 1">
|
||||
<div ng-include src="'comment-list-item.html'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user