[Freeipa-devel] [PATCH] ui cleanup

Kevin McCarthy kmccarth at redhat.com
Wed Aug 29 23:45:18 UTC 2007


This is misc ui cleanup.  I'm trying a different format, and improving
some of the padding/layout.

-Kevin

-------------- next part --------------
# HG changeset patch
# User Kevin McCarthy <kmccarth at redhat.com>
# Date 1188431386 25200
# Node ID ee50bcec24a744a46da68170577dbc758fb24b44
# Parent  e8c34706c5c105d1d27f66c8d2c928dc49c15b7c
UI cleanup

diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/controllers.py
--- a/ipa-server/ipa-gui/ipagui/controllers.py	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/controllers.py	Wed Aug 29 16:49:46 2007 -0700
@@ -148,13 +148,13 @@ class Root(controllers.RootController):
                 counter = users[0]
                 users = users[1:]
                 if counter == -1:
-                    turbogears.flash("These results are truncated.\n" +
+                    turbogears.flash("These results are truncated.<br />" +
                                     "Please refine your search and try again.")
             except ipaerror.IPAError, e:
                 turbogears.flash("User list failed: " + str(e))
                 raise turbogears.redirect("/userlist")
 
-        return dict(users=users, fields=forms.user.UserFields())
+        return dict(users=users, uid=uid, fields=forms.user.UserFields())
 
 
     @expose("ipagui.templates.usershow")
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/static/css/style.css
--- a/ipa-server/ipa-gui/ipagui/static/css/style.css	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/static/css/style.css	Wed Aug 29 16:49:46 2007 -0700
@@ -33,7 +33,8 @@ body {
 #nav {
   background:#cc0000;
   color:#fff;
-  padding:5px;
+  min-height:3px;
+  max-height:3px;
 }
 
 #nav ul {
@@ -58,15 +59,14 @@ body {
   background:#fff;
   float:right;
   width:85%;
+  min-height:500px;
   border-left: 1px solid #000;
-  padding-left: 15px;
-  padding-bottom: 15px;
-/*  color: black;
-  font-size: 127%;
-  background-color: white;
-  margin: 0 auto 0 auto;
   padding: 10px;
-  float: left; */
+}
+
+#main_content h1,h2 {
+  margin-top: 0px;
+  margin-bottom: 5px;
 }
 
 
@@ -74,12 +74,8 @@ body {
   background:#ccc;  /* should be same as #page */
   float:left;
   width:10%;
-  /* border: 1px solid #aaa;
-  background-color: #eee;
-  margin: 0.5em;
-  padding: 1em;
-  float: left;
-  font-size: 88%; */
+  padding: 5px;
+  font-size: small;
 }
 
 #sidebar h2 {
@@ -91,17 +87,25 @@ body {
   padding-left: 0;
 }
 
+#sidebar a:visited,
+#sidebar a:link {
+  color:#000;
+}
+
 
 #footer {
   background:#fff;
   clear:both;
   border-top: 1px solid #000;
-  /* color: #999;
-  background-color: white;
-  padding: 10px;
-  font-size: 80%;
+  padding-top: 10px;
   text-align: center;
-  margin: 0 auto 1em auto; */
+  font-size: x-small;
+}
+
+#footer a:visited,
+#footer a:link {
+  color:#777;
+  text-decoration: none;
 }
 
 
@@ -129,26 +133,32 @@ body {
 #status_block {
   margin: 0 auto 0.5em auto;
   padding: 15px 10px 15px 55px;
-  background: #cec;
-  border: 1px solid #9c9;
+  background: #ecc;
+  border: 1px solid #c99;
   width: 450px;
   font-size: 120%;
   font-weight: bolder;
 }
 
-.notice {
-  margin: 0.5em auto 0.5em auto;
-  padding: 15px 10px 15px 55px;
-  width: 450px;
-  background: #eef URL('../images/info.png') left center no-repeat;
-  border: 1px solid #cce;
-}
-
 .fielderror {
-    color: red;
-    font-weight: bold;
+  color: red;
+  font-weight: bold;
 }
 
 .requiredfield {
-    background: #eebbbb;
+  background: #eebbbb;
 }
+
+#resultstable,
+#resultstable th,
+#resultstable td {
+  border-collapse: collapse;
+  border-style: solid;
+  border-width: 1px;
+  margin: 0px;
+  padding: 5px;
+}
+
+#resultstable th {
+  background: #eee;
+}
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/groupindex.kid
--- a/ipa-server/ipa-gui/ipagui/templates/groupindex.kid	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/groupindex.kid	Wed Aug 29 16:49:46 2007 -0700
@@ -7,12 +7,5 @@
 </head>
 <body>
        Groups go here.
