Fix page formatting

This commit is contained in:
Oliver Walters 2020-02-01 23:26:54 +11:00
parent 88ec40e454
commit 1f71a93d88
2 changed files with 21 additions and 9 deletions

View File

@ -328,6 +328,12 @@
width: 100%; width: 100%;
} }
input[type="submit"] {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
}
.modal textarea { .modal textarea {
width: 100%; width: 100%;
} }

View File

@ -8,27 +8,30 @@
{% include 'part/tabs.html' with tab='notes' %} {% include 'part/tabs.html' with tab='notes' %}
<h4>{% trans "Part Notes" %}</h4>
{% if editing %} {% if editing %}
<h4>{% trans "Part Notes" %}</h4>
<form method='POST'> <form method='POST'>
{% csrf_token %} {% csrf_token %}
<input type="submit" value='{% trans "Save Notes" %}'/>
{{ form }} {{ form }}
<hr>
<input type="submit" value='{% trans "Save" %}'/>
</form> </form>
{{ form.media }} {{ form.media }}
{% else %} {% else %}
<div class='row'>
<div class='panel panel-default'> <div class='col-sm-6'>
<div class='panel-heading'> <h4>{% trans "Part Notes" %}</h4>
{% trans "Notes" %}
<button class='btn btn-default' id='edit-notes'>Edit</button>
</div> </div>
<div class='col-sm-6'>
<button title='{% trans "Edit notes" %}' class='btn btn-default btn-glyph float-right' id='edit-notes'><span class='glyphicon glyphicon-edit'></span></button>
</div>
</div>
<div class='panel panel-default'>
<div class='panel-content'> <div class='panel-content'>
{{ part.notes | markdownify }} {{ part.notes | markdownify }}
</div> </div>
@ -41,8 +44,11 @@
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
{% if editing %}
{% else %}
$("#edit-notes").click(function() { $("#edit-notes").click(function() {
location.href = "{% url 'part-notes' part.id %}?edit=1"; location.href = "{% url 'part-notes' part.id %}?edit=1";
}); });
{% endif %}
{% endblock %} {% endblock %}