settings: new and improved server announcements fix #676 #1342 #4121

This commit is contained in:
lisaq 2016-09-26 13:00:30 +02:00
parent 62f27a2f43
commit a033414e65
2 changed files with 24 additions and 3 deletions

View file

@ -439,6 +439,23 @@ ul.auth_plugins {
//--- MODULES ------------------//
// Server Announcement
#server-announcement {
width: 95%;
margin: @padding auto;
padding: @padding;
border-width: 2px;
border-style: solid;
.border-radius(2px);
font-family: @text-bold;
&.info { border-color: @alert4; background-color: @alert4-inner; }
&.warning { border-color: @alert3; background-color: @alert3-inner; }
&.error { border-color: @alert2; background-color: @alert2-inner; }
&.success { border-color: @alert1; background-color: @alert1-inner; }
&.neutral { border-color: @grey3; background-color: @grey6; }
}
// Fixed Sidebar Column
.sidebar-col-wrapper {
padding-left: @sidebar-all-width;

View file

@ -183,11 +183,15 @@ ${h.end_form()}
// important messages to all users of the RhodeCode Enterprise system.
$(document).ready(function(e){
// put your message below
// EDIT - put your message below
var message = "TYPE YOUR MESSAGE HERE";
$('#body').prepend(
('<div class="alert alert-info">_MSG_'+'</div>').replace('_MSG_', message)
// EDIT - choose "info"/"warning"/"error"/"success"/"neutral" as appropriate
var alert_level = "info";
$("#body").prepend(
("<div id='server-announcement' class='"+alert_level+"'>_MSG_"+"</div>").replace("_MSG_", message)
)
})
</script>