Bugfix : la connexion Solr peut se volatiliser plus vite que le hook de transaction…
[Plinn.git] / skins / custom_generic / index_html_utils.pt
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3 <html xmlns="http://www.w3.org/1999/xhtml">
4
5 <head>
6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 <title>index html utils</title>
8 </head>
9
10 <body bgcolor="#ffffff">
11 <div metal:define-macro="index_header">
12 <h1 id="DesktopTitle" tal:content="here/Title">Document Title</h1>
13 <div id="DesktopDescription" tal:content="here/Description">
14 Document Description goes here.
15 </div>
16 </div>
17 <div metal:define-macro="index_content" i18n:domain="cmf_default">
18 <div tal:define="auth_filter nocall: modules/ZTUtils/LazyFilter;
19 types python:here.getTypeInfo().allowed_content_types ;
20 raw_items python: here.contentValues(filter={'portal_type': types } );
21 items python: auth_filter( raw_items, skip='View' );
22 ">
23 <div tal:condition="items">
24 <h4 i18n:translate="">Content</h4>
25 <ul>
26 <li tal:repeat="item items">
27 <a href="." tal:attributes="href item/absolute_url">
28 <img src="." alt="title" align="middle" border="0"
29 tal:attributes="src string:${item/portal_url}/${item/getIcon};
30 alt string:${item/Type};
31 title string:${item/Type}"
32 i18n:attributes="alt; title" />
33 </a>
34 <a href="." tal:attributes="href item/absolute_url" tal:content="item/Title">Title </a>
35 </li>
36 <blockquote tal:condition="exists: item/Description" tal:content="item/Description">
37 Description <!--fmt="structured-text'--></blockquote>
38 </ul>
39 </div>
40 </div>
41 </div>
42 <div metal:define-macro="index_links" i18n:domain="cmf_default">
43 <div tal:define="auth_filter nocall: modules/ZTUtils/LazyFilter;
44 default_types python:( 'Link', 'Favorite', 'Topic');
45 types types | here/show_link_types | default_types;
46 raw_items python: here.contentValues(filter={ 'portal_type': types } );
47 items python: auth_filter( raw_items, skip='View' );
48 ">
49 <div tal:condition="items">
50 <h4 i18n:translate="">Related Resources</h4>
51 <ul>
52 <li tal:repeat="item items">
53 <a href="." tal:attributes="href item/absolute_url">
54 <img src="(EmptyReference!)" alt="title" align="middle" border="0"
55 tal:attributes="src string:${item/portal_url}/${item/getIcon};
56 alt string:${item/Type};
57 title string:${item/Type}"
58 i18n:attributes="alt; title" />
59 </a>
60 <a href="." tal:attributes="href item/absolute_url" tal:content="item/Title">Title </a>
61 </li>
62 <blockquote tal:condition="exists: item/Description" tal:content="item/Description">
63 Description <!--fmt="structured-text'--></blockquote>
64 </ul>
65 </div>
66 </div>
67 </div>
68 <div metal:define-macro="index_folders" i18n:domain="cmf_default">
69 <div tal:define="auth_filter nocall: modules/ZTUtils/LazyFilter;
70 default_types python:( 'Folder',);
71 types types | here/show_folder_types | default_types;
72 raw_items python: here.contentValues(filter={ 'portal_type': types } );
73 items python: auth_filter( raw_items, skip='View' );
74 ">
75 <div tal:condition="items">
76 <h4 i18n:translate="">Folders</h4>
77 <ul>
78 <li tal:repeat="item items">
79 <a href="." tal:attributes="href item/absolute_url">
80 <img src="(EmptyReference!)" alt="title" align="middle" border="0"
81 tal:attributes="src string:${item/portal_url}/${item/getIcon};
82 alt string:${item/Type};
83 title string:${item/Type}"
84 i18n:attributes="alt; title" />
85 </a>
86 <a href="." tal:attributes="href item/absolute_url" tal:content="item/TitleOrId">Title </a>
87 </li>
88 <blockquote tal:condition="exists: item/Description" tal:content="item/Description">
89 Description <!--fmt="structured-text'--></blockquote>
90 </ul>
91 </div>
92 </div>
93 </div>
94 <div metal:define-macro="news_box" i18n:domain="cmf_default">
95 <table class="NewsItems" width="100%" border="0" cellspacing="0" cellpadding="0">
96 <tbody tal:define="news python: here.portal_catalog( meta_type='News Item', sort_on='Date', sort_order='reverse', review_state='published');
97 Batch python:modules['ZTUtils'].Batch;
98 global batch python:Batch(news, 10, 0, orphan=1)">
99 <tr>
100 <td class="NewsBorder" rowspan="13" bgcolor="#6699CC" width="1">
101 <img src="spacer.gif" alt=" " height="2" width="1" border="0" />
102 </td>
103 <td class="NewsTitle" valign="top" width="100%">
104 <b i18n:translate="">News</b>
105 </td>
106 </tr>
107 <tr class="NewsItemRow" tal:condition="news" tal:repeat="news batch">
108 <td valign="top">
109 <a href="." tal:attributes="href python:news.getURL()" tal:content="news/Title"></a><br />
110 <span tal:replace="news/Date">Date</span>
111 </td>
112 </tr>
113 <tr class="NewsItemRow" tal:condition="python:not(news)">
114 <td valign="top" i18n:translate="">
115 No news is no news.
116 </td>
117 </tr>
118 <tr class="NewsItemRow">
119 <td>
120 <a href="." i18n:translate="">More...</a>
121 </td>
122 </tr>
123 </tbody>
124 </table>
125 </div>
126 </body>
127
128 </html>