client/app/search/search.html
author ymh <ymh.work@gmail.com>
Wed, 08 Jan 2020 17:49:53 +0100
changeset 205 147583c43f0d
parent 197 8b87432acffc
permissions -rw-r--r--
add poetry on sync

<h1>
    Recherche <span ng-if="q !='' "> : {{ q }}</span>
</h1>
<h4 class="subtitle" ng-if="results.count>0">{{ results.count }} résultat(s)</h4>

<div ng-if="results.count>0">
    <div class="row search-item" ng-repeat="h in results.collect"
        ng-init="h.imgbig=false; h.seemore=false">
        <div ng-class="{'col-md-5': h.imgbig, 'col-md-3': !h.imgbig, 'img-wrap': true }">
            <img ng-src="{{ h.images[0] || 'img/no_img.jpg' }}" ng-class="{'search-img-max': (h.images[0] && !h.imgbig), 'no-img': !h.images[0]}" ng-click="h.imgbig=(h.images[0] && !h.imgbig)" />
        </div>
        <div ng-class="{'col-md-5': h.imgbig, 'col-md-7': !h.imgbig}">
            <p>
                <strong>Nom&nbsp;:</strong> {{ h.name }}
            </p>
            <p>
                <strong>Description&nbsp;:</strong> {{ h.description }}
            </p>
            <p ng-if="h.url">
                <strong>Url&nbsp;:</strong> <a href="{{ h.url }}" target="_blank">{{ h.url }}</a>
            </p>
            <div ng-show="h.seemore">
                <p ng-if="h.date">
                    <small><strong>Date&nbsp;:</strong> {{ h.date }}</small>
                </p>
                <p ng-if="h.inventorynumber">
                    <small><strong>Numéro d'inventaire&nbsp;:</strong> {{ h.inventorynumber }}</small>
                </p>
                <p ng-if="h.classification">
                    <small><strong>Classification&nbsp;:</strong> {{ h.classification }}</small>
                </p>
                <p ng-if="h.country">
                    <small><strong>Pays&nbsp;:</strong> {{ h.country }}</small>
                </p>
                <p ng-if="h.tags.length>0">
                    <small><strong>Mots Clefs&nbsp;:</strong> {{ h.tags }}</small>
                </p>
            </div>
        </div>
        <div class="col-md-1">
            <a class="btn btn-default" ng-click="toggleModal($index)"><span class="glyphicon glyphicon-plus"></span></a>
            <a class="btn btn-default" ng-click="h.imgbig=(h.images[0] && !h.imgbig); h.seemore=!h.seemore"><span class="glyphicon glyphicon-eye-open"></span></a>
        </div>
    </div>
</div>