{% block container %}

<div class="col-md-12">

    <div class="card-columns">
	{% for analysis in query %}

	<div class="card card-on-deck">
	    <h4 class="text-center">
		<a href="{{ url_for('.analyses', ruuid=analysis.uuid) }}">
		    {{ analysis.title }}
		</a>
	    </h4>

	    <h4 class="text-center">
		<span class="label label-primary" data-toggle="tooltip" data-placement="right" title="Collaboration">
		    {{ analysis.collaboration }}
		</span>
	    </h4>

	    <br><br>
	    <div>{{ analysis.description }}</div>

	    <br><br>

	    <div class="text-center">
		<span class="badge">
		    <i class="glyphicon glyphicon-user"></i>
		    &nbsp;{{ analysis.user.name }}
		</span>
		&nbsp;&nbsp;&nbsp;&nbsp;
		<span class="badge">
		    {{ analysis.scan_requests[:]|length}} requests
		</span>
		&nbsp;&nbsp;
		<span class="badge">
		    {{ analysis.subscriptions[:]|length}} subscriptions
		</span>
	    </div>

	    <br>
	    <div class="text-center">
		<a href="{{ url_for('.analyses', ruuid=analysis.uuid) }}">
		    <span class="label label-default">
			<i class="glyphicon glyphicon-eye-open"></i>
			&nbsp;view
		    </span>
		</a>
		&nbsp;&nbsp;
		<a href="{{ url_for('.subscribe', id=analysis.id) }}">
		    <span class="label label-default">
			<i class="glyphicon glyphicon-pushpin"></i>
		    </span>
		</a>
		&nbsp;&nbsp;&nbsp;
		<a href="{{ url_for('.request_form', id=analysis.id) }}">
		    <span class="label label-default">
			<i class="glyphicon glyphicon-plus"></i>
			&nbsp;add&nbsp;request
		    </span>
		</a>
	    </div>
		    

	</div>
	{% endfor %}

    </div>
    
</div>


{% endblock %}
