Author: jmorliaguet
Date: Sat May 13 19:17:08 2006
New Revision: 3124

Modified:
   cpsskins/branches/paris-sprint-2006/ui/panels/element_editor.pt
   
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element-editor.css

Log:

- added forms for creating and for using settings



Modified: cpsskins/branches/paris-sprint-2006/ui/panels/element_editor.pt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/panels/element_editor.pt     
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/panels/element_editor.pt     Sat May 
13 19:17:08 2006
@@ -5,6 +5,7 @@
             tmutil context/@@getThemeManager;
             element python: tmutil.getElementById(id);
             info element/@@editpanel/getInfo;
+            display nocall:info/display;
             edited nocall:info/edited">
 
   <a class="back"
@@ -38,9 +39,34 @@
 
   </div>
 
-  <div class="form" tal:condition="python: mode == 'edit'"
-       tal:content="structure edited/@@edit.html" />
+  <tal:block condition="python: mode == 'edit'">
+    <div class="form" tal:content="structure edited/@@edit.html" />
 
+    <div class="form">
+      <h3>Create a setting</h3>
+      <form tal:attributes="action 
string:${edited/@@absolute_url}/@@createSetting"
+            enctype="multipart/form-data" method="post">
+        <p>
+          <label for="title">Title</label>
+          <input id="title" type="text" name="title" />
+          <input type="submit" name="UPDATE_SUBMIT"
+                 i18n:translate="create-button" value="Create" />
+        </p>
+      </form>
+
+      <h3>Use a setting</h3>
+      <ul tal:define="setting_info edited/@@getSettingInfo;
+                      format_type edited/type:resourcename">
+        <li tal:condition="python: format_type in setting_info"
+            tal:repeat="setting setting_info/?format_type">
+          <a href=""
+             tal:attributes="href 
string:${display/@@absolute_url}/@@useSettingAsFormat?uri=${setting/uri}"
+             tal:content="setting/name" />
+        </li>
+      </ul>
+    </div>
+
+  </tal:block>
   <div class="form" tal:condition="python: mode == 'preview'"
        tal:content="structure info/preview" />
 

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element-editor.css
==============================================================================
--- 
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element-editor.css 
    (original)
+++ 
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element-editor.css 
    Sat May 13 19:17:08 2006
@@ -41,6 +41,7 @@
 div.form {
   border: 1px solid #666;
   padding: 1em;
+  margin-bottom: 0.2em;
 }
 
 div.form button, div.form input, div.form textarea {
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to