mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-05 13:47:49 +02:00
Bookshelf reloaded (#25)
* Navbar refactoring * Fix coming soon SVG fonts * Overhaul templating and extend search to consists and books
This commit is contained in:
@@ -1,55 +1,4 @@
|
||||
{% extends "cards.html" %}
|
||||
|
||||
{% block cards %}
|
||||
{% for d in data %}
|
||||
<div class="col">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<p class="card-text" style="position: relative;">
|
||||
<strong>{{ d.name }}</strong>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2" scope="row">Company</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
{% if d.logo %}
|
||||
<tr>
|
||||
<th class="w-33" scope="row">Logo</th>
|
||||
<td><img style="max-height: 48px" src="{{ d.logo.url }}" /></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th class="w-33" scope="row">Name</th>
|
||||
<td>{{ d.extended_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="w-33" scope="row">Abbreviation</th>
|
||||
<td>{{ d.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="w-33" scope="row">Country</th>
|
||||
<td>{{ d.country.name }} <img src="{{ d.country.flag }}" alt="{{ d.country }}" />
|
||||
</tr>
|
||||
{% if d.freelance %}
|
||||
<tr>
|
||||
<th class="w-33" scope="row">Notes</th>
|
||||
<td>A <em>freelance</em> company</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="d-grid gap-2 mb-1 d-md-block">
|
||||
<a class="btn btn-sm btn-outline-primary" href="{% url 'filtered' _filter="company" search=d.slug %}">Show all rolling stock</a>
|
||||
{% if request.user.is_staff %}<a class="btn btn-sm btn-outline-danger" href="{% url 'admin:metadata_company_change' d.pk %}">Edit</a>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
{% block pagination %}
|
||||
{% if data.has_other_pages %}
|
||||
<nav aria-label="Page navigation example">
|
||||
|
Reference in New Issue
Block a user