[Zope3-checkins] CVS: Zope3/src/zope/app/browser/skins/zopetop - view_macros.pt:1.2 widget_macros.pt:1.2 zopetop.css:1.2

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Aug 15 21:45:13 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/skins/zopetop
In directory cvs.zope.org:/tmp/cvs-serv20171/app/browser/skins/zopetop

Modified Files:
	view_macros.pt widget_macros.pt zopetop.css 
Log Message:
Merging dreamcatcher's TTW Schema branch:

1. Fixed Bug in adding that would cause infinite loops when the menu items
   action was not a valif view or factory id.

2. Extended adding to support more complex views. Until now we only 
   supported constructions like "+/AddView=id". Now you are able to say
   "+/AddView/More=id", which means that more information can be carried 
   in the URL. This can be used in many ways, including multi-page adding
   wizards. In my case I needed it to pass in the type of the TTW Schema-
   based Content Component.

3. Added Local Menus. This was a pain in the butt, but I think I got a 
   fairly nice model, where you can create local Menu Services, and Menus
   are simply named utilities. When active they are menus in the menu 
   service. This is very similar to the local interface service and TTW 
   Schema. 

4. Made some modifications to TTW Schema, cleaned up the code and moved
   the browser code and interfaces to the places they belong.

5. Added a Content Component Definition utility component, which takes a
   Schema and creates a content component for it, including permission
   settings and a menu entry. Currently the menu entry is always made to
   a local 'add_content' menu. I will change this and make it actually a
   screen, where the menu and title of the menu item can be chosen by the
   developer. Mmmh, should I add a factory for the definition as well, so
   that the content component is also available via python?

6. Added a Content Component Instance component that represents an 
   instance od a Content Component Definition. You will never directly 
   encounter this component, since it is automatically used by the adding
   code of the Content Component Definition.

7. Cleanups by both dreamcatcher and myself.

That's it. For more details see the branch checkin messages. I now consider
the dreamcatcher-ttwschema-branch closed.


=== Zope3/src/zope/app/browser/skins/zopetop/view_macros.pt 1.1 => 1.2 ===
--- Zope3/src/zope/app/browser/skins/zopetop/view_macros.pt:1.1	Thu Aug  7 13:31:31 2003
+++ Zope3/src/zope/app/browser/skins/zopetop/view_macros.pt	Fri Aug 15 20:43:07 2003
@@ -44,19 +44,21 @@
      <td class="left">
             <span metal:use-macro="views/standard_macros/navigation_box" />
             <span metal:use-macro="views/standard_macros/commontasks_box" />
+	    <!--
+            <span metal:use-macro="views/standard_macros/metadata_box" />
+            <span metal:use-macro="views/standard_macros/views_box" />
+            <span metal:use-macro="views/standard_macros/actions_box" />
+            -->
      </td>
      <td class="main">
+         <span metal:use-macro="views/standard_macros/zmi_views" />
+         <span metal:use-macro="views/standard_macros/zmi_actions" />
          <span metal:use-macro="views/standard_macros/content_header_bar" />
          <span metal:define-slot="body"></span>
      </td>
-     <td class="right">
-            <span metal:use-macro="views/standard_macros/metadata_box" />
-            <span metal:use-macro="views/standard_macros/views_box" />
-            <span metal:use-macro="views/standard_macros/actions_box" />
-     </td>
    </tr>
 </table>
-
+<span metal:use-macro="views/standard_macros/footer" />
 </body>
 </html>
 </metal:block>


=== Zope3/src/zope/app/browser/skins/zopetop/widget_macros.pt 1.1 => 1.2 ===
--- Zope3/src/zope/app/browser/skins/zopetop/widget_macros.pt:1.1	Thu Aug  7 13:31:31 2003
+++ Zope3/src/zope/app/browser/skins/zopetop/widget_macros.pt	Fri Aug 15 20:43:07 2003
@@ -9,7 +9,7 @@
 
 
 <div class="user" metal:define-macro="logged_user" i18n:translate="">
-   Logged in as 
+   Logged in as
    <span tal:replace="request/user/getTitle" i18n:name="user_title">
      dtremea</span>
 </div>
