[Checkins] SVN: Sandbox/ulif/grok-adminui/src/grok/admin/ Added admin-messages!

Christian Theune ct at gocept.com
Thu Jul 12 12:24:26 EDT 2007


Log message for revision 77774:
  Added admin-messages!
  

Changed:
  U   Sandbox/ulif/grok-adminui/src/grok/admin/static/grok.css
  U   Sandbox/ulif/grok-adminui/src/grok/admin/view.py
  U   Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/macros.pt
  U   Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/server.pt

-=-
Modified: Sandbox/ulif/grok-adminui/src/grok/admin/static/grok.css
===================================================================
--- Sandbox/ulif/grok-adminui/src/grok/admin/static/grok.css	2007-07-12 16:23:16 UTC (rev 77773)
+++ Sandbox/ulif/grok-adminui/src/grok/admin/static/grok.css	2007-07-12 16:24:25 UTC (rev 77774)
@@ -1,486 +1,501 @@
 /* @override http://www.urbantalk.se/DEVELOPER/grok_2/grok.css */
 
-body { 
-        bac/kground: #ffe;
-        background: #eee;
-        background: #fff;
-        ba/ckground: #bbb;
-        margin: 0px;
-        padding-top: -10px;
-	font-size: 13px;
-	font-family: verdana;
-	line-height: 20px;
-	color: #555555;
+body {
+    bac/kground: #ffe;
+    background: #eee;
+    background: #fff;
+    ba/ckground: #bbb;
+    margin: 0px;
+    padding-top: -10px;
+    font-size: 13px;
+    font-family: verdana;
+    line-height: 20px;
+    color: #555555;
 
 }
 
 h1 {
-	font-size: 15px;
-	font-family: verdana;
-	line-height: 20px;
-        text-align: left;
-	color: #CC9900;
-	width: 100%;
-	margin: 23px auto 8px auto;
-	border-bottom: 1px solid #CC9900;
+    font-size: 15px;
+    font-family: verdana;
+    line-height: 20px;
+    text-align: left;
+    color: #CC9900;
+    width: 100%;
+    margin: 23px auto 8px auto;
+    border-bottom: 1px solid #CC9900;
 }
 h2 {
-	font-size: 13px;
-	font-family: verdana;
-	line-height: 20px;
-	color: #CC9900;
-	width: 100%;
-	margin: 16px auto 8px auto;
-	border-bottom: 1px dotted #cccccc;
+    font-size: 13px;
+    font-family: verdana;
+    line-height: 20px;
+    color: #CC9900;
+    width: 100%;
+    margin: 16px auto 8px auto;
+    border-bottom: 1px dotted #cccccc;
 }
 h3 {
-	font-size: 12px;
-	font-family: verdana;
-	line-height: 12px;
-	color: #555555;
-	width: 100%;
-	margin: 16px auto -4px auto;
+    font-size: 12px;
+    font-family: verdana;
+    line-height: 12px;
+    color: #555555;
+    width: 100%;
+    margin: 16px auto -4px auto;
 }
 p {
-	font-size: 13px;
-	font-family: verdana;
-	line-height: 20px;
-	color: #555555;
-	wi/dth: 540px;
-	margin: 8px auto;
+    font-size: 13px;
+    font-family: verdana;
+    line-height: 20px;
+    color: #555555;
+    wi/dth: 540px;
+    margin: 8px auto;
 }
 p.download {
-	font-size: 10px;
-	font-weight: normal;
-	font-family: verdana;
-	line-height: 18px;
-	color: #555555;
-	margin: 4px 12px;
-	width: 176px;
-	
+    font-size: 10px;
+    font-weight: normal;
+    font-family: verdana;
+    line-height: 18px;
+    color: #555555;
+    margin: 4px 12px;
+    width: 176px;
+
 }
 #menu {
-	font-size: 11px;
-	font-family: verdana;
-	line-height: 20px;
-	color: #A90101;
+    font-size: 11px;
+    font-family: verdana;
+    line-height: 20px;
+    color: #A90101;
 }
 pre {
-	font-size: 11px;
-	font-family: courier;
-	line-height: 18px;
-	color: #A90101;
-	wi/dth: 540px;
-	margin: 8px auto;
-	padding: 16px 8px;
-	border-top: 1px solid #cccccc;
-	border-bottom: 1px solid #dddddd;
-	background: #eeeeee;
+    font-size: 11px;
+    font-family: courier;
+    line-height: 18px;
+    color: #A90101;
+    wi/dth: 540px;
+    margin: 8px auto;
+    padding: 16px 8px;
+    border-top: 1px solid #cccccc;
+    border-bottom: 1px solid #dddddd;
+    background: #eeeeee;
 }
 ul {
-	font-size: 11px;
-	font-family: verdana;
-	line-height: 20px;
-	color: #555555;
-	wi/dth: 540px;
-	margin: 16px auto;
-	list-style-type: none;
+    font-size: 11px;
+    font-family: verdana;
+    line-height: 20px;
+    color: #555555;
+    wi/dth: 540px;
+    margin: 16px auto;
+    list-style-type: none;
 }
 li {
-	margin: 0 50px 0 0;
-	left: 0;
-	padding: 0;
+    margin: 0 50px 0 0;
+    left: 0;
+    padding: 0;
 }
 
 legend {
-	font-size: 12px;
-	font-family: verdana;
-        font-weight: bold;
-	line-height: 12px;
-	color: #555555;
-	color: #CC9900;
-        background: url("Highlight_Bkgrnd.jpg");
-	wi/dth: 100%;
-	margin: 16px auto -4px auto;
-        padding: 3px;
-        padding-bottom: 10px;
+    font-size: 12px;
+    font-family: verdana;
+    font-weight: bold;
+    line-height: 12px;
+    color: #555555;
+    color: #CC9900;
+    background: url("Highlight_Bkgrnd.jpg");
+    wi/dth: 100%;
+    margin: 16px auto -4px auto;
+    padding: 3px;
+    padding-bottom: 10px;
 }
 
 fieldset { 
-        margin-top: 8px;
-        background: url("Highlight_Bkgrnd.jpg");
-        border: 1px solid #c90;
-        wi/dth: 550px;
+    margin-top: 8px;
+    background: url("Highlight_Bkgrnd.jpg");
+    border: 1px solid #c90;
+    wi/dth: 550px;
 }
 
 a > img { 
-        border: 0px;
+    border: 0px;
 }
 
 
 a:link {
-	color: #555555;
-	text-decoration: none;
-	border-bottom-style: dotted;
-	border-bottom-width: 1px;
+    color: #555555;
+    text-decoration: none;
+    border-bottom-style: dotted;
+    border-bottom-width: 1px;
 }
 
 
 a:hover {
-	color: #CC9900;
-	border-bottom-style: dotted;
-	background-color: #ffffff;
-	border-width: 1px;
+    color: #CC9900;
+    border-bottom-style: dotted;
+    background-color: #ffffff;
+    border-width: 1px;
 }
 
 a:visited {
-	color: #555555;
-	text-decoration: none;
-	border-bottom-style: dotted;
-	border-bottom-width: 1px;
+    color: #555555;
+    text-decoration: none;
+    border-bottom-style: dotted;
+    border-bottom-width: 1px;
 }
 
 a:hover>img { 
-        background-color: #CC9900;
-        border: 0px;
-        border-bottom: 0px;
+    background-color: #CC9900;
+    border: 0px;
+    border-bottom: 0px;
 }
 
 #logo { 
