mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-09 08:19:41 +00:00
First pass at mobile-ising the generic list
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -3,5 +3,6 @@ $font-family-sans-serif: "Open Sans", sans-serif;
|
|||||||
$font-size-base: 0.875rem;
|
$font-size-base: 0.875rem;
|
||||||
$theme-colors: (
|
$theme-colors: (
|
||||||
"warning": #ffd351,
|
"warning": #ffd351,
|
||||||
|
"yellow": #ffd351,
|
||||||
"info": #53bbcc
|
"info": #53bbcc
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,52 +13,55 @@
|
|||||||
<a href="{% url create %}" class="btn btn-success">New <span
|
<a href="{% url create %}" class="btn btn-success">New <span
|
||||||
class="fas fa-plus"></span></a>
|
class="fas fa-plus"></span></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="d-none d-md-block">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead class="thead-dark">
|
<thead class="thead-dark">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">#</th>
|
<th scope="col">#</th>
|
||||||
<th scope="col">Name<a href="?{% orderby request 'orderBy' 'name' %}"><span class="caret"></span></a></td>
|
<th scope="col">Name<a href="?{% orderby request 'orderBy' 'name' %}"><span class="caret"></span></a></td>
|
||||||
<th scope="col">Email</th>
|
<th scope="col">Email</th>
|
||||||
<th scope="col">Phone</th>
|
<th scope="col">Phone</th>
|
||||||
<th scope="col">Notes</th>
|
<th scope="col">Notes</th>
|
||||||
{% if union_account %} {#TODO#}
|
{% if union_account %} {#TODO#}
|
||||||
<th scope="col">Union Account</th>
|
<th scope="col">Union Account</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<th scope="col">Quick Links</th>
|
<th scope="col">Quick Links</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for object in object_list %}
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="align-middle">{{ object.pk }}</th>
|
||||||
|
<td class="align-middle">{{ object.name }}</td>
|
||||||
|
<td class="align-middle">{{ object.email }}</td>
|
||||||
|
<td class="align-middle">{% if object.phone %}<a href="tel:{{ object.phone }}">{%endif%}{{ object.phone }}{% if object.phone %}</a>{%endif%}</td>
|
||||||
|
<td class="align-middle">{{ object.notes|yesno|capfirst }}</td>
|
||||||
|
{% if union_account %}
|
||||||
|
<td>{{ object.union_account|yesno|capfirst }}</td>
|
||||||
|
{% endif %}
|
||||||
|
<td>
|
||||||
|
<div class="btn-group d-flex" role="group">
|
||||||
|
<a href="{% url detail object.pk %}" class="btn btn-primary btn-sm modal-href">
|
||||||
|
<i class="fas fa-eye"></i> View
|
||||||
|
</a>
|
||||||
|
<a href="{% url edit object.pk %}" class="btn btn-warning btn-sm"><i
|
||||||
|
class="fas fa-edit"></i> Edit</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% empty %}
|
||||||
|
<tr class="table-warning">
|
||||||
|
<td colspan="6" class="text-center">Nothing found</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
{% endfor %}
|
||||||
<tbody>
|
</tbody>
|
||||||
{% for object in object_list %}
|
</table>
|
||||||
<tr>
|
</div>
|
||||||
<th scope="row" class="align-middle">{{ object.pk }}</th>
|
</div>
|
||||||
<td class="align-middle">{{ object.name }}</td>
|
<div class="d-xs-block d-sm-block d-md-none">
|
||||||
<td class="align-middle">{{ object.email }}</td>
|
{% include 'partials/generic_list_mobile.html' %}
|
||||||
<td class="align-middle">{% if object.phone %}<a href="tel:{{ object.phone }}">{%endif%}{{ object.phone }}{% if object.phone %}</a>{%endif%}</td>
|
|
||||||
<td class="align-middle">{{ object.notes|yesno|capfirst }}</td>
|
|
||||||
{% if union_account %}
|
|
||||||
<td>{{ object.union_account|yesno|capfirst }}</td>
|
|
||||||
{% endif %}
|
|
||||||
<td>
|
|
||||||
<div class="btn-group d-flex" role="group">
|
|
||||||
<a href="{% url detail object.pk %}" class="btn btn-primary btn-sm modal-href">
|
|
||||||
<i class="fas fa-eye"></i> View
|
|
||||||
</a>
|
|
||||||
<a href="{% url edit object.pk %}" class="btn btn-warning btn-sm"><i
|
|
||||||
class="fas fa-edit"></i> Edit</a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% empty %}
|
|
||||||
<tr class="table-warning">
|
|
||||||
<td colspan="6" class="text-center">Nothing found</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% if is_paginated %}
|
{% if is_paginated %}
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
{% paginator %}
|
{% paginator %}
|
||||||
|
|||||||
19
templates/partials/generic_list_mobile.html
Normal file
19
templates/partials/generic_list_mobile.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<div class="card">
|
||||||
|
{% for object in object_list %}
|
||||||
|
<div class="card-header">
|
||||||
|
<a href="{% url detail object.pk %}">{{ object.pk }} | {{ object.name }}</a>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<ul>
|
||||||
|
<li><strong>Email:</strong> {{ object.email }}</li>
|
||||||
|
<li><strong>Phone:</strong> {% if object.phone %}<a href="tel:{{ object.phone }}">{%endif%}{{ object.phone }}{% if object.phone %}</a>{%endif%}</li>
|
||||||
|
<li><strong>Notes:</strong>{{ object.notes|yesno|capfirst }}</li>
|
||||||
|
{% if union_account %}
|
||||||
|
<li>strong>Union Account:</strong> {{ object.union_account|yesno|capfirst }}</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
<a href="{% url edit object.pk %}" class="btn btn-warning btn-sm"><i
|
||||||
|
class="fas fa-edit"></i> Edit</a>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user