@@ -19,14 +19,14 @@
   <h5 i18n:translate="">Navigation</h5>
 
   <div xmlns="http://www.zope.org/zope3xmltree"
-       id="navtreecontents" 
-       class="body" 
+       id="navtreecontents"
+       class="body"
        onclick="treeclicked(event);" i18n:translate="">Loading...
   </div>
 
 </div>
 
-<div class="box" id="commonTasks" 
+<div class="box" id="commonTasks"
        tal:define="view context/@@commonTasks|nothing"
        tal:condition="view/strip|nothing"
        metal:define-macro="commontasks_box">
@@ -70,13 +70,13 @@
 
 <table metal:define-macro="explorer_box" align="center" class="box" width="150">
   <thead>
-    <tr> 
+    <tr>
       <th align="center" class="boxtop" i18n:translate="">Root Folder</th>
       <th class="empty">&nbsp;</th>
     </tr>
     </thead>
     <tbody>
-    <tr> 
+    <tr>
       <td colspan="2" class="odd"><a href="#">
         <img src="plus.gif" width="19" height="25"
              tal:attributes="src context/++resource++plus.gif"
@@ -87,7 +87,7 @@
         Folder Name</a>
       </td>
     </tr>
-    <tr> 
+    <tr>
       <td colspan="2" class="odd"><a href="#">
         <img src="plus.gif" width="19" height="25"
              tal:attributes="src context/++resource++plus.gif"
@@ -98,7 +98,7 @@
         Folder Name</a>
       </td>
     </tr>
-    <tr> 
+    <tr>
       <td colspan="2" class="even"><a href="#">
         <img src="minus.gif" width="19" height="25"
              tal:attributes="src context/++resource++minus.gif"
@@ -115,7 +115,7 @@
   <table metal:define-macro="search_box" align="center" class="box"
          width="150">
     <thead>
-      <tr> 
+      <tr>
         <th align="center" class="boxtop">Search</th>
         <th class="empty">&nbsp;</th>
       </tr>
@@ -181,29 +181,61 @@
   </div>
 
 <div class="breadcrumbs" metal:define-macro="content_header_bar">
-  <span class="help">
-    <a href="#">
-      <span i18n:translate="">Help</span>
-      <img src="help.gif" width="25" height="25"
-           tal:attributes="src context/++resource++help.gif"
-           alt="help" />
-    </a>
-  </span>
-
   <span i18n:translate="">Location:</span>
   <span
       metal:define-macro="breadcrumbs"
           tal:omit-tag=""
-      tal:repeat="breadcrumb context/@@absolute_url/breadcrumbs"> <a href="" 
+      tal:repeat="breadcrumb context/@@absolute_url/breadcrumbs"> <a href=""
       tal:attributes="href string:${breadcrumb/url}/@@manage"
       tal:content="string:${breadcrumb/name}/"
       >name</a></span>
 
 </div>
-  
-<div metal:define-macro="footer">
-  <p i18n:translate="">Powered by Zope</p>
+
+<div class="itemViews"
+     metal:define-macro="zmi_views">
+        <tal:block repeat="view context/@@view_get_menu/zmi_views">
+          <a href=""
+            tal:attributes="href view/action;
+                            class view/selected;"
+            tal:content="view/title"
+            i18n:translate="">
+            label
+          </a>
+        </tal:block>
+</div>
+
+<div class="actions"
+     metal:define-macro="zmi_actions"
+     tal:define="actions context/@@view_get_menu/zmi_actions">
+        <span tal:condition="actions"
+              tal:omit-tag="">
+          <a href="#"
+               tal:repeat="info actions"
+               tal:attributes="href info/action"
+               tal:content="info/title"
+               i18n:translate="">
+              Action name
+          </a>
+        </span>
+        <span class="help">
+          <a href="#">
+          <span i18n:translate="">Help</span>
+          <img src="help.gif" width="25" height="25"
+               tal:attributes="src context/++resource++help.gif"
+               alt="help" />
+        </a>
+  </span>
+
+</div>
+
+<div metal:define-macro="footer"
+       tal:define="view context/@@MetaDataBox|nothing"
+       class="footer">
+  <div tal:condition="view/strip|nothing"
+       class="metadata" tal:content="structure view" />
+  <div i18n:translate="">Powered by Zope</div>
 </div>
