mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-28 10:52:16 +00:00
Remove database ID from generic list
This commit is contained in:
@@ -1,67 +1,64 @@
|
|||||||
{% load url_replace from filters %}
|
{% load url_replace from filters %}
|
||||||
{% load orderby from filters %}
|
{% load orderby from filters %}
|
||||||
{% load paginator from filters %}
|
{% load paginator from filters %}
|
||||||
<div class="row justify-content-end py-3">
|
<div class="row justify-content-end">
|
||||||
<form class="form-inline pr-3">
|
<form class="form-inline">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="input-group pull-right">
|
<div class="input-group">
|
||||||
<input type="search" name="q" placeholder="Search" value="{{ request.GET.q }}"
|
<input type="search" name="q" placeholder="Search" value="{{ request.GET.q }}"
|
||||||
class="form-control"/>
|
class="form-control"/>
|
||||||
<span class="input-group-append"><button type="submit" class="btn btn-primary" id="id_search">Search</button></span>
|
<span class="input-group-append"><button type="submit" class="btn btn-info" id="id_search">Search</button></span>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<a href="{% url create %}" class="btn btn-success">New <span
|
</div>
|
||||||
|
<div class="row justify-content-end py-3">
|
||||||
|
<a href="{% url create %}" class="btn btn-primary">New <span
|
||||||
class="fas fa-plus"></span></a>
|
class="fas fa-plus"></span></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-none d-md-block">
|
<div class="row">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<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>
|
||||||
</tr>
|
</thead>
|
||||||
</thead>
|
<tbody>
|
||||||
<tbody>
|
{% for object in object_list %}
|
||||||
{% for object in object_list %}
|
<tr id="row_item">
|
||||||
<tr id="row_item">
|
<th scope="row" class="align-middle" id="cell_name">{{ object.name }}</th>
|
||||||
<th scope="row" class="align-middle">{{ object.pk }}</th>
|
<td class="align-middle">{{ object.email }}</td>
|
||||||
<td class="align-middle" id="cell_name">{{ object.name }}</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.email }}</td>
|
<td class="align-middle">{{ object.notes|yesno|capfirst }}</td>
|
||||||
<td class="align-middle">{% if object.phone %}<a href="tel:{{ object.phone }}">{%endif%}{{ object.phone }}{% if object.phone %}</a>{%endif%}</td>
|
{% if union_account %}
|
||||||
<td class="align-middle">{{ object.notes|yesno|capfirst }}</td>
|
<td>{{ object.union_account|yesno|capfirst }}</td>
|
||||||
{% if union_account %}
|
{% endif %}
|
||||||
<td>{{ object.union_account|yesno|capfirst }}</td>
|
<td>
|
||||||
{% endif %}
|
<div class="btn-group d-flex" role="group">
|
||||||
<td>
|
<a href="{% url detail object.pk %}" class="btn btn-primary btn-sm modal-href">
|
||||||
<div class="btn-group d-flex" role="group">
|
<i class="fas fa-eye"></i> View
|
||||||
<a href="{% url detail object.pk %}" class="btn btn-primary btn-sm modal-href">
|
</a>
|
||||||
<i class="fas fa-eye"></i> View
|
<a href="{% url edit object.pk %}" class="btn btn-warning btn-sm"><i
|
||||||
</a>
|
class="fas fa-edit"></i> Edit</a>
|
||||||
<a href="{% url edit object.pk %}" class="btn btn-warning btn-sm"><i
|
</div>
|
||||||
class="fas fa-edit"></i> Edit</a>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
</td>
|
{% empty %}
|
||||||
</tr>
|
<tr class="table-warning">
|
||||||
{% empty %}
|
<td colspan="6" class="text-center">Nothing found</td>
|
||||||
<tr class="table-warning">
|
</tr>
|
||||||
<td colspan="6" class="text-center">Nothing found</td>
|
{% endfor %}
|
||||||
</tr>
|
</tbody>
|
||||||
{% endfor %}
|
</table>
|
||||||
</tbody>
|
</div>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-xs-block d-sm-block d-md-none">
|
|
||||||
{% include 'partials/generic_list_mobile.html' %}
|
|
||||||
</div>
|
|
||||||
{% if is_paginated %}
|
{% if is_paginated %}
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
{% paginator %}
|
{% paginator %}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
<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