mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-25 17:32:16 +00:00
* Started POM and assets test * FEAT: Adapt unit tests from RIGS to assets * CHORE: pep8... * Added Asset Create and Edit forms * Add non-cable asset creation test * CHORE: Frickin pep8... * Add cable asset creation test * Basic asset create validation testing * Asset edit tests are here A bit dodgy in places but par for the course for me :P * Add access level tests * Delete unused code Much less effort way to increase coverage stats :D * Add delete sample data test for completeness Chasing that sweet 100% coverage... * Add supplier list page + tests Also fix the supplier page not being ordered alphabetically * Helps if I add the migration... * Add supplier create/edit tests * Asset duplicate tests Also fixed some random bugs * Asset search tests * 404 tests and test that everything requires authentication * Test visibility of form errors And fix supplier form not displaying errors correctly! * Fix broken search test Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>
111 lines
4.4 KiB
HTML
111 lines
4.4 KiB
HTML
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
|
{% load widget_tweaks %}
|
|
|
|
{% block title %}Organisation | {{ object.name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
{% if not request.is_ajax %}
|
|
<div class="col-sm-12">
|
|
<h1>Organisation | {{ object.name }}</h1>
|
|
</div>
|
|
|
|
<div class="col-sm-12 text-right">
|
|
<div class="btn-group btn-page">
|
|
<a href="{% url 'organisation_update' object.pk %}" class="btn btn-default"><span
|
|
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="col-sm-6">
|
|
<div class="panel panel-info">
|
|
<div class="panel-heading">Organisation Details</div>
|
|
<div class="panel-body">
|
|
<dl class="dl-horizontal">
|
|
<dt>Name</dt>
|
|
<dd>{{ object.name }}</dd>
|
|
|
|
<dt>Phone</dt>
|
|
<dd><a href="tel:{{ object.phone }}">{{ object.phone }}</a></dd>
|
|
|
|
<dt>Email</dt>
|
|
<dd><a href="mailto:{{ object.email }}"><span class="overflow-ellipsis">{{ object.email }}</span></a></dd>
|
|
|
|
<dt>Address</dt>
|
|
<dd>{{ object.address|linebreaksbr }}</dd>
|
|
|
|
<dt>Notes</dt>
|
|
<dd>{{ object.notes|linebreaksbr }}</dd>
|
|
|
|
<dt>Union Account</dt>
|
|
<dd>{{ object.union_account|yesno|capfirst }}</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Associated People</div>
|
|
<div class="panel-body">
|
|
<div class="list-group">
|
|
{% for person,count in object.persons %}
|
|
<a class="list-group-item" href="{% url 'person_detail' person.pk %}">{{ person.pk|stringformat:"05d" }} | {{ person.name }} <span class="badge" title="{{count}} events with {{person.name}} for {{object.name}}">{{count}}</span></a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Associated Events</div>
|
|
<div class="panel-body">
|
|
{% with object.latest_events as events %}
|
|
{% include 'RIGS/event_table.html' %}
|
|
{% endwith %}
|
|
</div>
|
|
</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 'organisation_update' object.pk %}" class="btn btn-default"><span
|
|
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
|
</div>
|
|
<div>
|
|
<a href="{% url 'organisation_history' object.pk %}" title="View Revision History">
|
|
Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
{% if request.is_ajax %}
|
|
{% block footer %}
|
|
<div class="row">
|
|
<div class="col-sm-12 text-right">
|
|
<div class="btn-group btn-page">
|
|
<a href="{% url 'organisation_detail' object.pk %}" class="btn btn-default"><span
|
|
class="glyphicon glyphicon-eye-open"></span> Open Page</a>
|
|
<a href="{% url 'organisation_update' object.pk %}" class="btn btn-default"><span
|
|
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
|
</div>
|
|
<div>
|
|
<a href="{% url 'organisation_history' object.pk %}" title="View Revision History">
|
|
Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
{% endif %} |