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

Revision 3029, 2.0 KB checked in by jukka, 10 years ago (diff)

Fixed #1962. Refactored messages that are based on properties of resources (deleted, draft, private, missing language) to come from a single source, getMessages-method and message_macros.pt. It should be easy to expand to add new suggestions.

  • 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>
11  </head>
12
13  <body>
14     <metal:fill fill-slot="main">
15      <metal:main_macro define-macro="main"
16            tal:define="base_macros here/base/macros;
17            view_template python:'%s_view' % here.portal_type.lower();
18            view_macros python:path('here/%s/macros|nothing' % view_template);
19            body_macro view_macros/body | body_macro | base_macros/body;
20            errors python:request.get('errors', {});
21            body_macro python:test(here.isDeleted() or (here.getState()=='private' and (memberid!=here.Creator() and not here.amIManager())), path('here/document_byline/macros/empty'),body_macro);
22            ">
23        <metal:header define-slot="header"><div metal:use-macro="here/collection_navigation/macros/collection_navigation"/>
24            <h1><span tal:replace="title_string | here/title_or_id" /><span i18n:domain="lemill" i18n:translate="text_deleted_heading" tal:condition="here/isDeleted">(DELETED)</span></h1>
25            <div metal:use-macro="here/document_byline/macros/byline" />
26            <tal:messages repeat="message here/getMessages">
27                <div metal:use-macro="python:path('here/macros_messages/macros/'+message)" />
28            </tal:messages>
29        </metal:header>                                                               
30        <metal:use_body use-macro="body_macro" />       
31        <metal:footer define-slot="footer">       
32          <div metal:use-macro="here/related_stories/macros/related_stories" />
33          <div metal:use-macro="here/collection_navigation/macros/collection_navigation"/>
34        </metal:footer>
35      </metal:main_macro>
36    </metal:fill>   
37  </body>
38</html>
Note: See TracBrowser for help on using the repository browser.