Ultron/templates/search/results.html

90 lines
3.8 KiB
HTML

{% extends "base.html" %}
<!-- {% block page_title %}.: Search results :.{% endblock %} -->
{% block title %}Search results{% endblock %}
{% block content %}
<div class="card mb-0">
{% if jumper_list or skill_list %}
{% if jumper_list %}
<div class="card-header">
<h4 class="card-title"> Jumper's results</h4>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table tablesorter table-striped table-condensed" data-sort="table">
<thead>
<tr>
<th style="width: 3%"></th>
<th class="header text-left" style="width: 20%">Lastname</th>
<th class="header text-left" style="width: 20%">Firstname</th>
<th class="header text-left" style="width: 15%">Gender</th>
<th class="header text-left" style="width: 15%">Age</th>
<th class="header text-left" style="width: 15%">Club</th>
</tr>
</thead>
<tbody>
{% for jumper in jumper_list %}
<tr>
<td>
<a href="{% url 'jumper_update' jumper.id %}">
<span class="tim-icons icon-pencil text-warning"></span>
</a>
</td>
<td class="text-left"><a href="{% url 'jumper_details' jumper.id %}">{{ jumper.last_name }}</a></td>
<td class="text-left"><a href="{% url 'jumper_details' jumper.id %}">{{ jumper.first_name }}</a></td>
<td class="text-left">{{ jumper.get_gender_display }}</td>
<td class="text-left">{{ jumper.age }}</td>
<td class="text-left">{{ jumper.club.acronym }} ({{ jumper.club.city }})</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
{% if skill_list %}
<div class="card-header">
<h4 class="card-title"> Skill's results</h4>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table tablesorter table-striped table-condensed" data-sort="table">
<thead>
<tr>
<th class="text-left">Short Label</th>
<th class="text-center">Notation</th>
<th class="header text-center">Diff.</th>
<th class="header text-center">Level</th>
<th class="header text-center">Rank</th>
</tr>
</thead>
<tbody>
{% for skill in skill_list %}
<tr>
<td class="text-left">&nbsp;<a href="{% url 'skill_details' skill.id %}">{{ skill.short_label }}</a></td>
<td class="text-center">{{ skill.numeric_notation }}</td>
<td class="text-center">{{ skill.difficulty }}</td>
<td class="text-center">{{ skill.level }}</td>
<td class="text-center">{{ skill.rank }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
{% else %}
<div class="card-header">
<h4 class="card-title"> Search results</h4>
</div>
<div class="card-body">
<p>There are no items corresponding to your criterias</p>
</div>
{% endif %}
{% endblock %}