source: WAeUP_CMS/trunk/skins/WAEUP/df_listing.pt @ 3134

Last change on this file since 3134 was 620, checked in by Henrik Bettermann, 18 years ago
File size: 8.0 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2      lang="en"
3      metal:use-macro="here/main_template/macros/master"
4      i18n:domain="plone">
5
6<body>
7
8    <div metal:fill-slot="main">
9    <metal:main-macro define-macro="main">
10
11        <div metal:use-macro="here/document_actions/macros/document_actions">
12            Document actions (print, sendto etc)
13        </div>
14
15        <h1 tal:content="here/pretty_title_or_id" class="documentFirstHeading">
16            Title or id
17        </h1>
18
19        <a href=""
20           class="link-parent"
21           tal:define="parent_url python:here.navigationParent(here, template_id)"
22           tal:condition="parent_url"
23           tal:attributes="href parent_url"
24           i18n:translate="go_to_parent_url">
25        Up one level
26        </a>
27
28        <div class="documentDescription" tal:content="here/Description">
29            description
30        </div>
31
32        <metal:listingmacro define-macro="listing">
33        <tal:foldercontents define="contentFilter contentFilter|request/contentFilter|nothing;
34                            limit_display limit_display|request/limit_display|nothing;
35                            more_url more_url|request/more_url|string:folder_contents;
36                            contentsMethod python:test(here.portal_type=='Topic', here.queryCatalog, here.getFolderContents);
37                            folderContents folderContents|python:contentsMethod(contentFilter);
38                            use_view_action site_properties/typesUseViewActionInListings;
39                            over_limit python: limit_display and len(folderContents) > limit_display;
40                            folderContents python: (over_limit and folderContents[:limit_display]) or folderContents;
41                            show_about python:not isAnon or site_properties.allowAnonymousViewAbout">
42        <tal:listing condition="folderContents"
43                     define="toLocalizedTime nocall:here/toLocalizedTime;">
44
45            <dl>
46                <tal:entry tal:repeat="item folderContents">
47                <tal:block tal:define="item_url item/getURL|item/absolute_url;
48                                       item_id item/getId|item/id;
49                                       item_title_or_id item/pretty_title_or_id;
50                                       item_description item/Description;
51                                       item_type item/portal_type;
52                                       item_type_title item/Type;
53                                       item_modified item/ModificationDate;
54                                       item_created item/CreationDate;
55                                       item_type_class python: 'contenttype-' + putils.normalizeString(item_type);
56                                       item_wf_state        item/review_state|python: wtool.getInfoFor(item, 'review_state', '');
57                                       item_wf_state_class python:'state-' + putils.normalizeString(item_wf_state);
58                                       item_creator item/Creator;
59                                       item_start item/start/ISO|item/StartDate|nothing;
60                                       item_end item/end/ISO|item/EndDate|nothing;
61                                       item_folderish item/is_folderish|item/isPrincipiaFolderish|nothing;
62                                   ">
63
64                    <dt metal:define-macro="listitem">
65
66                        <span tal:attributes="class item_type_class"
67                              tal:condition="python:item_type != 'Link'">
68                        <a href="#"
69                           tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url+'/');
70                                           class string:$item_wf_state_class visualIconPadding"
71                           tal:content="item_title_or_id">
72                            Item Title
73                        </a>
74                        </span>
75
76                        <tal:to_external condition="python:item_type == 'Link'">
77                            <span tal:attributes="class item_type_class">
78                            <a href="#"
79                               tal:content="item_title_or_id"
80                               tal:attributes="href item/getRemoteUrl;
81                                               class item_wf_state_class">
82                                External Link
83                            </a>
84                            </span>
85                        </tal:to_external>
86
87                        <span class="documentByLine"
88                              tal:condition="show_about">
89
90                            <span tal:condition="python: item_type == 'Event'"
91                                  i18n:translate="label_event_byline">
92                                (<span tal:omit-tag="" tal:content="string:${item/location}" i18n:name="location">Oslo</span>, from
93                                 <span tal:omit-tag="" tal:content="python:toLocalizedTime(item_start,long_format=1)" i18n:name="start">from date</span> to
94                                 <span tal:omit-tag="" tal:content="python:toLocalizedTime(item_end,long_format=1)" i18n:name="end">to date</span>)
95                            &mdash;
96                            </span>
97
98                            <tal:name tal:condition="item_creator"
99                                tal:define="author python:mtool.getMemberInfo(item_creator)">
100                              <span i18n:translate="label_by_author">
101                                by
102                              <a href="#"
103                                 tal:attributes="href string:${portal_url}/author/${item_creator}"
104                                 tal:content="python:author and author['fullname'] or item_creator"
105                                 tal:omit-tag="not:author"
106                                 i18n:name="author">
107                                Bob Dobalina
108                              </a>
109                              </span>
110
111                            </tal:name>
112
113                            <tal:modified condition="python: item_type != 'Event'">
114                                &mdash;
115                                <tal:mod i18n:translate="box_last_modified">
116                                  last modified
117                                </tal:mod>
118                                <span tal:replace="python:toLocalizedTime(item_modified,long_format=1)">
119                                  August 16, 2001 at 23:35:59
120                                </span>
121                            </tal:modified>
122
123                            <metal:description define-slot="description_slot">
124                                <tal:comment replace="nothing">
125                                    Place custom listing info for custom types here
126                                </tal:comment>
127                            </metal:description>
128                        </span>
129
130                    </dt>
131
132                    <dd tal:condition="item_description">
133                        <span tal:omit-tag="" tal:content="item_description">
134                            description
135                        </span>
136                    </dd>
137
138                    <dd tal:condition="not: item_folderish">
139                       <div tal:define=" itemobj item/getObject;
140                                         reply_dict python:itemobj.getReplyReplies(itemobj)">
141                           <span tal:content="python: len(reply_dict)" /> comments or replies
142                       </div>
143                    </dd>
144
145                </tal:block>
146                </tal:entry>
147            </dl>
148        </tal:listing>
149        <metal:empty metal:define-slot="no_items_in_listing">
150            <p class="discreet"
151               tal:condition="not: folderContents"
152               i18n:translate="description_no_items_in_folder">
153                There are currently no public items in this folder.
154            </p>
155        </metal:empty>
156
157        </tal:foldercontents>
158        </metal:listingmacro>
159    </metal:main-macro>
160    </div>
161
162</body>
163</html>
Note: See TracBrowser for help on using the repository browser.