Changeset 1631 in products


Ignore:
Timestamp:
Feb 3, 2010 4:12:48 PM (14 years ago)
Author:
kroman0
Message:

Fixed global variables in templates for Plone4, fixed some translation messages and preferences forms condition

Location:
quintagroup.plonecomments/trunk/quintagroup/plonecomments
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/browser/comments.pt

    r1222 r1631  
    22                   isDiscussionAllowed view/is_discussion_allowed; 
    33                   replies view/get_replies; 
     4                   here_url context/@@plone_context_state/object_url; 
     5                   current_page_url context/@@plone_context_state/current_page_url; 
     6                   member context/@@plone_portal_state/member; 
    47                   isAnon view/is_anonymous; 
    58                   ifModerate view/is_moderation_enabled; 
     
    912                   isAnonymousReportAbuseEnabled view/anonymous_report_abuse_enabled; 
    1013                   isReportAbuseEnabled python:isAnonymousReportAbuseEnabled or not isAnon and isAuthenticatedReportAbuseEnabled; 
    11                    foo context/@@plone/globalize; 
    1214                   props_sheet here/portal_properties/qPloneComments; 
    1315                   require_email python:props_sheet.getProperty('require_email');" 
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt

    r1583 r1631  
    1212<div metal:fill-slot="main" 
    1313     tal:define="errors options/state/getErrors; 
     14                 putils context/plone_utils; 
     15                 toLocalizedTime nocall:context/@@plone/toLocalizedTime; 
     16                 portal context/@@plone_portal_state/portal; 
     17                 here_url context/@@plone_context_state/object_url; 
     18                 current_page_url context/@@plone_context_state/current_page_url; 
     19                 isAnon context/@@plone_portal_state/anonymous; 
     20                 member context/@@plone_portal_state/member; 
     21                 template_id template/getId; 
     22                 Iterator python:modules['Products.CMFPlone'].IndexIterator; 
     23                 tabindex python:Iterator(mainSlot=False); 
    1424                 thread python:putils.getDiscussionThread(here); 
    1525                 discussable python:thread[0]; 
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_reply_form.cpt

    r1505 r1631  
    1414<div metal:fill-slot="main" 
    1515     tal:define="errors options/state/getErrors; 
     16                 putils context/plone_utils; 
     17                 toLocalizedTime nocall:context/@@plone/toLocalizedTime; 
     18                 portal context/@@plone_portal_state/portal; 
     19                 here_url context/@@plone_context_state/object_url; 
     20                 current_page_url context/@@plone_context_state/current_page_url; 
     21                 isAnon context/@@plone_portal_state/anonymous; 
     22                 member context/@@plone_portal_state/member; 
     23                 template_id template/getId; 
    1624                 thread python:putils.getDiscussionThread(here); 
    1725                 discussable python:thread[0]; 
     
    105113                    <div class="formHelp" i18n:translate="help_name" 
    106114                         i18n:domain="quintagroup.plonecomments"> 
    107                         Tell us your name. 
     115                        Please enter your name. 
    108116                    </div> 
    109117 
     
    135143                    <div class="formHelp" i18n:translate="help_email" 
    136144                         i18n:domain="quintagroup.plonecomments"> 
    137                         Enter your e-mail address. 
     145                        Please enter your e-mail address. 
    138146                    </div> 
    139147 
     
    152160                    </dt> 
    153161                    <dd i18n:translate="legend_note_reply_anonymous"> 
    154                         You are not logged in. You may optionally enter your 
    155                         username and password below. If you don't enter anything, 
    156                         this comment will be posted as 'Anonymous User'. 
     162                        Note: you are not logged in. You may optionally enter your 
     163                        username and password below. If you don't enter your 
     164                        username and password below, this comment will be posted as 
     165                        the 'Anonymous User'. 
    157166                    </dd> 
    158167                </dl> 
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/prefs_comments_setup_form.cpt

    r1582 r1631  
    88 
    99<div metal:fill-slot="prefs_configlet_main" 
    10      tal:define="errors python:request.get('controller_state', None).getErrors();"> 
     10     tal:define="here_url context/@@plone_context_state/object_url; 
     11                 Iterator python:modules['Products.CMFPlone'].IndexIterator; 
     12                 tabindex python:Iterator(mainSlot=False); 
     13                 errors python:request.get('controller_state', None).getErrors();"> 
    1114 
    1215    <div metal:define-macro="main"> 
     
    2225        </li> 
    2326 
    24         <li class=""> 
     27        <li class="" 
     28            tal:condition="python:checkPermission('Moderate Discussion', here)"> 
    2529        <a href="" 
    26            tal:condition="python:checkPermission('Moderate Discussion', here)" 
    2730           tal:attributes="href string:prefs_recent_comments_form" 
    2831           i18n:translate="label_comments">Recent comments moderation</a> 
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/prefs_recent_comments_form.cpt

    r1464 r1631  
    88 
    99<div metal:fill-slot="prefs_configlet_main" 
    10      tal:define="errors python:request.get('controller_state', None).getErrors();"> 
     10     tal:define="here_url context/@@plone_context_state/object_url; 
     11                 Iterator python:modules['Products.CMFPlone'].IndexIterator; 
     12                 tabindex python:Iterator(mainSlot=False); 
     13                 errors python:request.get('controller_state', None).getErrors();"> 
    1114 
    1215    <div metal:define-macro="main"> 
     
    2124        </li> 
    2225 
    23         <li class="selected"> 
     26        <li class="selected" 
     27            tal:condition="python:checkPermission('Moderate Discussion', here)"> 
    2428        <a href="" 
    2529        tal:attributes="href string:${template/id}" 
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/report_abuse_form.cpt

    r1204 r1631  
    1414        <div metal:fill-slot="main" 
    1515            tal:define="errors options/state/getErrors; 
     16                        putils context/plone_utils; 
     17                        portal context/@@plone_portal_state/portal; 
     18                        toLocalizedTime nocall:context/@@plone/toLocalizedTime; 
     19                        here_url context/@@plone_context_state/object_url; 
     20                        template_id template/getId; 
     21                        Iterator python:modules['Products.CMFPlone'].IndexIterator; 
     22                        tabindex python:Iterator(mainSlot=False); 
     23                        isAnon context/@@plone_portal_state/anonymous; 
     24                        member context/@@plone_portal_state/member; 
    1625                        thread python:putils.getDiscussionThread(here); 
    1726                        discussable python:thread[0]; 
     
    108117                                                tal:define="error errors/creator|nothing" 
    109118                                                tal:attributes="class python:error and 'field error' or 'field'"> 
    110                                                 <label for="creator" i18n:translate="label_creator"> 
     119                                                <label for="creator" i18n:translate="label_name"> 
    111120                                                    Name 
    112121                                                </label> 
     
    114123                                                        i18n:attributes="title title_required;" 
    115124                                                        i18n:translate="label_required">(Required)</span> 
    116                                                 <div class="formHelp" i18n:translate="help_creator"> 
    117                                                     Please enter your full name 
     125                                                <div class="formHelp" i18n:translate="help_name" i18n:domain="quintagroup.plonecomments"> 
     126                                                    Please enter your name. 
    118127                                                </div> 
    119128                                                <div tal:content="error">Validation error output</div> 
     
    135144                                                        i18n:attributes="title title_required;" 
    136145                                                        i18n:translate="label_required">(Required)</span> 
    137                                                 <div class="formHelp" i18n:translate="help_email"> 
    138                                                     Please enter your e-mail address 
     146                                                <div class="formHelp" i18n:translate="help_email" 
     147                                                     i18n:domain="quintagroup.plonecomments"> 
     148                                                    Please enter your e-mail address. 
    139149                                                </div> 
    140150                                                <div tal:content="error">Validation error output</div> 
Note: See TracChangeset for help on using the changeset viewer.