source: trunk/skins/lemill/base_view.pt @ 521

Revision 521, 4.5 KB checked in by vahur, 13 years ago (diff)

closes #549 spent 10m
added byline

  • Property svn:eol-style set to native
Line 
1<html xmlns="http://www.w3.org/1999/xhtml"
2      xml:lang="en"
3      lang="en"
4      xmlns:tal="http://xml.zope.org/namespaces/tal"
5      xmlns:metal="http://xml.zope.org/namespaces/metal"
6      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
7      metal:use-macro="here/main_template/macros/master"
8      i18n:domain="lemill">
9
10  <head><title></title></head>
11
12  <metal:javascript_head fill-slot="javascript_head_slot">
13    <tal:block define="macro here/archetypes_custom_js/macros/javascript_head | nothing"
14               condition="macro">
15      <metal:block use-macro="macro" />
16    </tal:block>
17    <tal:comment replace="nothing">
18      Many of the following defines duplicated from the tal:defines in the
19      main slot. With base_edit, edit_macros could be reused as it was defined
20      for the entire document. base_view uses main_template and thus must
21      create additional defines for each slot it fills.
22    </tal:comment>
23    <tal:js define="fields python:here.Schema().viewableFields(here);
24                    js python:here.getUniqueWidgetAttr(fields, 'helper_js')"
25            condition="js"
26            repeat="item js">
27      <script type="text/javascript"
28              charset="iso-8859-1"
29              tal:condition="python:exists('portal/%s' % item)"
30              tal:attributes="src string:$portal_url/$item">
31      </script>
32    </tal:js>
33    <tal:block define="portal_type python:here.getPortalTypeName().lower().replace(' ', '_');
34                       view_template python:'%s_view' % portal_type;
35                       view_macros python:path('here/%s/macros|nothing' % view_template);
36                       macro view_macros/js | nothing"
37               condition="macro">
38      <metal:block use-macro="macro" />
39    </tal:block>
40  </metal:javascript_head>
41
42  <metal:css fill-slot="css_slot">
43    <tal:comment replace="nothing">
44      Many of the following defines duplicated from the tal:defines in the
45      main slot. With base_edit, edit_macros could be reused as it was defined
46      for the entire document. base_view uses main_template and thus must
47      create additional defines for each slot it fills.
48    </tal:comment>
49    <tal:css define="fields python:here.Schema().viewableFields(here);
50                     css python:here.getUniqueWidgetAttr(fields, 'helper_css')"
51             condition="css"
52             repeat="item css">
53      <style type="text/css"
54             media="all"
55             tal:condition="python:exists('portal/%s' % item)"
56             tal:content="string:@import url($portal_url/$item);">
57      </style>
58    </tal:css>
59    <tal:block define="portal_type python:here.getPortalTypeName().lower().replace(' ', '_');
60                       view_template python:'%s_view' % portal_type;
61                       view_macros python:path('here/%s/macros|nothing' % view_template);
62                       macro view_macros/css | nothing"
63               condition="macro">
64      <metal:block use-macro="macro" />
65    </tal:block>
66  </metal:css>
67
68  <body>
69     <metal:fill fill-slot="main">
70      <metal:main_macro define-macro="main"
71            tal:define="portal_type python:here.getPortalTypeName().lower().replace(' ', '_');
72            base_macros here/base/macros;
73            view_template python:'%s_view' % portal_type;
74            view_macros python:path('here/%s/macros|nothing' % view_template);
75            body_macro view_macros/body | body_macro | base_macros/body;
76            folderlisting_macro view_macros/folderlisting | folderlisting | base_macros/folderlisting;
77            footer_macro view_macros/footer | footer_macro | base_macros/footer;
78            errors python:request.get('errors', {})">
79
80        <h1 tal:content="title_string | here/title_or_id"></h1>
81        <tal:has_document_byline tal:condition="exists:here/document_byline">
82        <div metal:use-macro="here/document_byline/macros/byline">
83            Get the byline - contains details about author and modification date.
84        </div>
85        </tal:has_document_byline>
86                                                                         
87        <metal:use_body use-macro="body_macro" />
88        <metal:use_body use-macro="folderlisting_macro" />
89        <metal:use_footer use-macro="footer_macro" />
90    <div metal:use-macro="here/related_stories/macros/related_stories">
91            show related items if they exist
92        </div>
93       
94        <div metal:use-macro="here/wcag/macros/wcag_logo">
95            Show WCAG logo
96        </div>
97   
98      </metal:main_macro>
99    </metal:fill>   
100  </body>
101</html>
Note: See TracBrowser for help on using the repository browser.