mirror of
				https://github.com/BookStackApp/BookStack.git
				synced 2025-11-03 02:13:16 +03:00 
			
		
		
		
	Improved empty lists. Fixes #10.
This commit is contained in:
		@@ -24,7 +24,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
 | 
			
		||||
     *
 | 
			
		||||
     * @var array
 | 
			
		||||
     */
 | 
			
		||||
    protected $fillable = ['name', 'email'];
 | 
			
		||||
    protected $fillable = ['name', 'email', 'password'];
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The attributes excluded from the model's JSON form.
 | 
			
		||||
 
 | 
			
		||||
@@ -296,7 +296,9 @@ h1, h2, h3, h4, h5, h6 {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.book-tree {
 | 
			
		||||
  margin-top: $-xl;
 | 
			
		||||
}
 | 
			
		||||
.book-tree h4 {
 | 
			
		||||
  padding: $-m $-s 0 $-s;
 | 
			
		||||
  i {
 | 
			
		||||
@@ -309,7 +311,7 @@ h1, h2, h3, h4, h5, h6 {
 | 
			
		||||
.book-tree .sidebar-page-list {
 | 
			
		||||
  list-style: none;
 | 
			
		||||
  margin: 0;
 | 
			
		||||
  margin-top: $-xl;
 | 
			
		||||
  margin-top: $-xs;
 | 
			
		||||
  border-left: 5px solid $color-book;
 | 
			
		||||
  li a {
 | 
			
		||||
    display: block;
 | 
			
		||||
 
 | 
			
		||||
@@ -18,9 +18,11 @@
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    <div class="page-content">
 | 
			
		||||
    <div class="container">
 | 
			
		||||
        <div class="row">
 | 
			
		||||
            <div class="col-md-8">
 | 
			
		||||
                <h1>Books</h1>
 | 
			
		||||
                @if(count($books) > 0)
 | 
			
		||||
                    @foreach($books as $book)
 | 
			
		||||
                        <div class="book">
 | 
			
		||||
                            <h3><a href="{{$book->getUrl()}}">{{$book->name}}</a></h3>
 | 
			
		||||
@@ -28,6 +30,13 @@
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <hr>
 | 
			
		||||
                    @endforeach
 | 
			
		||||
                @else
 | 
			
		||||
                    <p class="text-muted">No books have been created.</p>
 | 
			
		||||
                    <a href="/books/create" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a>
 | 
			
		||||
                @endif
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="col-md-4"></div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
@stop
 | 
			
		||||
@@ -36,6 +36,7 @@
 | 
			
		||||
 | 
			
		||||
                <div class="page-list">
 | 
			
		||||
                    <hr>
 | 
			
		||||
                    @if(count($book->children()) > 0)
 | 
			
		||||
                        @foreach($book->children() as $childElement)
 | 
			
		||||
                            <div class="book-child">
 | 
			
		||||
                                <h3>
 | 
			
		||||
@@ -57,6 +58,15 @@
 | 
			
		||||
                            </div>
 | 
			
		||||
                            <hr>
 | 
			
		||||
                        @endforeach
 | 
			
		||||
                    @else
 | 
			
		||||
                        <p class="text-muted">No pages or chapters have been created for this book.</p>
 | 
			
		||||
                        <p>
 | 
			
		||||
                            <a href="{{$book->getUrl() . '/page/create'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
 | 
			
		||||
                               <em class="text-muted">-or-</em>   
 | 
			
		||||
                            <a href="{{$book->getUrl() . '/chapter/create'}}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>Add a chapter</a>
 | 
			
		||||
                        </p>
 | 
			
		||||
                        <hr>
 | 
			
		||||
                    @endif
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <p class="text-muted small">
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,14 @@
 | 
			
		||||
                            @endforeach
 | 
			
		||||
                        </div>
 | 
			
		||||
                    @else
 | 
			
		||||
                        <p class="text-muted">No pages are in this chapter</p>
 | 
			
		||||
                        <hr>
 | 
			
		||||
                        <p class="text-muted">No pages are currently in this chapter.</p>
 | 
			
		||||
                        <p>
 | 
			
		||||
                            <a href="{{$chapter->getUrl() . '/create-page'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
 | 
			
		||||
                              <em class="text-muted">-or-</em>   
 | 
			
		||||
                            <a href="{{$book->getUrl() . '/sort'}}" class="text-book"><i class="zmdi zmdi-book"></i>Sort the current book</a>
 | 
			
		||||
                        </p>
 | 
			
		||||
                        <hr>
 | 
			
		||||
                    @endif
 | 
			
		||||
 | 
			
		||||
                    <p class="text-muted small">
 | 
			
		||||
 
 | 
			
		||||
@@ -7,6 +7,7 @@
 | 
			
		||||
        <div class="row">
 | 
			
		||||
            <div class="col-md-7">
 | 
			
		||||
                <h2>Books</h2>
 | 
			
		||||
                @if(count($books) > 0)
 | 
			
		||||
                    @foreach($books as $book)
 | 
			
		||||
                        <div class="book">
 | 
			
		||||
                            <h3><a href="{{$book->getUrl()}}">{{$book->name}}</a></h3>
 | 
			
		||||
@@ -14,6 +15,10 @@
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <hr>
 | 
			
		||||
                    @endforeach
 | 
			
		||||
                @else
 | 
			
		||||
                    <p class="text-muted">No books have been created.</p>
 | 
			
		||||
                    <a href="/books/create" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a>
 | 
			
		||||
                @endif
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="col-md-4 col-md-offset-1">
 | 
			
		||||
                <div class="margin-top large"> </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
 | 
			
		||||
<div class="book-tree">
 | 
			
		||||
    <h6 class="text-muted">Book Navigation</h6>
 | 
			
		||||
    <ul class="sidebar-page-list menu">
 | 
			
		||||
        <li class="book-header"><a href="{{$book->getUrl()}}" class="book {{ $current->matches($book)? 'selected' : '' }}"><i class="zmdi zmdi-book"></i>{{$book->name}}</a></li>
 | 
			
		||||
        @foreach($book->children() as $bookChild)
 | 
			
		||||
 
 | 
			
		||||
@@ -9,4 +9,6 @@
 | 
			
		||||
            </div>
 | 
			
		||||
        @endforeach
 | 
			
		||||
    </div>
 | 
			
		||||
@else
 | 
			
		||||
    <p class="text-muted">New activity will show up here.</p>
 | 
			
		||||
@endif
 | 
			
		||||
		Reference in New Issue
	
	Block a user