]> BookStack Code Mirror - bookstack/blobdiff - resources/views/pages/parts/toolbox-comments.blade.php
Comments: Fixed display, added archive list support for editor toolbox
[bookstack] / resources / views / pages / parts / toolbox-comments.blade.php
index d632b85c68997d3cc9d18fe9f11034e51e3e73ae..72958a2fede3d6050ad5a77fc756644456562dce 100644 (file)
@@ -1,3 +1,6 @@
+{{--
+$comments - CommentTree
+--}}
 <div refs="editor-toolbox@tab-content" data-tab-content="comments" class="toolbox-tab-content">
     <h4>{{ trans('entities.comments') }}</h4>
 
@@ -5,11 +8,19 @@
         <p class="text-muted small mb-m">
             {{ trans('entities.comment_editor_explain') }}
         </p>
-        @foreach($comments->get() as $branch)
+        @foreach($comments->getActive() as $branch)
             @include('comments.comment-branch', ['branch' => $branch, 'readOnly' => true])
         @endforeach
         @if($comments->empty())
-            <p class="italic text-muted">{{ trans('common.no_items') }}</p>
+            <p class="italic text-muted">{{ trans('entities.comment_none') }}</p>
+        @endif
+        @if($comments->archivedThreadCount() > 0)
+            <details class="section-expander mt-s">
+                <summary>{{ trans('entities.comment_archived_threads') }}</summary>
+                @foreach($comments->getArchived() as $branch)
+                    @include('comments.comment-branch', ['branch' => $branch, 'readOnly' => true])
+                @endforeach
+            </details>
         @endif
     </div>
 </div>
\ No newline at end of file