-        background-color: none;
-        border: 0px;
-        border-bottom: 0px;
+    background-color: none;
+    border: 0px;
+    border-bottom: 0px;
 }
 
 div#tag_cloud {
-	margin:  16px 0px;
+    margin:  16px 0px;
 }
 
 .tag_cloud>p {
-	font-family: verdana;
-	font-size: 13px;
-	line-height: 22px;
-	color: #555555;
-	width: 100%;
-	margin: 0 8px 8px 8px;
+    font-family: verdana;
+    font-size: 13px;
+    line-height: 22px;
+    color: #555555;
+    width: 100%;
+    margin: 0 8px 8px 8px;
 }
 
 .tag_cloud>a:link {
-	color: #F7DA4A;
+    color: #F7DA4A;
 }
 
 .tag_cloud>h3 {
-	font-family: verdana;
-	font-size: 10px;
-	font-weight: normal;
-	line-height: 20px;
-	color: #cccccc;
-	width: 100%;
-	margin: 0 8px -4px 8px;
+    font-family: verdana;
+    font-size: 10px;
+    font-weight: normal;
+    line-height: 20px;
+    color: #cccccc;
+    width: 100%;
+    margin: 0 8px -4px 8px;
 }
 
 div.track {
-	margin:  0;
-	padding:  0;
-	w/idth:  257px;
-	
+    margin:  0;
+    padding:  0;
+    w/idth:  257px;
+
 }
 
 .track>h2 {
-	padding: 0 8px;
-	font-size: 13px;
-	font-family: verdana;
-	line-height: 0px;
-	wi/dth: 253px;
-	border: none;
+    padding: 0 8px;
+    font-size: 13px;
+    font-family: verdana;
+    line-height: 0px;
+    wi/dth: 253px;
+    border: none;
 }
 .track>a>p {
-	font-size: 13px;
-	font-family: verdana;
-	line-height: 20px;
-	color: #777777;
-	wi/dth: 249px;
-	margin: 0 2px;
-	padding: 3px 5px;
+    font-size: 13px;
+    font-family: verdana;
+    line-height: 20px;
+    color: #777777;
+    wi/dth: 249px;
+    margin: 0 2px;
+    padding: 3px 5px;
 }
 div.track>a>p:hover {
-	background-color: #ffffff;
-	color: #cc9900;
+    background-color: #ffffff;
+    color: #cc9900;
 }
 .track>p>a {
-	color:  #555555;
+    color:  #555555;
 }
 .track>p>a:link {
-	border-style: none;
+    border-style: none;
 }
 .track>p>a:hover {
-	background-color: #dddddd;
-	border-style: none;
+    background-color: #dddddd;
+    border-style: none;
 }
 
 .menu_img {
-	margin: 0;
-	border-width: 0;
+    margin: 0;
+    border-width: 0;
 }
 .menu_link {
-	margin: 0;
-	border-width: 0;
-	border-style: none;
+    margin: 0;
+    border-width: 0;
+    border-style: none;
 }
 .menu_link:hover {
-	margin: 0;
-	border-width: 0;
-	border-style: none;
+    margin: 0;
+    border-width: 0;
+    border-style: none;
 }
 
 div#version_info {
