source: products/qSiloGroup/trunk/skins/qSiloGroup/silo_navigation_form.cpt @ 199

Last change on this file since 199 was 199, checked in by chervol, 18 years ago

new portlets lyout, time formating updated

File size: 7.7 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2      lang="en"
3      i18n:domain="plone"
4      metal:use-macro="here/main_template/macros/master">
5
6  <head>
7      <metal:block fill-slot="top_slot">
8        <tal:insert tal:replace="nothing"
9              tal:define="dummy python:request.set('enable_border', 1)" />
10      </metal:block>
11  </head>
12
13  <body>
14
15   <div metal:fill-slot="main">
16      <tal:protect tal:condition="python: not checkPermission('List folder contents', here)" tal:replace="here/raiseUnauthorized" />
17    <metal:main-macro define-macro="main">
18    <metal:contentsmacro define-macro="contents"
19         tal:define="standalone python:1;
20                     contentTypes here/getAllowedTypes;
21                     contentFilter contentFilter|request/contentFilter|nothing;
22                     b_size b_size|request/b_size|python:100;
23                     view_title view_title|request/view_title|string:;
24                     contentsMethod python:test(here.portal_type=='Topic', here.queryCatalog, here.getFolderContents);
25                     items python:contentsMethod(contentFilter);
26                     full_view full_view|request/full_view|python:True;">
27
28      <form name="silo_listing_form"
29            method="post"
30            action="folder_object"
31            tal:attributes="action string:${here/absolute_url}/${template/getId}">
32
33       <h1>
34          <tal:block replace="structure python:getattr(here, here.getIcon(1))"/>
35          <span tal:content="python: view_title and here.utranslate(view_title) or putils.pretty_title_or_id(here)" tal:omit-tag="">Directory Id</span>
36        </h1>
37        <tal:full_view condition="full_view">
38            <p tal:content="here/Description">
39                Description
40            </p>
41        </tal:full_view>
42
43        <p class="discreet"
44           tal:condition="not: items"
45           i18n:translate="description_no_visible_items_add_paste">
46           This folder has no visible items.
47        </p>
48        <metal:listing define-macro="folder_listing"
49                       tal:define="items_dict here/getSiloNavigationDictionary|nothing;
50                                   contentFilter contentFilter|python:{'path':'/'};
51                                   use_folder_contents site_properties/typesLinkToFolderContentsInFC|nothing;
52                                   use_view_action site_properties/typesUseViewActionInListings|python:();
53                                   query_path python:path('contentFilter/path|nothing') or request.get('path',None);
54                                   orderable_iface string:OFS.IOrderSupport.IOrderedContainer;
55                                   preSorted python:query_path or ((contentFilter and contentFilter.get('sort_on', 'getObjPositionInParent')!='getObjPositionInParent') or (not contentFilter and request.get('sort_on', 'getObjPositionInParent')!='getObjPositionInParent'));
56                                   isOrderable python:ifacetool.objectImplements(here, orderable_iface);
57                                   nosortclass python:test(isOrderable, 'nosort', '');
58                                   canModifyFolderContent is_editable;">
59
60        <div class="visualClear"><!-- --></div>
61
62          <table id="sortable"
63                 class="listing"
64                 summary="Content listing"
65                 i18n:attributes="summary summary_content_listing;">
66            <thead>
67              <metal:block tal:condition="items|not:standalone|nothing">
68                <tr>
69                  <th class="nosort">
70                      <input class="noborder"
71                             type="checkbox"
72                             src="select_all_icon.gif"
73                             name="selectButton"
74                             title="Select all items"
75                             onClick="toggleSelect(this,'menu_ids:list');"
76                             tal:attributes="src string:$portal_url/select_all_icon.gif"
77                             alt="Select all items"
78                             i18n:attributes="title label_select_all_items; alt label_select_all_items;"
79                  />
80                  </th>
81                  <th tal:attributes="class python:nosortclass"
82                      >&nbsp;<tal:title i18n:translate="listingheader_title"
83                      >Title</tal:title>&nbsp;</th>
84                  <metal:header_slot metal:define-slot="listingheader">
85                  <th tal:attributes="class python:nosortclass"
86                      >&nbsp;<tal:state i18n:translate="listingheader_menu_title"
87                      >Menu title</tal:state>&nbsp;</th>
88                  </metal:header_slot>
89                </tr>
90              </metal:block>
91            </thead>
92
93            <metal:block tal:condition="items|not:standalone|nothing">
94            <tbody tal:define="arrowUp portal/arrowUp.gif;
95                               arrowDown portal/arrowDown.gif;
96                               getRelativeContentURL nocall:utool/getRelativeContentURL
97                               ">
98                <tal:items tal:repeat="item items">
99                   <tr tal:define="oddrow               repeat/item/odd;
100                                   item_url             item/getURL|item/absolute_url;
101                                   item_id              item/getId;
102                                   item_title_or_id     item/pretty_title_or_id;
103                                   isEditable python:item_id in items_dict.keys();
104                                   item_nav_title       python: isEditable and items_dict[item_id]['title'] or request.get(item_id+'_title','');"
105                       tal:attributes="class python:test(oddrow, 'even', 'odd')" >
106                       <td>
107                           <input type="checkbox"
108                                  class="noborder"
109                                  name="menu_ids:list" id="#"
110                                  value="#"
111                                  tal:define="isChecked python:isEditable or item_id in request.get('menu_ids',[])"
112                                  tal:attributes="value   item_id;
113                                                  id      string:cb_$item_id;
114                                                  checked isChecked;
115                                                  alt     string:Select $item_title_or_id;
116                                                  title   string:Select $item_title_or_id" />
117                    </td>
118                    <td>
119                            <strong>
120                            <span tal:content="item_title_or_id">
121                              Item Title
122                            </span>
123                            </strong>
124                    </td>
125
126                    <td>
127                        <input type="text" size="50"
128                               tal:define="item_title python:item_nav_title or item_title_or_id"
129                               tal:attributes="name string:${item_id}_title;
130                                               value item_title"/>
131                    </td>
132                   </tr>
133                </tal:items>
134            </tbody>
135            </metal:block>
136            </table>
137
138        </metal:listing>
139
140        <metal:buttons define-macro="folder_buttons">
141        <input type="hidden" name="orig_template"
142               tal:attributes="value template_id"/>
143          <input class="context"
144                 type="submit"
145                 name="form.button.Save"
146                 value="Save"
147                 tabindex=""
148                 i18n:attributes="value"
149                 tal:attributes="tabindex tabindex/next;" />
150        </metal:buttons>
151        <input type="hidden" name="form.submitted" value="1" />
152      </form>
153
154    </metal:contentsmacro>
155    </metal:main-macro>
156    </div>
157
158
159  </body>
160</html>
Note: See TracBrowser for help on using the repository browser.