source: products/qPloneDropDownMenu/branches/0.2/skins/qPloneDropDownMenu/getSubmenu.pt @ 1

Last change on this file since 1 was 1, checked in by myroslav, 16 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 3.8 KB
Line 
1<ul metal:define-macro="submenu"
2    class="tabslist hideLevel"
3    tal:define="submenu submenu|options/submenu;
4                submenu_path submenu_path|options/submenu_path;
5                first first|python:1;
6                openMenu python:('submenu' in options.keys() or len(submenu)) and first"
7    tal:attributes="class python:test(openMenu, 'tabslist showLevel', 'tabslist hideLevel')">
8
9<tal:menuitem tal:repeat="menuitem submenu"
10              tal:condition="submenu">
11<li tal:define="menuTitle menuitem/getTitle;
12                submenu   menuitem/listMenuItems;
13                sub       python:submenu;
14                idx       repeat/menuitem/index"
15    tal:attributes="id string:tabslist_${menuTitle}">
16    <div class="deleteHover">
17        <input name="submenu_path" value="" type="hidden"
18               tal:attributes="value string:${submenu_path}/${idx}" />
19        <img src="./images/live_tree_transparent_pixel.gif" alt="&gt;" class="item_icon collapsed_icon"/>
20        <img class="drag-handle" src="./images/drag.gif" alt="" height="11" width="25" />
21        <span tal:content="menuTitle">Menu Item Name</span>
22        <a class="delete" href="#">Delete</a>
23        <div class="reorder-controls"><a
24             href="#" class="reorder">Reorder</a></div>
25        <div class="sort-controls"><a
26             href="#" class="save">Save</a> | <a href="#" class="cancel">Cancel</a></div>
27        <form class="editform"
28              method="post"
29              action="editPTAction"
30              tal:attributes="action string:${here/portal_url}/prefs_dropdownmenu_edit_form;
31                              name string:f$idx">
32            <input type="hidden" name="idx" tal:attributes="value idx" />
33            <dl>
34              <dt><label>Name</label></dt>
35              <dd><input type="text" value="" name="title"
36                         tal:attributes="value menuTitle;
37                                         name string:i${idx}_${attrs/name}"/></dd>
38            </dl>
39            <dl>
40              <dt><label>URL</label></dt>
41              <dd><input type="text" value="" name="url"     size="30"
42                         tal:attributes="value menuitem/getUrl|nothing;
43                                         name string:i${idx}_${attrs/name}" /></dd>
44            </dl>
45            <div>
46              <input type="submit" class="editsave"   i18n:attributes="value" value="Save"   />
47              <input type="submit" class="editcancel" i18n:attributes="value" value="Cancel" />
48            </div>
49        </form>
50    </div>
51    <div class="sub-items">
52      <ul tal:omit-tag=""
53          tal:define="submenu_path string:${submenu_path}/${idx};
54                      first nothing">
55        <metal:submenu use-macro="here/getSubmenu/macros/submenu" />
56      </ul>
57    </div>
58</li>
59</tal:menuitem>
60<li class="addItem">
61    <form class="addform"
62          method="post"
63          action="addPTAction"
64          tal:attributes="action string:${here/portal_url}/prefs_dropdownmenu_edit_form">
65        <input type="hidden" name="submenu_path" value=""
66               tal:attributes="value submenu_path" />
67        <dl class="field-title"><dt><label>Name</label></dt>
68            <dd><img src="./images/live_tree_transparent_pixel.gif" alt="&gt;" class="item_icon" />
69                <input class="acttitle" type="text" value=""
70                       name="title" /></dd></dl>
71        <dl class="field-url"><dt><label>URL</label></dt>
72            <dd><input class="acturl" type="text" value="" size="30"
73                       name="url" /></dd></dl>
74        <div class="add-controls">
75            <input type="submit" class="buttonadd"    i18n:attributes="value" value="Add" />
76            <input type="submit" class="buttoncancel" i18n:attributes="value" value="Cancel" />
77        </div>
78    </form>
79</li>
80</ul>
Note: See TracBrowser for help on using the repository browser.