mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-16 21:12:13 +00:00
Markdown enable generic note fields
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
{% if object.venue %}
|
{% if object.venue %}
|
||||||
<dt class="col-sm-6">Venue Notes</dt>
|
<dt class="col-sm-6">Venue Notes</dt>
|
||||||
<dd class="col-sm-6">
|
<dd class="col-sm-6">
|
||||||
{{ object.venue.notes }}{% if object.venue.three_phase_available %}<br>(Three phase available){%endif%}
|
{{ object.venue.notes|markdown }}{% if object.venue.three_phase_available %}<br>(Three phase available){%endif%}
|
||||||
</dd>
|
</dd>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{% extends override|default:"base_rigs.html" %}
|
{% extends override|default:"base_rigs.html" %}
|
||||||
{% load widget_tweaks %}
|
{% load widget_tweaks %}
|
||||||
{% load button from filters %}
|
{% load button from filters %}
|
||||||
|
{% load markdown_tags %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
<dd>{{ object.address|linebreaksbr }}</dd>
|
<dd>{{ object.address|linebreaksbr }}</dd>
|
||||||
|
|
||||||
<dt>Notes</dt>
|
<dt>Notes</dt>
|
||||||
<dd>{{ object.notes|linebreaksbr }}</dd>
|
<dd>{{ object.notes|markdown }}</dd>
|
||||||
|
|
||||||
{% if object.three_phase_available is not None %}
|
{% if object.three_phase_available is not None %}
|
||||||
<dt>Three Phase Available</dt>
|
<dt>Three Phase Available</dt>
|
||||||
|
|||||||
@@ -1,6 +1,27 @@
|
|||||||
{% extends override|default:"base_rigs.html" %}
|
{% extends override|default:"base_rigs.html" %}
|
||||||
{% load button from filters %}
|
{% load button from filters %}
|
||||||
{% load widget_tweaks %}
|
{% load widget_tweaks %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block css %}
|
||||||
|
{{ block.super }}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static 'css/easymde.min.css' %}">
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block preload_js %}
|
||||||
|
{{ block.super }}
|
||||||
|
<script src="{% static 'js/easymde.min.js' %}"></script>
|
||||||
|
<script src="{% static 'js/interaction.js' %}"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ block.super }}
|
||||||
|
<script>
|
||||||
|
$(document).ready(function () {
|
||||||
|
setupMDE('.md-enabled');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
@@ -43,7 +64,7 @@
|
|||||||
<label for="{{ form.notes.id_for_label }}"
|
<label for="{{ form.notes.id_for_label }}"
|
||||||
class="col-sm-2 control-label">{{ form.notes.label }}</label>
|
class="col-sm-2 control-label">{{ form.notes.label }}</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
{% render_field form.notes class+="form-control" placeholder=form.notes.label %}
|
{% render_field form.notes class+="form-control md-enabled" placeholder=form.notes.label %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if form.three_phase_available is not None %}
|
{% if form.three_phase_available is not None %}
|
||||||
|
|||||||
Reference in New Issue
Block a user