launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06232
[Merge] lp:~huwshimi/maas/notifications into lp:maas
Huw Wilkins has proposed merging lp:~huwshimi/maas/notifications into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~huwshimi/maas/notifications/+merge/91388
This branch adds flash messages to the base template. It also adds styles for the messages for info, success, warning and error.
--
https://code.launchpad.net/~huwshimi/maas/notifications/+merge/91388
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~huwshimi/maas/notifications into lp:maas.
=== added file 'src/maasserver/static/css/components/flash_message.css'
--- src/maasserver/static/css/components/flash_message.css 1970-01-01 00:00:00 +0000
+++ src/maasserver/static/css/components/flash_message.css 2012-02-03 04:41:19 +0000
@@ -0,0 +1,25 @@
+#flash-message {
+ margin: 0;
+ padding: 0;
+ }
+#flash-message li {
+ list-style: none;
+ padding: 5px 20px;
+ border-radius: 6px;
+ box-shadow: 1px 1px 1px rgba(0,0,0,.2);
+ font-weight: bold;
+ color: #FFF;
+ margin: 5px 10px;
+ }
+#flash-message li.info {
+ background-color: #19B6EE;
+ }
+#flash-message li.success {
+ background-color: #38B44A;
+ }
+#flash-message li.warning {
+ background-color: #ECA918;
+ }
+#flash-message li.error {
+ background-color: #DF382C;
+ }
=== modified file 'src/maasserver/static/css/import.css'
--- src/maasserver/static/css/import.css 2012-01-24 06:28:39 +0000
+++ src/maasserver/static/css/import.css 2012-02-03 04:41:19 +0000
@@ -3,3 +3,5 @@
@import url("forms.css");
@import url("layout.css");
@import url("modifiers.css");
+/* components */
+@import url("components/flash_message.css");
=== modified file 'src/maasserver/static/css/typography.css'
--- src/maasserver/static/css/typography.css 2012-01-24 06:28:39 +0000
+++ src/maasserver/static/css/typography.css 2012-02-03 04:41:19 +0000
@@ -29,9 +29,6 @@
width: auto;
margin-bottom: 0.8em;
}
-p, li, dt, dd, blockquote {
- max-width: 45em;
- }
pre, code, samp, tt, .console {
font-family: 'Ubuntu Mono', monospace;
margin-bottom: 0.8em;
=== modified file 'src/maasserver/templates/maasserver/base.html'
--- src/maasserver/templates/maasserver/base.html 2012-02-01 16:57:23 +0000
+++ src/maasserver/templates/maasserver/base.html 2012-02-03 04:41:19 +0000
@@ -31,6 +31,13 @@
<div class="clear"></div>
{% endblock %}
</div>
+ {% if messages %}
+ <ul id="flash-message">
+ {% for message in messages %}
+ <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
<div id="content">{% block content %}{% endblock %}</div>
</div>
</div>
=== modified file 'src/maasserver/templates/registration/login.html'
--- src/maasserver/templates/registration/login.html 2012-01-27 09:02:45 +0000
+++ src/maasserver/templates/registration/login.html 2012-02-03 04:41:19 +0000
@@ -10,12 +10,6 @@
{% block content %}
<div id="login-logout">
-{% if messages %}
- {% for message in messages %}
- <div>{{ message }}</div>
- {% endfor %}
-{% endif %}
-
<h2>Login</h2>
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>