178 lines
4.6 KiB
Django/Jinja
178 lines
4.6 KiB
Django/Jinja
{% extends 'detail.html.j2' %}
|
|
|
|
{% load json %}
|
|
{% load markdown %}
|
|
|
|
|
|
{% block tabs %}
|
|
<form action="" method="post">
|
|
{% csrf_token %}
|
|
<div id="details" class="content-tab">
|
|
|
|
{% include 'content/section.html.j2' with tab=form.tabs.details %}
|
|
|
|
</div>
|
|
|
|
|
|
<div id="versions" class="content-tab">
|
|
|
|
{% include 'content/section.html.j2' with tab=form.tabs.versions %}
|
|
|
|
<input type="button" value="New Software Version" onclick="window.location='{% url 'ITAM:_software_version_add' pk=software.id %}';">
|
|
|
|
<table>
|
|
<thead>
|
|
<th>Version</th>
|
|
<th>Installations</th>
|
|
<th>Vulnerable</th>
|
|
<th> </th>
|
|
</thead>
|
|
{% for version in software_versions %}
|
|
<tr>
|
|
<td><a href="{% url 'ITAM:_software_version_view' software_id=software.id pk=version.id %}">{{ version.name }}</a></td>
|
|
<td>{{ version.installs }}</td>
|
|
<td>{% include 'icons/issue_link.html.j2' with issue=3 %}</td>
|
|
<td> </td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
<div id="licences" class="content-tab">
|
|
|
|
{% include 'content/section.html.j2' with tab=form.tabs.licences %}
|
|
|
|
{% include 'icons/issue_link.html.j2' with issue=4 %}
|
|
|
|
<table>
|
|
<thead>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Available</th>
|
|
<th> </th>
|
|
</thead>
|
|
<tr>
|
|
<td>GPL-3</td>
|
|
<td>Open Source</td>
|
|
<td>1 / 5</td>
|
|
<th> </th>
|
|
</tr>
|
|
<tr>
|
|
<td>MIT</td>
|
|
<td>Open Source</td>
|
|
<td>Unlimited</td>
|
|
<th> </th>
|
|
</tr>
|
|
<tr>
|
|
<td>Windows Device</td>
|
|
<td>CAL</td>
|
|
<td>11 / 15</td>
|
|
<th> </th>
|
|
</tr>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
<div id="tickets" class="content-tab">
|
|
|
|
{% include 'content/section.html.j2' with tab=form.tabs.tickets %}
|
|
|
|
<table>
|
|
<thead>
|
|
<th>Name</th>
|
|
<th>Status</th>
|
|
<th> </th>
|
|
</thead>
|
|
{% if tickets %}
|
|
{% for ticket in tickets %}
|
|
<tr>
|
|
<td>{% concat_strings "#" ticket.ticket.id as ticket_ref %}{{ ticket_ref | markdown | safe}}</td>
|
|
<td>{% include 'core/ticket/badge_ticket_status.html.j2' with ticket_status_text=ticket.ticket.get_status_display ticket_status=ticket.ticket.get_status_display|ticket_status %}</td>
|
|
<td> </td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="3">No related tickets exist</td>
|
|
</tr>
|
|
{% endif %}
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div id="notes" class="content-tab">
|
|
|
|
{% include 'content/section.html.j2' with tab=form.tabs.notes %}
|
|
|
|
{{ notes_form }}
|
|
<input type="submit" name="{{notes_form.prefix}}" value="Submit" />
|
|
<div class="comments">
|
|
{% if notes %}
|
|
{% for note in notes%}
|
|
{% include 'note.html.j2' %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div id="installations" class="content-tab">
|
|
|
|
{% include 'content/section.html.j2' with tab=form.tabs.installations %}
|
|
|
|
<table>
|
|
<thead>
|
|
<th>Device</th>
|
|
<th>Organization</th>
|
|
<th title="Not Set/Install/Remove">Action</th>
|
|
<th>Installed Version</th>
|
|
<th title="Date Software Installed">Install Date</th>
|
|
<th> </th>
|
|
</thead>
|
|
{% if device_software %}
|
|
{% for device in device_software %}
|
|
<tr>
|
|
<td><a href="{% url 'ITAM:_device_view' pk=device.device.id %}">{{ device.device }}</a></td>
|
|
<td>{{ device.organization }}</td>
|
|
<td>
|
|
{% if device.get_action_display == 'Install' %}
|
|
{% include 'icons/success_text.html.j2' with icon_text=device.get_action_display %}
|
|
{% elif device.get_action_display == 'Remove'%}
|
|
{% include 'icons/cross_text.html.j2' with icon_text=device.get_action_display %}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if device.installedversion %}
|
|
{{ device.installedversion }}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if device.installed %}
|
|
{{ device.installed }}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
<td> </td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="6">Nothing Found</td>
|
|
</tr>
|
|
{% endif %}
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
{% endblock %}
|