Mercurial > farol > farol
annotate farol/templates/base.j2 @ 7:8f41bb7f4681
Move the Document management routines to a document Blueprint
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 25 Sep 2014 17:03:35 +0200 |
parents | bb7334ff114a |
children | 2ce3676c9b2e |
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"> | |
87 <li class="dropdown{{ ' disabled' if not has_current }}{{ ' active' if active == 'render' }}"> | |
88 <a href="#" class="dropdown-toggle{{ ' disabled' if not has_current }}" data-toggle="dropdown">Render <span class="caret"></span></a> | |
89 <ul class="dropdown-menu" role="menu"> | |
90 {% for format in ('cvrf', 'nasl', 'oval') %}<li><a href="{{ url_for('render', format_=format)}}">as {{ format | upper }}</a></li>{% endfor %} | |
91 </ul> | |
92 </li> | |
93 <li> | |
94 <form action="{{ url_for('save') }}"> | |
95 <button class="btn btn-success navbar-btn"{% if not has_current %} disabled="disabled"{% endif %}>Save</button> | |
96 </form> | |
97 </li> | |
98 <li class="dropdown"> | |
99 <a href="#" class="dropdown-toggle" data-toggle="dropdown">Cache <span class="caret"></span></a> | |
100 <ul class="dropdown-menu" role="menu"> | |
101 {% for element in cache | sort %}<li><a href="{{ url_for('load', element=element)}}">{{ element | capitalize }}</a></li>{% endfor %} | |
102 </ul> | |
103 </li> | |
104 </ul> | |
105 </div>{# /.navbar-collapse #} | |
106 </div>{# /.container-fluid #} | |
107 </nav> | |
108 <div class="main container"> | |
109 {% with messages = get_flashed_messages(with_categories=True) %} | |
110 {% if messages %} | |
111 <div class="flashes"> | |
112 {% for category, message in messages %} | |
113 {% if category == 'message' %}{% set category = "info" %}{% endif %} | |
114 <div class="alert alert-{{ category }}">{{ message }}</div> | |
115 {% endfor %} | |
116 </div> | |
117 {% endif %} | |
118 {% endwith %} | |
119 <div> | |
120 <script>$("#error-popover").popover();</script> | |
121 {% block content %}{% endblock %} | |
122 </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
|
123 {% if config.DEBUG and not config.DEBUG_SURE %} |
63b00c10ada8
Add Configuration support, warning when in DEBUG mode, and Deployment instruction
Benoît Allard <benoit.allard@greenbone.net>
parents:
0
diff
changeset
|
124 <div class="alert alert-danger"><strong>DEBUG:</strong> This application is running in debug mode. See the <a href="{{ url_for('about', _anchor='debug')}}">about page</a> for more Details</div> |
63b00c10ada8
Add Configuration support, warning when in DEBUG mode, and Deployment instruction
Benoît Allard <benoit.allard@greenbone.net>
parents:
0
diff
changeset
|
125 {% endif %} |
0 | 126 </div> |
127 <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
|
128 <div class="text-center"> |
bb7334ff114a
Add the Greenbone Logo to the footer.
Benoît Allard <benoit.allard@greenbone.net>
parents:
1
diff
changeset
|
129 <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
|
130 | |
bb7334ff114a
Add the Greenbone Logo to the footer.
Benoît Allard <benoit.allard@greenbone.net>
parents:
1
diff
changeset
|
131 <span><a href="{{ url_for('about') }}">About ...</a></span> |
bb7334ff114a
Add the Greenbone Logo to the footer.
Benoît Allard <benoit.allard@greenbone.net>
parents:
1
diff
changeset
|
132 </div> |
bb7334ff114a
Add the Greenbone Logo to the footer.
Benoît Allard <benoit.allard@greenbone.net>
parents:
1
diff
changeset
|
133 <a href="http://greenbone.net/" id="greenbone" class="logo_img text-hide center-block">Greenbone Networks GmbH</a> |
0 | 134 </footer> |
135 </body> | |
136 </html> |