-	margin:  32px 0px;
+    margin:  32px 0px;
 }
 
 .version_info>p {
-	font-family: verdana;
-	font-size: 13px;
-	line-height: 22px;
-	color: #CC9900;
-	width: 100%;
-	margin: 0 8px 8px 8px;
+    font-family: verdana;
+    font-size: 13px;
+    line-height: 22px;
+    color: #CC9900;
+    width: 100%;
+    margin: 0 8px 8px 8px;
 }
 
 .version_info>h3 {
-	font-family: verdana;
-	font-size: 10px;
-	font-weight: normal;
-	line-height: 20px;
-	color: #cccccc;
-	width: 100%;
-	margin: 0 8px;
+    font-family: verdana;
+    font-size: 10px;
+    font-weight: normal;
+    line-height: 20px;
+    color: #cccccc;
+    width: 100%;
+    margin: 0 8px;
 }
 div.feature {
-	w/idth: 538px;  
-	min-height: 64px;
-	bac/kground: url('Highlight_Bkgrnd.jpg'); 
-	border-left: 1px solid #F7DA4A; 
-	border-left: 1px solid #ddd; 
-	bord/er-right: 1px solid #F7DA4A
-	border-right: 5px solid #ddd; 
+    w/idth: 538px;  
+    min-height: 64px;
+    bac/kground: url('Highlight_Bkgrnd.jpg'); 
+    border-left: 1px solid #F7DA4A; 
+    border-left: 1px solid #ddd; 
+    bord/er-right: 1px solid #F7DA4A
+    border-right: 5px solid #ddd; 
 }
 
 div.feature > p {
-	wi/dth: 522px;
-	min-height: 64px;
-	padding: 8px 8px 0 8px;
-	color: #888888;
-	margin: 0;
+    wi/dth: 522px;
+    min-height: 64px;
+    padding: 8px 8px 0 8px;
+    color: #888888;
+    margin: 0;
 }
 
 div.feature > p:hover {
-	bac/kground-color: #ffffff;
-	background: url('Highlight_Bkgrnd.jpg'); 
-	color: #cc9900;
+    bac/kground-color: #ffffff;
+    background: url('Highlight_Bkgrnd.jpg'); 
+    color: #cc9900;
 }
 
 div.feature_top {
-	width: 540px;
-	height: 7px; 
-	background: url('Highlight_T.jpg') repeat-x
+    width: 540px;
+    height: 7px; 
+    background: url('Highlight_T.jpg') repeat-x
 }
 div.feature_bottom {
-	width: 540px;
-	height: 7px; 
-	background: url('Highlight_B.jpg') repeat-x
+    width: 540px;
+    height: 7px; 
+    background: url('Highlight_B.jpg') repeat-x
 }
 
 img.track_button {
-	float: left;
-	border-width: 0;
-	margin-left: 6px;
-	margin-right: 16px;
+    float: left;
+    border-width: 0;
+    margin-left: 6px;
+    margin-right: 16px;
 }
 
 div#sidebar > h1 {
