Mercurial > farol > farol
comparison farol/templates/new.j2 @ 8:2ce3676c9b2e
Ease the import of new documents
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 25 Sep 2014 17:49:43 +0200 |
parents | 4a9f23230eba |
children | 4219d6fb4c38 |
comparison
equal
deleted
inserted
replaced
7:8f41bb7f4681 | 8:2ce3676c9b2e |
---|---|
22 # along with this program; if not, write to the Free Software | 22 # along with this program; if not, write to the Free Software |
23 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | 23 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
24 -#} | 24 -#} |
25 | 25 |
26 {% extends "base.j2" %} | 26 {% extends "base.j2" %} |
27 {% from "macros.j2" import textinput, textarea %} | 27 {% from "macros.j2" import textinput, textarea, panel %} |
28 | 28 |
29 {% set active='new' %} | 29 {% set active='new' %} |
30 | 30 |
31 {% block title %}New{% endblock %} | 31 {% block title %}New{% endblock %} |
32 | 32 |
40 | 40 |
41 <div class="panel panel-default"> | 41 <div class="panel panel-default"> |
42 <div class="panel-heading"> | 42 <div class="panel-heading"> |
43 <h4 class="panel-title"> | 43 <h4 class="panel-title"> |
44 <a data-toggle="collapse" data-parent="#accordion" href="#fromURL"> | 44 <a data-toggle="collapse" data-parent="#accordion" href="#fromURL"> |
45 Download document from URL | 45 Download a document from an URL |
46 </a> | 46 </a> |
47 </h4> | 47 </h4> |
48 </div> | 48 </div> |
49 <div id="fromURL" class="panel-collapse collapse in"> | 49 <div id="fromURL" class="panel-collapse collapse in"> |
50 <div class="panel-body"> | 50 <div class="panel-body"> |
51 <div class="row"> | |
52 {% for (type, placeholder) in [ | |
53 ('RHSA', 'YYYY:nnnn'), | |
54 ('Oracle', 'nnnnnnn'), | |
55 ('Cisco', 'sa-YYYYMMDD-xxx'), | |
56 ('NASL', '')] %} | |
57 <div class="col-lg-3"> | |
58 <form role="form" method="POST"> | |
59 <input type="hidden" name="{{ type | lower}}"> | |
60 <div class="input-group"> | |
61 <span class="input-group-addon">{{ type }}: </span> | |
62 <input type="text" class="form-control" name="id" placeholder="{{ placeholder }}"> | |
63 <span class="input-group-btn"> | |
64 <button class="btn btn-primary" type="submit">Download</button> | |
65 </span> | |
66 </div><!-- /input-group --> | |
67 </form> | |
68 </div> | |
69 {% endfor %} | |
70 </div> | |
71 <hr> | |
51 <form role="form" method="POST"> | 72 <form role="form" method="POST"> |
52 {{ textinput("url", "URL", "https://...", required=True, type="url") }} | 73 {{ textinput("url", "URL", "https://...", required=True, type="url") }} |
53 <button type="submit", class="btn btn-primary">Download</button> | 74 <button type="submit", class="btn btn-primary">Download</button> |
54 </form> | 75 </form> |
55 </div> | 76 </div> |
133 </div> | 154 </div> |
134 </div> | 155 </div> |
135 | 156 |
136 </div> | 157 </div> |
137 | 158 |
159 {% call panel(heading="Load a document from the cache", title=4, collapsible=False) %} | |
160 <ul> | |
161 {% for element in cache | sort %}<li><a href="{{ url_for('load', element=element)}}">{{ element }}</a></li>{% endfor %} | |
162 </ul> | |
163 {% endcall %} | |
164 | |
138 {% endblock %} | 165 {% endblock %} |