mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Make supplier detail use the generic template
This commit is contained in:
@@ -1 +1 @@
|
||||
{% include 'generic_detail.html' with type='Organisation' history_link='organisation_history' detail_link='organisation_detail' update_link='organisation_update' associated='partials/associated_people.html' %}
|
||||
{% include 'generic_detail.html' with type='Organisation' history_link='organisation_history' detail_link='organisation_detail' update_link='organisation_update' associated='partials/associated_people.html' associated2='partials/associated_events.html' %}
|
||||
|
||||
8
RIGS/templates/partials/associated_events.html
Normal file
8
RIGS/templates/partials/associated_events.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12 py-3">
|
||||
<div class="card">
|
||||
<div class="card-header">Associated Events</div>
|
||||
{% include 'event_table.html' with events=object.latest_events %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1 +1 @@
|
||||
{% include 'generic_detail.html' with type='Person' history_link='person_history' detail_link='person_detail' update_link='person_update' associated='partials/associated_organisations.html' %}
|
||||
{% include 'generic_detail.html' with type='Person' history_link='person_history' detail_link='person_detail' update_link='person_update' associated='partials/associated_organisations.html' associated2='partials/associated_events.html' %}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{% include 'generic_detail.html' with type='Venue' history_link='venue_history' detail_link='venue_detail' update_link='venue_update' %}
|
||||
{% include 'generic_detail.html' with type='Venue' history_link='venue_history' detail_link='venue_detail' update_link='venue_update' associated2='partials/associated_events.html' %}
|
||||
|
||||
8
assets/templates/partials/associated_assets.html
Normal file
8
assets/templates/partials/associated_assets.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="col-12 pt-2">
|
||||
<div class="card">
|
||||
<div class="card-header">Associated Assets</div>
|
||||
{% with object.assets.all as object_list %}
|
||||
{% include 'partials/asset_list_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,75 +1 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_assets.html' %}
|
||||
{% block title %}Supplier | {{ object.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
{% if not request.is_ajax %}
|
||||
<div class="col-sm-12">
|
||||
<h1>Supplier | {{ object.name }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'supplier_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col pb-3">
|
||||
<div class="card">
|
||||
<div class="card-header">Supplier Details</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-6">Name</dt>
|
||||
<dd>{{ object.name }}</dd>
|
||||
|
||||
<dt class="col-6">Phone</dt>
|
||||
<dd>{% if object.phone %}<a href="tel:{{ object.phone }}">{% endif %}{{ object.phone }}{% if object.phone %}</a>{% endif %}</dd>
|
||||
|
||||
<dt class="col-6">Email</dt>
|
||||
<dd>{% if object.email %}<a href="mailto:{{ object.email }}">{% endif %}<span class="overflow-ellipsis">{{ object.email }}</span>{% if object.email %}</a>{% endif %}</dd>
|
||||
|
||||
<dt class="col-12">Address</dt>
|
||||
<dd class="col-12">{{ object.address|linebreaksbr }}</dd>
|
||||
|
||||
<dt class="col-12">Notes</dt>
|
||||
<dd class="col-12">{{ object.notes|linebreaksbr }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Associated Assets</div>
|
||||
{% with object.assets.all as object_list %}
|
||||
{% include 'partials/asset_list_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if not request.is_ajax %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'supplier_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
{% include 'partials/last_edited.html' with target="supplier_history" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% if request.is_ajax %}
|
||||
{% block footer %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'supplier_detail' object.pk %}" class="btn btn-primary"><span
|
||||
class="fas fa-eye"></span> Open Page</a>
|
||||
<a href="{% url 'supplier_update' object.pk %}" class="btn btn-light"><span
|
||||
class="fas fa-edit"></span> Edit</a>
|
||||
</div>
|
||||
{% include 'partials/last_edited.html' with target="supplier_history" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
{% include 'generic_detail.html' with type='Supplier' history_link='supplier_history' detail_link='supplier_detail' update_link='supplier_update' associated='partials/associated_assets.html' associated2='None' %}
|
||||
|
||||
@@ -43,16 +43,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include associated|safe %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 py-3">
|
||||
<div class="card">
|
||||
<div class="card-header">Associated Events</div>
|
||||
{% include 'event_table.html' with events=object.latest_events %}
|
||||
</div>
|
||||
</div>
|
||||
{% if associated %}
|
||||
{% include associated|safe %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if associated2 %}
|
||||
{% include associated2|safe %}
|
||||
{% endif %}
|
||||
|
||||
{% if not request.is_ajax %}
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user