benoit@0: {# benoit@0: # Description: benoit@0: # Web Template used in Farol Design benoit@0: # benoit@0: # Authors: benoit@0: # BenoƮt Allard benoit@0: # benoit@0: # Copyright: benoit@0: # Copyright (C) 2014 Greenbone Networks GmbH benoit@0: # benoit@0: # This program is free software; you can redistribute it and/or benoit@0: # modify it under the terms of the GNU General Public License benoit@0: # as published by the Free Software Foundation; either version 2 benoit@0: # of the License, or (at your option) any later version. benoit@0: # benoit@0: # This program is distributed in the hope that it will be useful, benoit@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of benoit@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the benoit@0: # GNU General Public License for more details. benoit@0: # benoit@0: # You should have received a copy of the GNU General Public License benoit@0: # along with this program; if not, write to the Free Software benoit@0: # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. benoit@0: -#} benoit@0: benoit@0: {% extends "base.j2" %} benoit@8: {% from "macros.j2" import textinput, textarea, panel %} benoit@34: {% from "common_edits.j2" import edit_title_type %} benoit@0: benoit@167: {% macro input_download(width, type, placeholder, example, help) %} benoit@167:
benoit@167: {% call modal(type | lower + "_modal", type + " help") %} benoit@167: {% for p in help.split('\n\n') %} benoit@167:

{{ p | urlize }}

benoit@167: {% endfor %} benoit@167: {% endcall %} benoit@167:
benoit@167: benoit@167:
benoit@167:
benoit@167: {{ type }}: benoit@167: benoit@167:
benoit@170: benoit@167: benoit@167: benoit@167:
benoit@167:
benoit@167:
benoit@167:
benoit@167:
benoit@167: {% endmacro %} benoit@167: benoit@0: {% set active='new' %} benoit@0: benoit@0: {% block title %}New{% endblock %} benoit@0: benoit@0: {% block content %} benoit@12: {% if has_document and caching %} benoit@27:

You are currently editing a document: {{ current_id }}. Loading a new one will lose your modifications. Do you want to save it first ?

benoit@0: {% endif %} benoit@0:

New Document

benoit@0: benoit@0:
benoit@0: benoit@0:
benoit@0:
benoit@0:

benoit@0: benoit@167: Upload a remote document benoit@0: benoit@0:

benoit@0:
benoit@0:
benoit@0:
benoit@167: {% for row in input_choices[:-1] | batch(3) %} benoit@8:
benoit@167: {% for (type, placeholder, example, help) in row %} benoit@167: {{ input_download(4, type, placeholder, example, help) }} benoit@8: {% endfor %} benoit@8:
benoit@167: {% endfor %} benoit@167:
benoit@167: {{ input_download(12, *input_choices[-1]) }} benoit@28:
benoit@0:
benoit@0:
benoit@0:
benoit@0: benoit@0:
benoit@0:
benoit@0:

benoit@0: benoit@167: Upload a local document benoit@0: benoit@0:

benoit@0:
benoit@0:
benoit@0:
benoit@0:
benoit@0: {{ textinput("local", "Local File", type="file", required=True) }} benoit@28: benoit@0:
benoit@0:
benoit@0:
benoit@0:
benoit@0: benoit@0:
benoit@0:
benoit@0:

benoit@0: benoit@167: Upload raw text benoit@0: benoit@0:

benoit@0:
benoit@0:
benoit@0:
benoit@0:
benoit@0: {{ textarea("text", "Document content", value=' benoit@0: benoit@0: Title benoit@0: Type benoit@0: benoit@0: benoit@0: benoit@0: benoit@0: 1234 benoit@0: benoit@0: Draft benoit@0: 0.1 benoit@0: benoit@0: benoit@0: 0.1 benoit@0: ' + now.isoformat() + ' benoit@0: First Revision benoit@0: benoit@0: benoit@0: ' + now.isoformat() + ' benoit@0: ' + now.isoformat() + ' benoit@0: benoit@0: ' | escape, required=True) }} benoit@28: benoit@0:
benoit@0:
benoit@0:
benoit@0:
benoit@0: benoit@0:
benoit@0:
benoit@0:

benoit@0: benoit@0: Create an empty Document benoit@0: benoit@0:

benoit@0:
benoit@0:
benoit@0:
benoit@0:
benoit@34: {{ edit_title_type() }} benoit@28: benoit@0:
benoit@0:
benoit@0:
benoit@0:
benoit@0: benoit@0:
benoit@0: benoit@12: {% if caching %} benoit@12: {% call panel(heading="Load a document from the cache", title=4, collapsible=False) %} benoit@12: benoit@12: {% endcall %} benoit@12: {% endif %} benoit@8: benoit@0: {% endblock %}