-                    
+
 </body>
 </html>


=== Zope3/src/zope/app/browser/skins/zopetop/zopetop.css 1.1 => 1.2 ===
--- Zope3/src/zope/app/browser/skins/zopetop/zopetop.css:1.1	Thu Aug  7 13:31:31 2003
+++ Zope3/src/zope/app/browser/skins/zopetop/zopetop.css	Fri Aug 15 20:43:07 2003
@@ -17,10 +17,17 @@
  $Id$
 */
 
+div.label {
+  font-weight: bold;
+}
+
+div.field {
+  margin: 4px 0;
+}
 
 body {
     font: 0.8em Tahoma, Helvetica, Arial, sans-serif;
-    background: #FFFFFF;
+    background-color: #ccccff;
     color: #000066;
     margin: 0;
     padding: 0;
@@ -99,10 +106,9 @@
 
 h1, h2, h3, h4, h5, h6 {
 	color: Black;
-	margin-top: 0;
+	padding: 0 0;
+        margin: .5em 0;
 	font-family: Tahoma, Helvetica, Arial, sans-serif;
-
-
 }
 
 h1 {
@@ -258,8 +264,8 @@
 }
 
 table.columns td.main {
-    padding-left: 0.5em;
-    padding-right: 0.5em;
+    background-color: white;
+    padding: 0 0.5em;
     border-bottom: 1px solid #7B7AC6;
 }
 
@@ -267,6 +273,7 @@
     background-color: #ccccff;
     border-right: 1px solid #7B7AC6;
     border-bottom: 1px solid #7B7AC6;
+    padding: 0.5em 0;
     width: 20%;
 }
 
@@ -279,18 +286,14 @@
 
 div.breadcrumbs{
     background-color: #ccccff;
-    margin-top: 0.5em;
-    padding: 0.5em;
+    margin-top: 0em;
+    padding: 0 0.5em 0.5em 0.5em;
 }
 
-div.breadcrumbs img {
+span.help img{
   vertical-align: middle;
-}
-
-div.breadcrumbs span.help {
-   float: right;
-   position: relative;
-   bottom: 0.5em;
+  padding: 0;
+  margin: 0;
 }
 
 div.box {
@@ -368,15 +371,14 @@
 }
 
 .footer {
-    background: #DEE7EC;
-    border-top: 1px solid #8CACBB;
-    border-bottom: 1px solid #8CACBB;
-    color: Black;
-    clear: both;
-    float: none;
-    margin: 2em 0em;
-    padding: 0.5em 0em 1em 0em;
-    text-align: center;
+  background-color: #CCCCFF;
+  padding: 0.5em;
+  text-align: center;
+}
+
+div.metadata {
+  font-size: 0.9em;
+  text-align: right;
 }
 
 .context-menu {
@@ -443,9 +445,57 @@
     font-family : monospace;
     white-space : pre;
 }
+
 th.introspector {
     vertical-align: top;
     text-align: right;
 }
 
+.itemViews {
+    border-collapse: collapse;
+    padding-bottom: 2px;
+    padding-top: 6px;
+    margin-top: 0.5em;
+    white-space: nowrap;
+    background: transparent;
+    text-align: right;
+}
+
+.itemViews a {
+    background: transparent;
+    border: 1px solid #ccccff;
+    color: #000066;
+    font-weight: normal;
+    margin-right: 0.3em;
+    padding: 0.1em 0.5em 0.1em 0.5em;
+}
+
+.itemViews a.selected {
+    background-color: #CCCCFF;
+    border-bottom: #CCCCFF 1px solid;
+    color: #000066;
+    font-weight: normal;
+}
+
+.itemViews a:hover {
+    background-color: #CCCCFF;
+    color: #000066;
+}
 
+.actions {
+  background-color: #CCCCFF;
+  text-align: right;
+  padding-top: 0.3em;
+  color: Black;
+  border-collapse: collapse;
+}
+
+.actions a{
+   color: #000066;
+   border-left: 1px dashed #000066;
+   padding: 0 0.5em;
+}
+
+.actions a:hover {
+	background-color: White;
+}
\ No newline at end of file




More information about the Zope3-Checkins mailing list