changeset 6299:8a50208651c1

style: use Bootstrap compatible markup for alert Based on work by Dominik Ruf.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 08 Nov 2016 23:29:12 +0100
parents 0d4dfe2122fe
children 9bd331004a65
files kallithea/controllers/admin/settings.py kallithea/public/css/style.css kallithea/templates/admin/repos/repo_creating.html kallithea/templates/admin/settings/settings_system_update.html kallithea/templates/password_reset.html
diffstat 5 files changed, 40 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/admin/settings.py	Tue Nov 08 23:29:12 2016 +0100
+++ b/kallithea/controllers/admin/settings.py	Tue Nov 08 23:29:12 2016 +0100
@@ -431,7 +431,7 @@
         _update_url = defaults.get('update_url', '')
         _update_url = "" # FIXME: disabled
 
-        _err = lambda s: '<div style="color:#ff8888; padding:4px 0px">%s</div>' % (s)
+        _err = lambda s: '<div class="alert alert-danger">%s</div>' % (s)
         try:
             import kallithea
             ver = kallithea.__version__
--- a/kallithea/public/css/style.css	Tue Nov 08 23:29:12 2016 +0100
+++ b/kallithea/public/css/style.css	Tue Nov 08 23:29:12 2016 +0100
@@ -3153,6 +3153,37 @@
     font-weight: bold;
 }
 
+.alert {
+    padding: 15px;
+    margin: 20px 0;
+    border: 1px solid transparent;
+    border-radius: 4px;
+}
+
+.alert-success {
+    color: #3c763d;
+    background-color: #dff0d8;
+    border-color: #d6e9c6;
+}
+
+.alert-info {
+    color: #31708f;
+    background-color: #d9edf7;
+    border-color: #bce8f1;
+}
+
+.alert-warning {
+    color: #8a6d3b;
+    background-color: #fcf8e3;
+    border-color: #faebcc;
+}
+
+.alert-danger {
+    color: #a94442;
+    background-color: #f2dede;
+    border-color: #ebccd1;
+}
+
 ins, div.options a:hover {
     text-decoration: none;
 }
--- a/kallithea/templates/admin/repos/repo_creating.html	Tue Nov 08 23:29:12 2016 +0100
+++ b/kallithea/templates/admin/repos/repo_creating.html	Tue Nov 08 23:29:12 2016 +0100
@@ -35,7 +35,7 @@
             </div>
     </div>
     <div id="progress_error" style="display: none;">
-        <div style="font-weight: bold; color:#aa1111">
+        <div class="alert alert-danger">
                 ${_("We're sorry but error occurred during this operation. Please check your Kallithea server logs, or contact administrator.")}
         </div>
     </div>
--- a/kallithea/templates/admin/settings/settings_system_update.html	Tue Nov 08 23:29:12 2016 +0100
+++ b/kallithea/templates/admin/settings/settings_system_update.html	Tue Nov 08 23:29:12 2016 +0100
@@ -17,11 +17,13 @@
 </p>
 
 % if c.should_upgrade and c.important_notices:
-<div style="color: #5f5f5f; padding: 3px 0px 5px 0px;">Important notes for this release:</div>
+<div class="alert alert-warning">
+    Important notes for this release:
     <ul>
     % for notice in c.important_notices:
         <li>- ${notice}</li>
     % endfor
     </ul>
+</div>
 % endif
 </div>
--- a/kallithea/templates/password_reset.html	Tue Nov 08 23:29:12 2016 +0100
+++ b/kallithea/templates/password_reset.html	Tue Nov 08 23:29:12 2016 +0100
@@ -40,9 +40,12 @@
                 <div class="buttons">
                     <div class="nohighlight">
                       ${h.submit('send',_('Send Password Reset Email'),class_="btn btn-default")}
-                          <div class="activation_msg">${_('A password reset link will be sent to the specified email address if it is registered in the system.')}</div>
                     </div>
                 </div>
+
+                <div class="alert alert-info">
+                    ${_('A password reset link will be sent to the specified email address if it is registered in the system.')}
+                </div>
             </div>
         </div>
         ${h.end_form()}