

<accordion close-others="false">
    <accordion-group ng-repeat="book in books | filter:{ parent_visit: '!null', idArticle: 'null' }" is-open=true>

        <accordion-heading>

            <a class="title" ng-click="$event.stopPropagation();" href="#/books/{{ book.id }}">{{ book.title }}</a>
            <a class="pull-right" ng-click="$event.preventDefault(); $event.stopPropagation(); addBook(book.id)"><span class="glyphicon glyphicon-share"></span></a>
            <a class="pull-right" ng-click="$event.preventDefault(); $event.stopPropagation();"><span class="glyphicon glyphicon-cog"></span></a>
            <a class="pull-right" ng-click="$event.stopPropagation();" href="#/slideshow/{{ book.id }}"><span class="glyphicon glyphicon-eye-open"></span></a>
            <a class="pull-right" ng-click="$event.preventDefault(); $event.stopPropagation(); addBook(book.id)">Nouveau Book</a>
        
        </accordion-heading>

        <p class="nbrObjects">{{book.count}} objets</p>
        
        <div class="list-books" ng-repeat="childBook in books | filter:{ parent_visit: book.id }:true">
                <a href="#/books/{{ childBook.id }}">{{ childBook.title }}</a>
                <a class="pull-right" ng-click="deleteItem(childBook)"><span class="glyphicon glyphicon-minus"></span></a>
        </div>
        
        <ul ng:model="slides" class="list-inline gallery container-fluid">
            <li class="item" ng-class="{'no-img': !slide.details.images[0]}" ng-repeat="slide in book.slides">
                <ng-include src="'books/galleryItem.html'"></ng-include>
            </li>
        </ul>

        <div ng-repeat="parentBook in books | filter:{ id: book.parent_visit }:true" >
                {{parentBook.title }}
        </div>
 
        

    </accordion-group>
    
</accordion>

<a class="btn btn-default" ng-click="addBook()"><span class="glyphicon glyphicon-plus"></span></a>