-       <br />
-       <br />
-       <br />
-       <br />
-       <br />
-       <br />
-       <br />
 </body>
 </html>
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/grouplayout.kid
--- a/ipa-server/ipa-gui/ipagui/templates/grouplayout.kid	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/grouplayout.kid	Wed Aug 29 16:49:46 2007 -0700
@@ -6,17 +6,18 @@
 
 <body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
       <div id="main_content">
-        <div id="status_block" class="flash" py:if="value_of('tg_flash', None)" py:content="tg_flash"></div>
+        <div id="status_block" py:if="value_of('tg_flash', None)"
+            py:content="XML(tg_flash)"></div>
 
         <div py:replace="[item.text]+item[:]"></div>
       </div>
 
-      <div id="sidebar">
+<!--      <div id="sidebar">
           <h2>Tools</h2>
           <a href="${tg.url('/groupindex')}">Add Group</a><br/>
           <a href="${tg.url('/groupindex')}">Find Group</a><br/>
           <a href="${tg.url('/groupindex')}">List Groups</a><br/>
-      </div>
+      </div> -->
 </body>
 
 </html>
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/master.kid
--- a/ipa-server/ipa-gui/ipagui/templates/master.kid	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/master.kid	Wed Aug 29 16:49:46 2007 -0700
@@ -25,22 +25,33 @@
 
     <div id="page">
       <div id="header">
-        <h1>Free IPA</h1>
+        <a href="${tg.url('/')}"><img 
+          src="${tg.url('/static/images/logo.png')}"
+          border="0"
+          /></a>
       </div>
 
-      <div id="nav">
-        <ul>
-          <li><a href="${tg.url('/userindex')}">Users</a></li>
-          <li><a href="${tg.url('/groupindex')}">Groups</a></li>
-          <li><a href="${tg.url('/resindex')}">Resources</a></li>
-        </ul>
+      <div id="nav"><!-- 
+      This used to have links.  Keeping around in case we move them back...
+      --></div>
+
+      <div id="sidebar">
+        <h2>Tasks</h2>
+        <a href="${tg.url('/usernew')}">Add Person</a><br/>
+        <a href="${tg.url('/userlist')}">Find People</a><br/>
+        <br />
+        <a href="${tg.url('/groupindex')}">Add Group</a><br/>
+        <a href="${tg.url('/groupindex')}">Find Groups</a><br/>
+        <br />
+        <a href="${tg.url('/')}">Manage Policy</a><br/>
+        <a href="${tg.url('/')}">Self Service</a><br/>
       </div>
 
       <div py:replace="[item.text]+item[:]"></div>
 
 
       <div id="footer">
-        This is the footer
+        <a href="http://www.freeipa.com/">Powered by FreeIPA</a>
       </div>
     </div>
 
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/resindex.kid
--- a/ipa-server/ipa-gui/ipagui/templates/resindex.kid	Tue Aug 28 16:02:05 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
-    py:extends="'reslayout.kid'">
-<head>
-<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
-<title>Resource Listing</title>
-</head>
-<body>
-       Resources go here.
-       <br />
-       <br />
-       <br />
-       <br />
-       <br />
-       <br />
-       <br />
-</body>
-</html>
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/reslayout.kid
--- a/ipa-server/ipa-gui/ipagui/templates/reslayout.kid	Tue Aug 28 16:02:05 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
-    py:extends="'master.kid'">
-<head>
-</head>
-
-<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
-      <div id="main_content">
-        <div id="status_block" class="flash" py:if="value_of('tg_flash', None)" py:content="tg_flash"></div>
-
-        <div py:replace="[item.text]+item[:]"></div>
-      </div>
-
-      <div id="sidebar">
-          <h2>Tools</h2>
-          <a href="${tg.url('/resindex')}">Add Resource</a><br/>
-          <a href="${tg.url('/resindex')}">Find Resource</a><br/>
-          <a href="${tg.url('/resindex')}">List Resources</a><br/>
-      </div>
-</body>
-
-</html>
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/useredit.kid
--- a/ipa-server/ipa-gui/ipagui/templates/useredit.kid	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/useredit.kid	Wed Aug 29 16:49:46 2007 -0700
@@ -3,10 +3,10 @@
     py:extends="'userlayout.kid'">
 <head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
