Changeset 1646


Ignore:
Timestamp:
04/17/07 12:22:58 (13 years ago)
Author:
tarmo
Message:

Cleaned up standalone templates. Refs #738, #1033.

Location:
trunk/skins/lemill
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/skins/lemill/standalone_template.pt

    r1633 r1646  
    99                      xml:lang language"> 
    1010 
    11   <head metal:use-macro="here/header/macros/html_header"> 
    12  
    13     <metal:fillbase fill-slot="base"> 
    14       <metal:baseslot define-slot="base"> 
    15         <base href="" tal:attributes="href here/renderBase" /> 
    16       </metal:baseslot> 
    17     </metal:fillbase> 
    18  
    19     <metal:headslot fill-slot="head_slot" 
    20                     tal:define="lang language; 
    21                                 charset site_properties/default_charset|string:utf-8"> 
    22  
    23       <metal:cache use-macro="here/global_cache_settings/macros/cacheheaders"> 
    24         Get the global cache headers located in global_cache_settings. 
    25       </metal:cache> 
    26  
    27       <metal:headslot define-slot="head_slot" /> 
    28       <tal:comment replace="nothing"> A slot where you can insert elements in the header from a template </tal:comment> 
    29     </metal:headslot> 
    30  
    31         <metal:cssslot fill-slot="css_slot"> 
    32           <tal:comment replace="nothing"> A slot where you can insert CSS in the header from a template </tal:comment> 
    33             <tal:block tal:define="stuff here/getSectionFromURL; 
    34                             global section_name string:content"> 
    35                 <tal:block tal:condition="python: stuff !=None"> 
    36                     <tal:block tal:condition="python: stuff.find('section-content') != -1 "> 
    37                         <tal:block tal:define="global section_name string:content" /> 
    38                     </tal:block> 
    39                         <tal:block tal:condition="python: stuff.find('section-methods') != -1 "> 
    40                             <tal:block tal:define="global section_name string:methods" /> 
    41                     </tal:block> 
    42                     <tal:block tal:condition="python: stuff.find('section-tools') != -1 "> 
    43                         <tal:block tal:define="global section_name string:tools" />                      
    44                     </tal:block> 
    45                     <tal:block tal:condition="python: stuff.find('section-community') != -1 "> 
    46                         <tal:block tal:define="global section_name string:community" /> 
    47                     </tal:block> 
    48                 </tal:block> 
    49                 <tal:block define="global base_url string:ploneColors_${section_name}.css"/> 
    50                 <link rel="stylesheet" type="text/css" tal:attributes="href base_url" /> 
    51             </tal:block> 
    52             <style type="text/css" media="all"><!-- 
    53             @import url("standalone_view.css"); 
    54             --></style> 
    55  
    56         <metal:cssslot define-slot="css_slot" /> 
    57         </metal:cssslot> 
    58  
    59     <metal:javascriptslot fill-slot="javascript_head_slot"> 
    60       <tal:comment replace="nothing"> A slot where you can insert javascript in the header from a template </tal:comment> 
    61       <metal:javascriptslot define-slot="javascript_head_slot" /> 
    62     </metal:javascriptslot> 
     11  <head> 
     12    <title tal:content="here/Title"/> 
     13        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
    6314  </head> 
    6415 
     
    6617                        dir python:test(isRTL, 'rtl', 'ltr'); 
    6718                        onload onload_func | nothing;"> 
    68  
    69 <div id="site-title"> 
    70 <a href="" tal:attributes="href portal_url">LeMill</a> 
    71 </div> 
    72  
    73 <div id="control-panel"> 
    74 <a href="" tal:attributes="href string:${context/absolute_url}/view"><tal:block i18n:domain="lemill" i18n:translate="label_edit_tips_and_more">Edit, tips for use and more</tal:block>...</a> 
    75 </div> 
    7619 
    7720<div id="material-content" tal:define="is_fullscreen_view python:True"> 
     
    8528                    </metal:bodytext> 
    8629 
    87                     <metal:sub metal:define-slot="sub"> 
    88                       <metal:discussion use-macro="here/viewThreadsAtBottom/macros/discussionView" /> 
    89                     </metal:sub> 
    90  
    91 </div> 
    92  
    93 <div id="cover-image"> 
    94 <a href="" tal:attributes="href string:${context/absolute_url}/view"><img src="default.png" tal:attributes="src here/getCoverImageURL; alt python:here.meta_type" style="padding: 10px 20px"/></a> 
    9530</div> 
    9631 
  • trunk/skins/lemill/standalone_view.pt

    r1633 r1646  
    99 
    1010  <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> 
    6711 
    6812  <body> 
     
    8832        </div> 
    8933        </tal:has_document_byline> 
    90  
    91         <tal:iflearnres condition="showDraftMessage"> 
    92             <tal:ifdraftmess condition="python:wf_state=='draft'"> 
    93                 <div class="portalMessage" i18n:domain="lemill" i18n:translate="text_draft_status"> 
    94                     This learning resource is in draft status. 
    95                 </div> 
    96             </tal:ifdraftmess> 
    97         </tal:iflearnres> 
    9834                                                                                   
    9935        <metal:use_body use-macro="body_macro" /> 
    100         <metal:use_body use-macro="folderlisting_macro" /> 
    10136 
    102         <tal:iflearnres condition="showDraftMessage"> 
    103             <div class="license"> 
    104                 <metal:fieldMacro use-macro="python:here.widget('rights',mode='view')"/> 
    105             </div> 
    106         </tal:iflearnres> 
    107          
    10837        <metal:use_footer use-macro="footer_macro" /> 
    109     <div metal:use-macro="here/related_stories/macros/related_stories"> 
    110             show related items if they exist 
    111         </div> 
    112          
    113         <div metal:use-macro="here/wcag/macros/wcag_logo"> 
    114             Show WCAG logo 
    115         </div> 
    116      
    11738      </metal:main_macro> 
    11839    </metal:fill>     
Note: See TracChangeset for help on using the changeset viewer.