# HG changeset patch # User BenoƮt Allard # Date 1412244568 -7200 # Node ID 6c65b16f26803e11647f0f101616fcd73d96cc4e # Parent 69e0330c4faebcd524aa5ae27b9bac33b5dbba61 Rework the 'new' page diff -r 69e0330c4fae -r 6c65b16f2680 farol/templates/base.j2 --- a/farol/templates/base.j2 Thu Oct 02 12:08:48 2014 +0200 +++ b/farol/templates/base.j2 Thu Oct 02 12:09:28 2014 +0200 @@ -27,7 +27,7 @@ - + Farol - {% block title %}{% endblock %} diff -r 69e0330c4fae -r 6c65b16f2680 farol/templates/new.j2 --- a/farol/templates/new.j2 Thu Oct 02 12:08:48 2014 +0200 +++ b/farol/templates/new.j2 Thu Oct 02 12:09:28 2014 +0200 @@ -42,7 +42,7 @@

- Download a document from an URL + Download a document

@@ -52,27 +52,39 @@ {% for (type, placeholder) in [ ('RHSA', 'YYYY:nnnn'), ('Oracle', 'nnnnnnn'), - ('Cisco', 'sa-YYYYMMDD-xxx'), - ('NASL', '')] %} -
+ ('Cisco', 'sa-YYYYMMDD-xxx')] %} +
-
- {{ type }}: - - - - -
+
+
+ {{ type }}: + + + + +
+
{% endfor %}
-
+
- {{ textinput("url", "URL", "https://...", required=True, type="url") }} - +
+
+ URL: + + + + +
+
+
+
+ {% set comma = joiner(', ') %} +

Some examples: {% for (name, id, value) in [('Red Hat Security Advisory: kernel security, bug fix, and enhancement update', 'rhsa', '2014:0981'), ('Oracle Critical Patch Update Advisory - April 2014', 'oracle' , '2188432'), ('Multiple Vulnerabilities in OpenSSL Affecting Cisco Products','cisco','sa-20140605-openssl'), ('Greenbone Security Advisory 2013-01', 'url', 'http://www.greenbone.net/download/gbsa/gbsa2013-01.cvrf')] %}{{ comma() }}{{ name }}{% endfor %} @@ -81,7 +93,7 @@

- Upload document + Upload a document

@@ -89,7 +101,7 @@
{{ textinput("local", "Local File", type="file", required=True) }} - +
@@ -99,7 +111,7 @@

- Some text + Raw text

@@ -129,7 +141,7 @@ ' + now.isoformat() + ' ' | escape, required=True) }} - + @@ -148,7 +160,7 @@
{{ textinput("title", "Document Title", required=True) }} {{ textinput("type", "Document Type", "Security Advisory", required=True) }} - +