-	padding: 5px auto 0 auto;
-	text-align: center;
-	color: #777;
-	font-family: verdana;
-	font-size: 12px; 
-	font-weight: bold;
-	width: 264px; height: 27px; 
-	background: url("Sidebar_Top.jpg") no-repeat;
-	border: none;
-	margin:  0;
+    padding: 5px auto 0 auto;
+    text-align: center;
+    color: #777;
+    font-family: verdana;
+    font-size: 12px; 
+    font-weight: bold;
+    width: 264px; height: 27px; 
+    background: url("Sidebar_Top.jpg") no-repeat;
+    border: none;
+    margin:  0;
 }
 
 img.sidebar_divider {
-	padding: 0 0 3px 0;
+    padding: 0 0 3px 0;
 }
 
 img.people {
-	float: left;
-	border: 0px solid #F7DA4A;	
+    float: left;
+    border: 0px solid #F7DA4A;	
 }
 
 div#Breadcrumbs { 
-        padding-left: 5px;
-	font-size: 15px;
-	font-family: verdana;
-	co/lor: #CC9900;
-        f/ont-style: verdana;
-        to/p: 59px;
-        ba/ckground: url("Highlight_Bkgrnd.jpg");
-        background: url("banner-shadow.jpg");
-        ba/ckground: url("GROK_Ornament_small.jpg");
-        ba/ckground: url("GROK_Ornament.jpg");
-        bor/der-top: 1px solid #CC9900;
-        height: 36px;
+    padding-left: 5px;
+    font-size: 15px;
+    font-family: verdana;
+    co/lor: #CC9900;
+    f/ont-style: verdana;
+    to/p: 59px;
+    ba/ckground: url("Highlight_Bkgrnd.jpg");
+    background: url("banner-shadow.jpg");
+    ba/ckground: url("GROK_Ornament_small.jpg");
+    ba/ckground: url("GROK_Ornament.jpg");
+    bor/der-top: 1px solid #CC9900;
+    height: 36px;
 }
 
 div#Banner-Shadow { 
-        margin-left: 13px;
+    margin-left: 13px;
 }
 
 div#Content {
-        text-align: left;
-        po/sition: absolute;
-        le/ft: 290px;
-        t/op: 91px;
-        m/in-width: 400px;
-        m/ax-width: 540px;
-              max-width: 80%;
-        marg/in-left: 30%;
-        marg/in-right: 30%;
-        min-width: 50%;
-        max-width: 90%;
+    text-align: left;
+    po/sition: absolute;
+    le/ft: 290px;
+    t/op: 91px;
+    m/in-width: 400px;
+    m/ax-width: 540px;
+    max-width: 80%;
+    marg/in-left: 30%;
+    marg/in-right: 30%;
+    min-width: 50%;
+    max-width: 90%;
 }
 
 div#Fireplace { 
