Mercurial > farol > farol
annotate farol/templates/base.j2 @ 25:4a3fdd3f2723
Move the 'Save' to the cache menu, only show render when a document is loaded
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 02 Oct 2014 11:27:01 +0200 |
parents | a52995b50ecc |
children | 33a3a36b5bf6 |
rev | line source |
---|---|
0 | 1 {# |
2 # Description: | |
3 # Web Template used in Farol Design | |
4 # | |
5 # Authors: | |
6 # BenoƮt Allard <benoit.allard@greenbone.net> | |
7 # | |
8 # Copyright: | |
9 # Copyright (C) 2014 Greenbone Networks GmbH | |
10 # | |
11 # This program is free software; you can redistribute it and/or | |
12 # modify it under the terms of the GNU General Public License | |
13 # as published by the Free Software Foundation; either version 2 | |
14 # of the License, or (at your option) any later version. | |
15 # | |
16 # This program is distributed in the hope that it will be useful, | |
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 # GNU General Public License for more details. | |
20 # | |
21 # You should have received a copy of the GNU General Public License | |
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. | |
24 -#} | |
25 | |
26 <!doctype html> | |
27 | |
28 <html lang="en"> | |
29 <head> | |
30 <meta charset="utf8"> | |
31 <title>Farol - {% block title %}{% endblock %}</title> | |
32 <link rel="stylesheet" href="{{ url_for('static', filename='bootstrap.css') }}"> | |
33 <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> | |
34 </head> | |
35 <body> | |
36 <script src="{{ url_for('static', filename='jquery-2.1.1.min.js') }}"></script> | |
37 <script src="{{ url_for('static', filename='bootstrap.js') }}"></script> | |
38 <nav class="navbar navbar-default" role="navigation"> | |
39 <div class="container"> | |
40 {# Brand and toggle get grouped for better mobile display #} | |
41 <div class="navbar-header"> | |
42 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> | |
43 <span class="sr-only">Toggle navigation</span> | |
44 <span class="icon-bar"></span> | |
45 <span class="icon-bar"></span> | |
46 <span class="icon-bar"></span> | |
47 </button> | |
7
8f41bb7f4681
Move the Document management routines to a document Blueprint
Benoît Allard <benoit.allard@greenbone.net>
parents:
6
diff
changeset
|
48 <a class="navbar-brand" href="{{ url_for('welcome') }}">Farol</a> |
0 | 49 </div> |
50 | |
51 {# Collect the nav links, forms, and other content for toggling #} | |
52 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> | |
53 <ul class="nav navbar-nav"> | |
54 <li{% if active == 'new' %} class="active"{% endif %}><a href="{{ url_for('new') }}">New</a></li> | |
7
8f41bb7f4681
Move the Document management routines to a document Blueprint
Benoît Allard <benoit.allard@greenbone.net>
parents:
6
diff
changeset
|
55 {% if has_current %} |
8f41bb7f4681
Move the Document management routines to a document Blueprint
Benoît Allard <benoit.allard@greenbone.net>
parents:
6
diff
changeset
|
56 <li{% if active == 'document' %} class="active"{% endif %}><a href="{{ url_for('document.view') }}">Document</a></li> |
8f41bb7f4681
Move the Document management routines to a document Blueprint
Benoît Allard <benoit.allard@greenbone.net>
parents:
6
diff
changeset
|
57 {% endif %} |
0 | 58 {% if products %} |
59 <li class="dropdown{{ ' active' if active == 'product' }}"> | |
60 <a href="#" class="dropdown-toggle" data-toggle="dropdown">Products <span class="caret"></span></a> | |
61 <ul class="dropdown-menu" role="menu"> | |
62 {% for name, productid in products %} | |
63 <li><a href="{{ url_for('producttree.view_product', productid=productid) }}">{{ name }}</a></li> | |
64 {% endfor %} | |
65 </ul> | |
66 </li> | |
67 {% endif %} | |
68 {% if vulnerabilities %} | |
69 <li class="dropdown{{ ' active' if active == 'vulnerability' }}"> | |
70 <a href="#" class="dropdown-toggle" data-toggle="dropdown">Vulnerabilities <span class="caret"></span></a> | |
71 <ul class="dropdown-menu" role="menu"> | |
72 {% for name, ord in vulnerabilities %} | |
73 <li><a href="{{ url_for('vulnerability.view', ordinal=ord) }}">{{ name }}</a></li> | |
74 {% endfor %} | |
75 </ul> | |
76 </li> | |
77 {% endif %} | |
78 {% if has_current %} | |
79 {% if error %} | |
80 <p class="navbar-text">Document is <a id="error-popover" href="#" tabindex="0" class="navbar-link" data-toggle="popover" data-trigger="focus" data-placement="bottom" title="First Error:" data-content="{{ error }}"><strong>invalid</strong></a></p> | |
81 {% else %} | |
82 <p class="navbar-text">Document looks valid</p> | |
83 {% endif %} | |
84 {% endif %} | |
85 </ul> | |
86 <ul class="nav navbar-nav navbar-right"> | |
25
4a3fdd3f2723
Move the 'Save' to the cache menu, only show render when a document is loaded
Benoît Allard <benoit.allard@greenbone.net>
parents:
14
diff
changeset
|
87 {% if has_current %} |
4a3fdd3f2723
Move the 'Save' to the cache menu, only show render when a document is loaded
Benoît Allard <benoit.allard@greenbone.net>
parents:
14
diff
changeset
|
88 <li class="dropdown{{ ' active' if active == 'render' }}"> |
4a3fdd3f2723
Move the 'Save' to the cache menu, only show render when a document is loaded
Benoît Allard <benoit.allard@greenbone.net>
parents:
14
diff
changeset
|
89 <a href="#" class="dropdown-toggle" data-toggle="dropdown">Render <span class="caret"></span></a> |
0 | 90 <ul class="dropdown-menu" role="menu"> |
91 {% for format in ('cvrf', 'nasl', 'oval') %}<li><a href="{{ url_for('render', format_=format)}}">as {{ format | upper }}</a></li>{% endfor %} | |
92 </ul> | |
93 </li> | |
25
4a3fdd3f2723
Move the 'Save' to the cache menu, only show render when a document is loaded
Benoît Allard <benoit.allard@greenbone.net>
parents:
14
diff
changeset
|
94 {% endif %} |
12
4219d6fb4c38
Implement three kind of caches
Benoît Allard <benoit.allard@greenbone.net>
parents:
8
diff
changeset
|
95 {% if caching %} |
0 | 96 <li class="dropdown"> |
97 <a href="#" class="dropdown-toggle" data-toggle="dropdown">Cache <span class="caret"></span></a> | |
98 <ul class="dropdown-menu" role="menu"> | |
25
4a3fdd3f2723
Move the 'Save' to the cache menu, only show render when a document is loaded
Benoît Allard <benoit.allard@greenbone.net>
parents:
14
diff
changeset
|
99 <li role="presentation"{{ ' class="disabled"' if not has_current }}><a role="menuitem" tabindex="-1" href="{{ url_for('cache.save') }}">Save current</a> |
4a3fdd3f2723
Move the 'Save' to the cache menu, only show render when a document is loaded
Benoît Allard <benoit.allard@greenbone.net>
parents:
14
diff
changeset
|
100 </li> |
4a3fdd3f2723
Move the 'Save' to the cache menu, only show render when a document is loaded
Benoît Allard <benoit.allard@greenbone.net>
parents:
14
diff
changeset
|
101 <li role="presentation" class="divider"></li> |
4a3fdd3f2723
Move the 'Save' to the cache menu, only show render when a document is loaded
Benoît Allard <benoit.allard@greenbone.net>
parents:
14
diff
changeset
|
102 {% for element in cache | sort %}<li role="presentation"><a href="{{ url_for('cache.load', element=element)}}">{{ element }}</a></li>{% endfor %} |
0 | 103 </ul> |
104 </li> | |
12
4219d6fb4c38
Implement three kind of caches
Benoît Allard <benoit.allard@greenbone.net>
parents:
8
diff
changeset
|
105 {% endif %} |
0 | 106 </ul> |
107 </div>{# /.navbar-collapse #} | |
108 </div>{# /.container-fluid #} | |
109 </nav> | |
110 <div class="main container"> | |
111 {% with messages = get_flashed_messages(with_categories=True) %} | |
112 {% if messages %} | |
113 <div class="flashes"> | |
114 {% for category, message in messages %} | |
115 {% if category == 'message' %}{% set category = "info" %}{% endif %} | |
116 <div class="alert alert-{{ category }}">{{ message }}</div> | |
117 {% endfor %} | |
118 </div> | |
119 {% endif %} | |
120 {% endwith %} | |
121 <div> | |
122 <script>$("#error-popover").popover();</script> | |
123 {% block content %}{% endblock %} | |
124 </div> | |
1
63b00c10ada8
Add Configuration support, warning when in DEBUG mode, and Deployment instruction
Benoît Allard <benoit.allard@greenbone.net>
parents:
0
diff
changeset
|
125 {% if config.DEBUG and not config.DEBUG_SURE %} |
14
a52995b50ecc
Add a warning when saving to a private cache
Benoît Allard <benoit.allard@greenbone.net>
parents:
12
diff
changeset
|
126 <div class="alert alert-danger"><strong>DEBUG:</strong> This application is running in debug mode. See the <a href="{{ url_for('about') }}#debug">about page</a> for more Details</div> |
1
63b00c10ada8
Add Configuration support, warning when in DEBUG mode, and Deployment instruction
Benoît Allard <benoit.allard@greenbone.net>
parents:
0
diff
changeset
|
127 {% endif %} |
0 | 128 </div> |
129 <footer class="footer container-fluid"> | |
6
bb7334ff114a
Add the Greenbone Logo to the footer.
Benoît Allard <benoit.allard@greenbone.net>
parents:
1
diff
changeset
|
130 <div class="text-center"> |
bb7334ff114a
Add the Greenbone Logo to the footer.
Benoît Allard <benoit.allard@greenbone.net>
parents:
1
diff
changeset
|
131 <span class="text-muted">Copyright © 2014 Greenbone Networks GmbH</span> |
bb7334ff114a
Add the Greenbone Logo to the footer.
Benoît Allard <benoit.allard@greenbone.net>
parents:
1
diff
changeset
|
132 | |
8
2ce3676c9b2e
Ease the import of new documents
Benoît Allard <benoit.allard@greenbone.net>
parents:
7
diff
changeset
|
133 <span><a href="{{ url_for('about') }}">About Farol</a></span> |
6
bb7334ff114a
Add the Greenbone Logo to the footer.
Benoît Allard <benoit.allard@greenbone.net>
parents:
1
diff
changeset
|
134 </div> |
bb7334ff114a
Add the Greenbone Logo to the footer.
Benoît Allard <benoit.allard@greenbone.net>
parents:
1
diff
changeset
|
135 <a href="http://greenbone.net/" id="greenbone" class="logo_img text-hide center-block">Greenbone Networks GmbH</a> |
0 | 136 </footer> |
137 </body> | |
138 </html> |