-<title>Edit a Person</title>
+<title>Edit Person</title>
 </head>
 <body>
-    <h2>Edit User</h2>
+    <h2>Edit Person</h2>
 
      ${form.display(action="userupdate", value=user)}
 </body>
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/userlayout.kid
--- a/ipa-server/ipa-gui/ipagui/templates/userlayout.kid	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/userlayout.kid	Wed Aug 29 16:49:46 2007 -0700
@@ -6,16 +6,17 @@
 
 <body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
       <div id="main_content">
-        <div id="status_block" class="flash" py:if="value_of('tg_flash', None)" py:content="tg_flash"></div>
+        <div id="status_block" py:if="value_of('tg_flash', None)"
+            py:content="XML(tg_flash)"></div>
 
         <div py:replace="[item.text]+item[:]"></div>
       </div>
 
-      <div id="sidebar">
+<!--      <div id="sidebar">
           <h2>Tools</h2>
           <a href="${tg.url('/usernew')}">Add Person</a><br/>
           <a href="${tg.url('/userlist')}">Find People</a><br/>
-      </div>
+      </div> -->
 </body>
 
 </html>
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/userlist.kid
--- a/ipa-server/ipa-gui/ipagui/templates/userlist.kid	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/userlist.kid	Wed Aug 29 16:49:46 2007 -0700
@@ -3,19 +3,23 @@
     py:extends="'userlayout.kid'">
 <head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
-<title>User Listing</title>
+<title>Find People</title>
 </head>
 <body>
+    <h2>Find People</h2>
     <div id="search">
         <form action="${tg.url('/userlist')}" method="post">
             Search:
-            <input type="text" name="uid" />
+            <input id="uid" type="text" name="uid" value="${uid}" />
             <input type="submit" />
         </form>
+        <script type="text/javascript">
+            document.getElementById("uid").focus();
+        </script>
     </div>
     <div py:if='users != None'>
         <h2>${len(users)} results returned:</h2>
-        <table py:if='len(users) > 0' border="1">
+        <table id="resultstable" py:if='len(users) > 0'>
             <tr>
                 <th>
                     <label class="fieldlabel" py:content="fields.uid.label" />
@@ -61,10 +65,5 @@
             No results found.
         </div>
     </div>
-
-    <!-- fix for visual artifact of my crappy ui -->
-    <div>
-        <br /><br /><br /><br />
-    </div>
 </body>
 </html>
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/usernew.kid
--- a/ipa-server/ipa-gui/ipagui/templates/usernew.kid	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/usernew.kid	Wed Aug 29 16:49:46 2007 -0700
@@ -3,10 +3,10 @@
     py:extends="'userlayout.kid'">
 <head>
     <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
-    <title>Add a Person</title>
+    <title>Add Person</title>
 </head>
 <body>
-    <h2>Add New User</h2>
+    <h2>Add Person</h2>
 
     ${form.display(action="usercreate")}
 </body>
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/usershow.kid
--- a/ipa-server/ipa-gui/ipagui/templates/usershow.kid	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/usershow.kid	Wed Aug 29 16:49:46 2007 -0700
@@ -3,10 +3,10 @@
     py:extends="'userlayout.kid'">
 <head>
     <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
-    <title>View a Person</title>
+    <title>View Person</title>
 </head>
 <body>
-    <h2>View User</h2>
+    <h2>View Person</h2>
 
     <div class="formsection">Account Details</div>
     <table class="formtable" cellpadding="2" cellspacing="0" border="0">
diff -r e8c34706c5c1 -r ee50bcec24a7 ipa-server/ipa-gui/ipagui/templates/welcome.kid
--- a/ipa-server/ipa-gui/ipagui/templates/welcome.kid	Tue Aug 28 16:02:05 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/welcome.kid	Wed Aug 29 16:49:46 2007 -0700
@@ -6,11 +6,9 @@
 <title>Welcome</title>
 </head>
 <body>
-    <div id="sidebar">
-        <h2>Tools</h2>
-    </div>
     <div id="main_content">
-        <div id="status_block" class="flash" py:if="value_of('tg_flash', None)" py:content="tg_flash"></div>
+        <div id="status_block" py:if="value_of('tg_flash', None)"
+            py:content="XML(tg_flash)"></div>
         <h1>Welcome to Free IPA</h1>
     </div>
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20070829/29cca54e/attachment.bin>


More information about the Freeipa-devel mailing list