-        position: absolute; 
-        right: 0px; 
-        top: 5px; 
-        width: 160px; 
-        height: 75px;
+    position: absolute; 
+    right: 0px; 
+    top: 5px; 
+    width: 160px; 
+    height: 75px;
 }
 div#Banner {
-        height: 40px;
-        background: #eeeeee url("GROK_Ornament2.jpg") repeat-x;
-        background: #eeeeee url("GROK_Ornament3.jpg") repeat-x;
+    height: 40px;
+    background: #eeeeee url("GROK_Ornament2.jpg") repeat-x;
+    background: #eeeeee url("GROK_Ornament3.jpg") repeat-x;
 }
 
 #Footer-marker { 
-       text-align: center;
-       font-size: 10px;
-       color: #CC9900;
-       margin-top: 20px
+    text-align: center;
+    font-size: 10px;
+    color: #CC9900;
+    margin-top: 20px
 }
 #Footer-copyright {
-       text-align: center; 
-       font-size: 9px
+    text-align: center; 
+    font-size: 9px
 }
 #Sidebar { 
-       position: absolute;
-       left: 10px;
-       top: 112px;
-       width: 264px;
-       background: #dddddd url("Sidebar_Middle.jpg") repeat-y;
+    position: absolute;
+    left: 10px;
+    top: 112px;
+    width: 264px;
+    background: #dddddd url("Sidebar_Middle.jpg") repeat-y;
 }
 #SearchBox { 
-       padding: 5px 8px;
+    padding: 5px 8px;
 }
 
 input,select { 
-       border: 1px solid #CC9900;
-       padding-left: 2px;
+    border: 1px solid #CC9900;
+    padding-left: 2px;
 }
 
 .button { 
-       background-color: #ccc;
-       font-size: 12px;
-       padding: 0px;
-       border: groove #CC9900 2px;
+    background-color: #ccc;
+    font-size: 12px;
+    padding: 0px;
+    border: groove #CC9900 2px;
 }
 
 a.button { 
-       color: #000;
-       padding: 2px;
-       padding-top: 0px;
-       border-bottom: groove #CC9900 2px;
+    color: #000;
+    padding: 2px;
+    padding-top: 0px;
+    border-bottom: groove #CC9900 2px;
 }
 
 a:hover.button { 
-       background-color: #ccc;
-       color: #000;
-       padding: 2px;
-       padding-top: 0px;
-       border: groove #CC9900 2px;
-       border-bottom: groove #CC9900 2px;
+    background-color: #ccc;
+    color: #000;
+    padding: 2px;
+    padding-top: 0px;
+    border: groove #CC9900 2px;
+    border-bottom: groove #CC9900 2px;
 }
 
 .checkbox { 
-       border: groove #CC9900 2px;
+    border: groove #CC9900 2px;
 }
 .huge { 
-       text-align: center;
-       font-size: 16px;
+    text-align: center;
+    font-size: 16px;
 }
 .emph { 
-       font-weight: bold;
+    font-weight: bold;
 }
 .rightalign { 
-       text-align: right;
+    text-align: right;
 }
 
 /* menu related... */
 .menu-box1 { 
-       padding: 5px;
+    padding: 5px;
 }
 .menu-box2 { 
-       background-color: #F7DA4A;
-       background-color: #F8EAB0;
-       background-color: #fff4be;
-       padding: 5px;
-       border: 2px groove #fff4be;
-       border: 1px solid #fc9;
+    background-color: #F7DA4A;
+    background-color: #F8EAB0;
+    background-color: #fff4be;
+    padding: 5px;
+    border: 2px groove #fff4be;
+    border: 1px solid #fc9;
 }
 .menu-head1 { 
-       font-weight: bold;
+    font-weight: bold;
 }
 .menu-description1 { 
-       margin-left: 15px;
+    margin-left: 15px;
 }
 /* docgrok related... */
 
 .docgrok-entry { 
-       margin-bottom: 5px;
+    margin-bottom: 5px;
 }
 .docgrok-description1 { 
-       font-weight: bold;
+    font-weight: bold;
 }
 .docgrok-pathvalue { 
-       font-family: courier;
+    font-family: courier;
 }
 .docgrok-annotation1 { 
-       margin-left: 2ex;
+    margin-left: 2ex;
 }
 .docgrok-annotation2 { 
-       margin-left: 5ex;
+    margin-left: 5ex;
 }
 .docgrok-pycode1 { 
-       font-family: courier;
-       color: #00f;
+    font-family: courier;
+    color: #00f;
 }
 .docgrok-sourcetext { 
-       border: 2px groove #eee;
-       bo/rder-top: none;
-       padding: 15px;
-       background-color: #f8f8f8;
-       margin: 10px;
+    border: 2px groove #eee;
+    bo/rder-top: none;
+    padding: 15px;
+    background-color: #f8f8f8;
+    margin: 10px;
 }
 .docgrok-sourceheader { 
-       bo/rder: 2px groove #eee;
-       bo/rder-bottom: none;
-       background-color: #fff;
-       pa/dding: 5px;
-       pa/dding-top: 0px;
+    bo/rder: 2px groove #eee;
+    bo/rder-bottom: none;
+    background-color: #fff;
+    pa/dding: 5px;
+    pa/dding-top: 0px;
 }
 .docgrok-elemname1 { /* Element names in headings */
-       color: #555555;
-}
\ No newline at end of file
+    color: #555555;
+}
+
+
+/* Message support */
+#messages li {
+    border: 1px solid #CC9900;
+    padding:0.25em 0.5em ;
+    background-color: #FCEFB8;
+    margin-bottom:0.5em;
+    margin-top:0.5em;
+}
+
+#messages li.admin {
+    border-color:#999;
+    background-color:#EEE;
+}

