Mercurial > farol > farol
diff farol/templates/common_edits.j2 @ 49:5583ddcd6164
Unify the edit_note page
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Tue, 07 Oct 2014 16:15:43 +0200 |
parents | 22d89f53e34c |
children | e6da0705a47c |
line wrap: on
line diff
--- a/farol/templates/common_edits.j2 Tue Oct 07 15:30:22 2014 +0200 +++ b/farol/templates/common_edits.j2 Tue Oct 07 16:15:43 2014 +0200 @@ -23,7 +23,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -#} -{% from "macros.j2" import textinput, examples %} +{% from "macros.j2" import textinput, textarea, selectinput, examples %} {% macro edit_title_type(doctitle, doctype) %} {% call textinput("title", "Document Title", "", doctitle, required=True) %} @@ -36,3 +36,42 @@ {{ examples(['Vulnerability Report', 'Security Bulletin', 'Security Notice']) }} {% endcall %} {% endmacro %} + +{% macro edit_note(types, note, ordinal) %} +<p><strong>Note</strong> is a place to put all manner of text blobs related to the document as a whole. It can be a concise summary of the overall document or a more compartmentalized and area-specific textual discussion. Depending on the need, there can be zero, one, or several <strong>Note</strong> elements in a given CVRF document. + +<p>The note should contain a compartmentalized textual discussion constrained by its <em>Type</em> attribute.</p> +{% call selectinput("type", "Type", types, note and note._type or '') %} +<p><em>Type</em> can be one of the following:</p> +<dl class="dl-horizontal"> + <dt>General:</dt> + <dd>A general, high-level note (<em>Title</em> may have more information).</dd> + <dt>Details:</dt> + <dd>A low-level detailed discussion (<em>Title</em> may have more information).</dd> + <dt>Description:</dt> + <dd>A description of something (<em>Title</em> may have more information).</dd> + <dt>Summary:</dt> + <dd>A summary of something (<em>Title</em> may have more information).</dd> + <dt>FAQ:</dt> + <dd>A list of frequently asked questions.</dd> + <dt>Legal Disclaimer:</dt> + <dd>Any possible legal discussion, including constraints, surrounding the document.</dd> + <dt>Other:</dt> + <dd>Something that doesn’t fit (<em>Title</em> should have more information).</dd> +</dl> +{% endcall %} +{% call textinput("ordinal", "Ordinal", "", ordinal or note._ordinal, type="number", required=True, extras={'min': '1'}) %} +<p><em>Ordinal</em> is a mandatory, locally significant value used to track notes inside a CVRF document at the root (document) level. It is provided to uniquely identify a <strong>Note</strong>.</p> +<p>There should be one of these values for every <strong>Note</strong> inside <strong>Document Notes</strong>, and it is recommended that <em>Ordinal</em> should be instantiated as a monotonically increasing counter, indexed from 1. Each <em>Ordinal</em> that tracks a <strong>Note</strong> inside <strong>Document Notes</strong> is completely independent from an <em>Ordinal</em> tracking a <strong>Note</strong> inside <strong>Vulnerability/Notes</strong>.</p> +{% endcall %} +{% call textinput("title", "Title", "", note and note._title or '') %} +<p><em>Title</em> should be a concise description of what is contained in the text.</p> +{% endcall %} +{% call textinput("audience", "Audience", "", note and note._audience or '') %} +<p><em>Audience</em> will indicate who is intended to read it.</p> +{% endcall %} +{% call textarea("note", "Note", "", note and note._note or '', 10, required=True) %} +<p><strong>Note</strong> is a place to put all manner of text blobs related to the document as a whole. It can be a concise summary of the overall document or a more compartmentalized and area-specific textual discussion.</p> +<p>The note should contain a compartmentalized textual discussion constrained by its <em>Type</em> attribute.</p> +{% endcall %} +{% endmacro %}