Author: jmorliaguet
Date: Wed May 31 22:36:45 2006
New Revision: 3284

Modified:
   
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element_editor.pt

Log:

- made the UI more intuitive. some rephrasing



Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element_editor.pt
==============================================================================
--- 
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element_editor.pt  
    (original)
+++ 
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element_editor.pt  
    Wed May 31 22:36:45 2006
@@ -36,72 +36,51 @@
       <a i18n:translate="" tal:attributes="
          href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: '$id', mode: 'preview'}})">Preview</a></li>
   </ul>
+
   <div class="form">
-    <ul class="inlineTabs" style="float:right; font-style: normal"
-        tal:condition="python: tab and not preset and mode != 
'manage-presets'">
-      <li>
-         <a tal:attributes="href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: $id, tab: '${edited_type}', mode: 'manage-presets'} })">manage 
presets</a></li>
-    </ul>
-    <tal:block condition="python: mode == 'edit' and preset is None"
-               content="structure edited/@@edit.html" />
-    <fieldset class="panel" tal:condition="python: mode == 'preview'">
-      <legend class="panelTitle">Preview</legend>
-      <tal:block content="structure info/preview" />
+  <div style="padding: 0.5em; font-style: italic" tal:condition="format">
+    <form style="float:right" tal:condition="python: edited_type in 
preset_info"
+          tal:attributes="action string:${display/@@absolute_url}/@@usePreset">
+      <span>Use this preset
+      <select name="uri">
+        <option tal:condition="not:preset"></option>
+        <option tal:repeat="preset preset_info/?edited_type"
+                tal:attributes="value preset/uri; selected python: 
info['preset_uri'] == preset['uri']">
+          <tal:block content="preset/name" />
+        </option>
+      </select>
+      <input type="submit" value="OK" />
+    </form>
+    <span tal:condition="preset">Warning: you are editing the '<tal:block 
content="preset/name" />' preset.
+       This will most likely affect other parts of the site.<br/>
+      <a style="font-weight: bold"
+         href="" tal:attributes="href 
string:${display/@@absolute_url}/@@stopUsingPreset?uri=${info/preset_uri}">Use 
a copy</a> of it.
+    </span>
+    <span tal:condition="not:preset">
+      Do you want to reuse these settings?
+    <a style="font-weight: bold" tal:attributes="href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: $id, tab: '${edited_type}', mode: 'create-preset'} })">create a preset</a>.
+    </span>
+  </div>
+
+  <tal:block condition="python: mode == 'edit'"
+             content="structure edited/@@edit.html" />
+  <fieldset class="panel" tal:condition="python: mode == 'preview'">
+    <legend class="panelTitle">Preview</legend>
+    <tal:block content="structure info/preview" />
+  </fieldset>
+  <div tal:condition="python: mode == 'create-preset' or preset">
+    <fieldset class="panel" tal:condition="not:preset">
+      <legend class="panelTitle">Create a preset</legend>
+      <form enctype="multipart/form-data" method="post"
+       tal:attributes="action string:${edited/@@absolute_url}/@@createPreset">
+        <p>
+        <label for="title">Title</label>
+        <input id="title" type="text" name="title" />
+        <input type="hidden" name="uri" tal:attributes="value info/uri" />
+        <input type="submit" name="UPDATE_SUBMIT"
+        i18n:translate="create-button" value="Create" />
+        </p>
+      </form>
     </fieldset>
-    <div tal:condition="python: mode == 'manage-presets' or preset">
-      <table style="width: 100%" cellpadding="0" cellspacing="0">
-        <tr>
-          <td style="vertical-align: top; width: 50%">
-            <fieldset class="panel" tal:condition="preset">
-              <legend class="panelTitle">Unselect the preset</legend>
-              <p>The '<cite tal:content="preset/name" />' preset is currently
-                 being used.</p>
-              <form tal:attributes="action 
string:${display/@@absolute_url}/@@stopUsingPreset">
-                <input type="hidden" name="uri" tal:attributes="value 
info/preset_uri" />
-                <input type="submit" name="UPDATE_SUBMIT"
-                       value="Stop using the preset" />
-              </form>
-            </fieldset>
-            <fieldset class="panel"
-                      tal:condition="python: edited_type in preset_info">
-              <legend class="panelTitle">Use a preset</legend>
-              <ul class="inlineTabs">
-                <li tal:repeat="preset preset_info/?edited_type">
-                  <a href="" tal:content="preset/name"
-                   tal:attributes="href 
string:${display/@@absolute_url}/@@usePreset?uri=${preset/uri}" /></li>
-              </ul>
-            </fieldset>
-            <fieldset class="panel" tal:condition="not:preset">
-              <legend class="panelTitle">Create a new preset</legend>
-              <form enctype="multipart/form-data" method="post"
-                    tal:attributes="action 
string:${edited/@@absolute_url}/@@createPreset">
-                <p>
-                  <label for="title">Title</label>
-                  <input id="title" type="text" name="title" />
-                  <input type="hidden" name="uri" tal:attributes="value 
info/uri" />
-                  <input type="submit" name="UPDATE_SUBMIT"
-                         i18n:translate="create-button" value="Create" />
-                </p>
-              </form>
-            </fieldset>
-          </td>
-          <td style="vertical-align: top; width: 50%">
-            <fieldset class="panel">
-              <legend class="panelTitle">
-               Preview
-               <tal:block condition="preset"
-                          content="string:'${preset/name}'" />
-              </legend>
-              <ul style="float:right" class="inlineTabs" 
tal:condition="preset">
-                <!--
-                <li><a tal:attributes="href 
string:${preset/@@absolute_url}/@@edit.html">modify settings</a></li>
-                -->
-              </ul>
-              <tal:block content="structure info/preview" />
-            </fieldset>
-          </td>
-        </tr>
-      </table>
-    </div>
   </div>
 </tal:block>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to