Modified: Sandbox/ulif/grok-adminui/src/grok/admin/view.py
===================================================================
--- Sandbox/ulif/grok-adminui/src/grok/admin/view.py	2007-07-12 16:23:16 UTC (rev 77773)
+++ Sandbox/ulif/grok-adminui/src/grok/admin/view.py	2007-07-12 16:24:25 UTC (rev 77774)
@@ -24,6 +24,9 @@
 
 from zope.proxy import removeAllProxies
 
+import z3c.flashmessage.interfaces
+
+
 grok.context(IRootFolder)
 grok.define_permission('grok.ManageApplications')
 
@@ -125,34 +128,79 @@
         self.installed_applications = inst_apps
 
 
+class AdminMessageSource(grok.GlobalUtility):
+
+    grok.name('admin')
+    zope.interface.implements(z3c.flashmessage.interfaces.IMessageSource)
+
+    message = None
+
+    def send(self, message, type='admin'):
+        self.message = z3c.flashmessage.message.PersistentMessage(message,
+                                                                  type)
+
+    def list(self, type=None):
+        if self.message is None:
+            return
+        if type is None or self.message.type == type:
+            yield self.message
+
+    def delete(self, message):
+        if message is self.message:
+            self.message = None
+        else:
+            raise KeyError(message)
+
+
 class Server(GAIAView):
     """Zope3 management screen."""
 
     grok.require('grok.ManageApplications')
 
-    riv = RuntimeInfoView()
-
-    def serverControl(self):
+    @property
+    def server_control(self):
         return zapi.getUtility(IServerControl)
 
-    def runtimeInfo(self):
-        self.riv.context = applicationController
-        return self.riv.runtimeInfo()
+    @property
+    def runtime_info(self):
+        riv = RuntimeInfoView()
+        riv.context = applicationController
+        return riv.runtimeInfo()
 
-    def update(self, time=None, restart=None, shutdown=None):
-        self.ri = self.runtimeInfo()
+    @property
+    def current_message(self):
+        source = zope.component.getUtility(
+          z3c.flashmessage.interfaces.IMessageSource, name='admin')
+        messages = list(source.list())
+        if messages:
+            return messages[0]
 
-        if time is None:
+    def update(self, time=None, restart=None, shutdown=None,
+              admin_message=None, submitted=False):
+        if not submitted:
             return
