Changeset 1222 in products


Ignore:
Timestamp:
Aug 7, 2009 2:38:11 PM (15 years ago)
Author:
mylan
Message:

Merged changes from qPloneComments/branches/plone3_extend: added comment editing, updated comments viewlet - now comment form present without needing to push on 'Add comment' button

Location:
quintagroup.plonecomments/trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonecomments/trunk/docs/HISTORY.txt

    r1202 r1222  
    99  [liebster] 
    1010 
     11- Added edit comment functionality 
     12  [mylan] 
     13 
     14- Updated comments viewlet - now comment form present 
     15  without needing to push on 'Add comment' button. 
     16  [mylan] 
    1117 
    12184.0.1 (2009-06-05) 
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/browser/comments.pt

    r1204 r1222  
    88                   isAjaxReportAbuseEnabled view/ajax_report_abuse_enabled; 
    99                   isAnonymousReportAbuseEnabled view/anonymous_report_abuse_enabled; 
    10                    isReportAbuseEnabled python:isAnonymousReportAbuseEnabled or not isAnon and isAuthenticatedReportAbuseEnabled" 
     10                   isReportAbuseEnabled python:isAnonymousReportAbuseEnabled or not isAnon and isAuthenticatedReportAbuseEnabled; 
     11                   foo context/@@plone/globalize; 
     12                   props_sheet here/portal_properties/qPloneComments; 
     13                   require_email python:props_sheet.getProperty('require_email');" 
    1114                   i18n:domain="plone"> 
    1215    <div class="discussion" 
    1316         tal:condition="python:replies or (userHasReplyPermission and isDiscussionAllowed) or (isAnon and not userHasReplyPermission and isDiscussionAllowed)"> 
    14         <form name="reply" 
    15               action="" 
    16               method="post" 
    17               tal:condition="python:userHasReplyPermission and isDiscussionAllowed" 
    18               tal:attributes="action string:${context/absolute_url}/discussion_reply_form#discussion"> 
    19  
    20               <input class="standalone" 
    21                      style="margin-bottom: 1.25em;" 
    22                      type="submit" 
    23                      value="Add Comment" 
    24                      i18n:attributes="value label_add_comment;" 
    25                      /> 
    26         </form> 
    27         <form tal:condition="python:isAnon and not userHasReplyPermission and isDiscussionAllowed" 
    28               tal:attributes="action view/login_action"> 
    29             <input class="standalone" 
    30                    style="margin-bottom: 1.25em;" 
    31                    type="submit" 
    32                    value="Log in to add comments" 
    33                    i18n:attributes="value label_login_to_add_comments;" 
    34                    /> 
    35         </form> 
    3617 
    3718        <tal:getreplies repeat="reply_dict replies"> 
     
    8162                           value="Reply" 
    8263                           i18n:attributes="value label_reply;" 
     64                           /> 
     65                </form> 
     66                <form name="edit" 
     67                      action="discussion_edit_form" 
     68                      method="post" 
     69                      style="display: inline;" 
     70                      tal:attributes="action string:${reply/absolute_url}/discussion_edit_form" 
     71                      tal:condition="isModerationAllowed"> 
     72                    <input class="standalone" 
     73                           type="submit" 
     74                           value="Edit" 
     75                           i18n:attributes="value label_edit;" 
    8376                           /> 
    8477                </form> 
     
    138131            </div> 
    139132        </tal:getreplies> 
     133 
     134        <!-- Start of Adding comment form--> 
     135        <tal:addcomment define="template_id string:discussion_reply_form;"> 
     136            <metal:block metal:use-macro="here/discussion_reply_form/macros/add-comment-form" /> 
     137        </tal:addcomment> 
     138        <!-- End of Adding comment form --> 
     139 
     140        <form tal:condition="python:isAnon and not userHasReplyPermission and isDiscussionAllowed" 
     141              tal:attributes="action view/login_action"> 
     142            <input class="standalone" 
     143                   style="margin-bottom: 1.25em;" 
     144                   type="submit" 
     145                   value="Log in to add comments" 
     146                   i18n:attributes="value label_login_to_add_comments;" 
     147                   /> 
     148        </form> 
     149 
    140150    </div> 
    141151</tal:block> 
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_reply_form.cpt

    r822 r1222  
    6262    <a name="discussion"></a> 
    6363 
     64    <metal:block metal:define-macro="add-comment-form"> 
     65 
    6466    <form name="edit_form" 
    6567          class="enableAutoFocus" 
     
    248250    </form> 
    249251 
     252    </metal:block> 
     253 
    250254</div> 
    251255 
Note: See TracChangeset for help on using the changeset viewer.