Skip to content

Commit 9a64b84

Browse files
committed
improve alerts
multiple messages are shown as a list also fixup column width for bootstrap 4
1 parent 26dcf6e commit 9a64b84

File tree

1 file changed

+61
-51
lines changed
  • share/roundup/templates/jinja2/html/layout

1 file changed

+61
-51
lines changed
Lines changed: 61 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,70 @@
11
{% set status_notresolved = '-1,1,2,3,4,5,6,7'
22
%}<!doctype html>
33
<html>
4-
<head>
5-
<meta charset="utf-8">
6-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7-
<meta name="description" content="Roundup is a python-based, MIT licensed issue-tracking system with command-line, web and e-mail interfaces">
8-
<meta name="viewport" content="width=device-width">
9-
<title>{% block head_title %}{% endblock %}</title>
10-
<link rel="stylesheet" type="text/css" href="@@file/bootstrap.min.css">
11-
<link rel="stylesheet" type="text/css" href="@@file/bootstrap-responsive.min.css">
12-
<link rel="stylesheet" type="text/css" href="@@file/style.css">
13-
{% block extracss %} {% endblock %}
14-
</head>
15-
<body>
16-
{% block navbar %}
17-
{% include 'layout/banner.html' %}
18-
{% endblock %}
4+
<head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7+
<meta name="description" content="Roundup is a python-based, MIT licensed issue-tracking system with command-line, web and e-mail interfaces">
8+
<meta name="viewport" content="width=device-width">
9+
<title>{% block head_title %}{% endblock %}</title>
10+
<link rel="stylesheet" type="text/css" href="@@file/bootstrap.min.css">
11+
{% block extracss %} {% endblock %}
12+
</head>
13+
<body>
14+
{% block navbar %}
15+
{% include 'layout/banner.html' %}
16+
{% endblock %}
1917

20-
{% block page_content %}
21-
<div class='container-fluid'>
22-
<div class='row-fluid'>
23-
<div class='span3 navigation'>
24-
{% block leftnav %}
25-
{% include 'layout/navigation.html' %}
26-
{% endblock %}
27-
</div>
18+
{% block page_content %}
19+
<div class='container-fluid'>
20+
<div class='row'>
21+
<div class='col-2 navigation'>
22+
{% block leftnav %}
23+
{% include 'layout/navigation.html' %}
24+
{% endblock %}
25+
</div>
2826

29-
<div class='span9'>
30-
<div class='page-header'>
31-
<h1> {% block page_header %} {% endblock %} </h1>
32-
{% if options.error_message %}
33-
<p class='alert alert-block alert-error fade in'>
34-
{{ options.error_message }}
35-
<button type='button' class='close' data-dismiss='alert'>X</button>
36-
</p>
37-
{% endif %}
38-
{% if options.ok_message %}
39-
<p class='alert alert-block alert-success fade in'>
40-
{{ options.ok_message }}
41-
<button type='button' class='close' data-dismiss='alert'>X</button>
42-
</p>
43-
{% endif %}
44-
</div>
45-
{% block content %}
46-
{% endblock %}
47-
</div>
27+
<div class='col-10'>
28+
<div class='pb-2 mt-4 mb-2 border-bottom'>
29+
<h3> {% block page_header %} {% endblock %} </h3>
30+
{% if options.error_message %}
31+
<div class='alert alert-danger alert-dismissible fade show'>
32+
<ul class="mb-0">
33+
{% for message in options.error_message %}
34+
<li>{{ message }}</li>
35+
{% endfor %}
36+
</ul>
37+
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
38+
<span aria-hidden="true">&times;</span>
39+
</button>
40+
</div>
41+
{% endif %}
42+
{% if options.ok_message %}
43+
<div class='alert alert-success alert-dismissible fade show'>
44+
<ul class="mb-0">
45+
{% for message in options.ok_message %}
46+
<li>{{ message }}</li>
47+
{% endfor %}
48+
</ul>
49+
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
50+
<span aria-hidden="true">&times;</span>
51+
</button>
52+
</div>
53+
{% endif %}
54+
</div>
55+
{% block content %}
56+
{% endblock %}
57+
</div>
58+
</div>
4859
</div>
49-
</div>
50-
{% endblock %}
60+
{% endblock %}
5161

52-
{% block footer %}
53-
{% include 'layout/footer.html' %}
54-
{% endblock %}
62+
{% block footer %}
63+
{% include 'layout/footer.html' %}
64+
{% endblock %}
5565

56-
<script src='@@file/jquery-1.9.0.min.js'></script>
57-
<script src='@@file/bootstrap.min.js'></script>
58-
{% block extrajs %} {% endblock %}
59-
</body>
66+
<script src='@@file/jquery-1.9.0.min.js'></script>
67+
<script src='@@file/bootstrap.min.js'></script>
68+
{% block extrajs %} {% endblock %}
69+
</body>
6070
</html>

0 commit comments

Comments
 (0)