FEAT: Add oembed for assets (#393)

* FEAT: Add oembed for assets

Don't see the worth in doing supplier currently...we don't OEmbed Org/Venue etc after all...

* FIX Copy paste error ;D

* Fix embeds not actually working for unauthenticated users

This is why I should have written tests...
This commit is contained in:
2020-01-17 15:28:29 +00:00
committed by GitHub
parent e0c6a56263
commit 630011aff7
4 changed files with 111 additions and 7 deletions

View File

@@ -0,0 +1,45 @@
{% extends 'base_embed.html' %}
{% load static from staticfiles %}
{% block content %}
<div class="row">
<div class="col-sm-12">
<a href="/assets">
<span class="source"> TEC Asset Database</span>
</a>
</div>
<div class="col-sm-12">
<h3>
<a href="{% url 'asset_detail' object.asset_id %}">Asset: {{ object.asset_id }} | {{ object.description }} </a>
<small class="label label-default">
<strong>Category:</strong>
{{ object.category }}
</small>
&nbsp;
<small class="label label-{{ object.status.display_class|default:'default' }}">
<strong>Status:</strong>
{{ object.status }}
</small>
</h3>
<br>
{% if object.serial_number %}
<p>
<strong>Serial Number: </strong>
{{ object.serial_number }}
</p>
{% endif %}
{% if object.comments %}
<p>
<strong>Comments: </strong>
{{ object.comments|linebreaksbr }}
</p>
{% endif %}
</table>
</div>
</div>
{% endblock %}