1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Adding the view templates and styles.

This commit is contained in:
Abijeet
2017-04-19 01:24:33 +05:30
parent 8e2437498f
commit d447355a61
5 changed files with 113 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
@section('head')
<script src="{{ baseUrl("/libs/simplemde/simplemde.min.js") }}"></script>
@stop
<div class="comment-editor" ng-controller="CommentAddController as vm">
<form novalidate>
<div simple-markdown-input smd-model="comment.newComment" smd-get-content="getCommentHTML" smd-clear="clearInput">
<textarea name="markdown" rows="3"
@if($errors->has('markdown')) class="neg" @endif>@if(isset($model) ||
old('markdown')){{htmlspecialchars( old('markdown') ? old('markdown') : ($model->markdown === '' ? $model->html : $model->markdown))}}@endif</textarea>
</div>
<input type="hidden" ng-model="pageId" name="comment.pageId" value="{{$pageId}}" ng-init="comment.pageId = {{$pageId }}">
<button type="submit" class="button pos" ng-click="vm.saveComment()">Save</button>
</form>
</div>
@if($errors->has('markdown'))
<div class="text-neg text-small">{{ $errors->first('markdown') }}</div>
@endif

View File

@@ -0,0 +1,19 @@
<div class='page-comment'>
<div class="user-image">
<img ng-src="@{{defaultAvatar}}" alt="user avatar">
</div>
<div class="comment-container">
<div class="comment-header">
@{{ ::comment.created_by_name }}
</div>
<div ng-bind-html="comment.html" class="comment-body">
</div>
<div class="comment-actions">
<ul>
<li><a href="#">Reply</a></li>
<li><a href="#">@{{::comment.created_at}}</a></li>
</ul>
</div>
</div>
</div>

View File

@@ -0,0 +1,8 @@
<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">
@include('comments/list-item')
</div>
</div>
@include('comments/add', ['pageId' => $pageId])