-        try:
-            time = int(time)
-        except:
-            return
-        control = self.serverControl()
+        # Admin message control
+        source = zope.component.getUtility(
+          z3c.flashmessage.interfaces.IMessageSource, name='admin')
+        if admin_message is not None:
+            source.send(admin_message)
+        elif source.current_message:
+            source.delete(source.current_message)
+
+        # Restart control
+        if time is not None:
+            try:
+                time = int(time)
+            except:
+                time = 0
+        else:
+            time = 0
+
         if restart is not None:
-            control.restart(time)
+            self.server_control.restart(time)
         elif shutdown is not None:
-            control.shutdown(time)
+            self.server_control.shutdown(time)
+
         self.redirect(self.url())
 
 

Modified: Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/macros.pt
===================================================================
--- Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/macros.pt	2007-07-12 16:23:16 UTC (rev 77773)
+++ Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/macros.pt	2007-07-12 16:24:25 UTC (rev 77774)
@@ -67,7 +67,7 @@
       <center>
         <div id="Content">
 
-          <div tal:content="structure context/@@messages" />
+          <div id="messages" tal:content="structure context/@@messages" />
 
           <div metal:define-slot="content">
 

Modified: Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/server.pt
===================================================================
--- Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/server.pt	2007-07-12 16:23:16 UTC (rev 77773)
+++ Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/server.pt	2007-07-12 16:24:25 UTC (rev 77774)
@@ -1,52 +1,69 @@
 <html metal:use-macro="context/@@macros/gaia-page">
   <div metal:fill-slot="content">
-    <h1>Manage your Zope 3 instance:</h1>
+    <h1>Manage your Zope 3 instance</h1>
 
     <form method="POST" action=""
       tal:attributes="action string:${context/@@absolute_url}/server">
       <fieldset>
-        <legend>Manage Server Process</legend>
+        <legend>Manage server process</legend>
         <input type="submit" name="restart" class="button" value="Restart Zope 3" />
         <input type="submit" name="shutdown" class="button" value="Stop Zope 3" />
         after <input type="text" name="time" value="0" size="4" /> seconds
       </fieldset>
 
-      <fieldset tal:define="ri view/ri">
-        <legend>Server Process Info</legend>
+      <fieldset>
+        <legend>Admin message</legend>
+
+        <p>Let's you display an administrative message on all pages.</p>
+
+        <input
+          type="text"
+          name="admin_message"
+          tal:attributes="value view/current_message/message|nothing"
+          />
+
+        <input type="hidden" name="submitted" value="true"/>
+
+        <input type="submit" name="save_message" value="Save"/>
+
+      </fieldset>
+
+      <fieldset tal:define="ri view/runtime_info">
+        <legend>Server process info</legend>
         <div>
           <span class="emph">Uptime:</span>
           <span tal:content="ri/Uptime">unknown</span> 
         </div>
         <div>
-          <span class="emph">System Platform:</span>
+          <span class="emph">System platform:</span>
           <span tal:content="ri/SystemPlatform">unknown</span> 
         </div>
         <div>
-          <span class="emph">Zope Version:</span>
+          <span class="emph">Zope version:</span>
           <span tal:content="ri/ZopeVersion">unknown</span> 
         </div>
         <div>
-          <span class="emph">Python Version:</span>
+          <span class="emph">Python version:</span>
           <span tal:content="ri/PythonVersion">unknown</span> 
         </div>
         <div>
-          <span class="emph">Command Line:</span>
+          <span class="emph">Command line:</span>
           <span tal:content="ri/CommandLine">unknown</span> 
         </div>
         <div>
-          <span class="emph">Preferred Encoding:</span>
+          <span class="emph">Preferred encoding:</span>
           <span tal:content="ri/PreferredEncoding">unknown</span> 
         </div>
         <div>
-          <span class="emph">File System Encoding:</span>
+          <span class="emph">File system encoding:</span>
           <span tal:content="ri/FileSystemEncoding">unknown</span> 
         </div>
         <div>
-          <span class="emph">Process Id:</span>
+          <span class="emph">Process ID:</span>
           <span tal:content="ri/ProcessId">unknown</span> 
         </div>
         <div>
-          <span class="emph">Python Path:</span>
+          <span class="emph">Python path:</span>
           <div tal:repeat="path ri/PythonPath">
             <span tal:content="path">unknown</span> 
           </div>



More information about the Checkins mailing list