layerindex-web/layerindex/editlayernote.html
Paul Eggleton 26ab9dbb28 Add ability to add, edit and delete layer notes
This allows adding an important notice to a layer e.g. "this layer is
deprecated, please use layer xyz instead". Only one layer note can be
added through the interface although the data structures allow multiple,
so notes may be added programmatically without disturbing user-added
ones.

With this change we also add a get_absolute_url() function to the
LayerItem model and change the calls to reverse() for layers to use it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00

43 lines
1.1 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% comment %}
layerindex-web - add/edit layer note form page template
Copyright (C) 2013 Intel Corporation
Licensed under the MIT license, see COPYING.MIT for details
{% endcomment %}
<!--
{% block title %}OpenEmbedded metadata index - {% if form.instance.pk %}add layer note{% else %}edit layer note{% endif %}{% endblock %}
-->
{% block content %}
{% autoescape on %}
<h2>Add layer note to {{ form.instance.layer.name }}</h2>
<p>This note will appear at the very top of the layer detail page. This would typically be used for important notices, e.g. &quot;This layer is obsolete, use layer xyz instead&quot;.</p>
<form id="edit_layernote_form" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save" class='btn' />
<a href="{% url layer_item form.instance.layer.name %}" class='btn'>Cancel</a>
</form>
{% endautoescape %}
{% endblock %}
{% block scripts %}
<script>
$(document).ready(function() {
$("#edit_layernote_form input:text, #edit_layernote_form textarea").first().focus();
});
</script>
{% endblock %}