Changeset 26065 for extensions/GuestBook/template
- Timestamp:
- Dec 21, 2013, 5:33:24 PM (11 years ago)
- Location:
- extensions/GuestBook/template
- Files:
-
- 1 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GuestBook/template/comment_list.tpl
r20181 r26065 6 6 <div class="actions" style="float:right;font-size:90%"> 7 7 {if isset($comment.U_DELETE)} 8 <a href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'| @translate|@escape:javascript}');">9 {'Delete'| @translate}8 <a href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'|translate|@escape:javascript}');"> 9 {'Delete'|translate} 10 10 </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT) or isset($comment.U_CANCEL)} | {/if} 11 11 {/if} 12 12 {if isset($comment.U_CANCEL)} 13 13 <a href="{$comment.U_CANCEL}"> 14 {'Cancel'| @translate}14 {'Cancel'|translate} 15 15 </a>{if isset($comment.U_VALIDATE)} | {/if} 16 16 {/if} 17 17 {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)} 18 18 <a class="editComment" href="{$comment.U_EDIT}#edit_comment"> 19 {'Edit'| @translate}19 {'Edit'|translate} 20 20 </a>{if isset($comment.U_VALIDATE)} | {/if} 21 21 {/if} 22 22 {if isset($comment.U_VALIDATE)} 23 23 <a href="{$comment.U_VALIDATE}"> 24 {'Validate'| @translate}24 {'Validate'|translate} 25 25 </a> 26 26 {/if} … … 37 37 38 38 <div class="commentHeader"> 39 {'%s says on %s :'| @translate|@sprintf:$author:$date}<br>39 {'%s says on %s :'|translate:$author:$date}<br> 40 40 {if $comment.STARS}{$comment.STARS}{/if} 41 41 {if $comment.EMAIL} <a href="mailto:{$comment.EMAIL}">{$comment.EMAIL}</a>{/if} … … 44 44 <a name="edit_comment"></a> 45 45 <form method="post" action="{$comment.U_EDIT}" id="editComment"> 46 <p><label>{'Edit a comment'| @translate} :</label></p>46 <p><label>{'Edit a comment'|translate} :</label></p> 47 47 <p><textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></p> 48 48 <p><input type="hidden" name="key" value="{$comment.KEY}"> 49 49 <input type="hidden" name="pwg_token" value="{$comment.PWG_TOKEN}"> 50 50 <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}"> 51 <input type="submit" value="{'Submit'| @translate}">51 <input type="submit" value="{'Submit'|translate}"> 52 52 </p> 53 53 </form> -
extensions/GuestBook/template/guestbook.tpl
r25786 r26065 1 {combine_css path=$GUESTBOOK_PATH| @cat:"template/style.css"}2 {combine_script id= "livevalidation" load="footer" path=$GUESTBOOK_PATH|@cat:"template/livevalidation.min.js"}1 {combine_css path=$GUESTBOOK_PATH|cat:'template/style.css'} 2 {combine_script id='livevalidation' load='footer' path=$GUESTBOOK_PATH|cat:'template/livevalidation.min.js'} 3 3 4 4 {footer_script require='jquery,livevalidation'} 5 {if !$comment_add.IS_LOGGED} 6 var author = new LiveValidation('author', {ldelim} onlyOnSubmit: true }); 7 author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your username'|@translate}" }); 8 {/if} 5 (function() { 6 {if !$comment_add.IS_LOGGED} 7 var author = new LiveValidation('author', {ldelim} onlyOnSubmit: true }); 8 author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your username'|translate}" }); 9 {/if} 9 10 10 {if $comment_add.EMAIL_MANDATORY and (!$comment_add.IS_LOGGED or empty($comment_add.EMAIL))}11 var email = new LiveValidation('email', {ldelim} onlyOnSubmit: true });12 email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your e-mail'|@translate}" });13 email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'|@translate}" });14 {/if}11 {if $comment_add.EMAIL_MANDATORY and (!$comment_add.IS_LOGGED or empty($comment_add.EMAIL))} 12 var email = new LiveValidation('email', {ldelim} onlyOnSubmit: true }); 13 email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your e-mail'|translate}" }); 14 email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'|translate}" }); 15 {/if} 15 16 16 var website = new LiveValidation('website', {ldelim} onlyOnSubmit: true });17 website.add(Validate.Format, {ldelim} pattern: /^https?:\/\/[^\s\/$.?#].[^\s]*$/i,18 failureMessage: "{'invalid website address'|@translate}"});17 var website = new LiveValidation('website', {ldelim} onlyOnSubmit: true }); 18 website.add(Validate.Format, {ldelim} pattern: /^https?:\/\/[^\s\/$.?#].[^\s]*$/i, 19 failureMessage: "{'invalid website address'|translate}"}); 19 20 20 var content = new LiveValidation('contentid', {ldelim} onlyOnSubmit: true });21 content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|@translate}" });21 var content = new LiveValidation('contentid', {ldelim} onlyOnSubmit: true }); 22 content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|translate}" }); 22 23 23 jQuery("#addComment").hide(); 24 jQuery("#guestbookAdd").css('width','180px'); 25 jQuery("#expandForm").click(function() {ldelim} 26 jQuery("#guestbookAdd").animate({ldelim}"width": "550px"}, function() {ldelim} 27 jQuery("#expandForm").slideUp(); 28 jQuery("#addComment").slideDown("slow"); 24 {if !isset($GB_OPEN)} 25 jQuery('#addComment').hide(); 26 jQuery('#guestbookAdd').css('width', '180px'); 27 jQuery('#expandForm').click(function() {ldelim} 28 jQuery('#guestbookAdd').animate({ldelim}'width': '550px'}, function() {ldelim} 29 jQuery('#expandForm').slideUp(); 30 jQuery('#addComment').slideDown('slow'); 31 }); 29 32 }); 30 }); 33 {/if} 31 34 32 jQuery("#website").on('blur', function() {ldelim} 33 var val = $(this).val(); 34 if (val.substr(0, 4) != 'http') {ldelim} 35 $(this).val('http://'+ val); 36 } 37 }); 35 jQuery('#website').on('blur', function() {ldelim} 36 var val = $(this).val(); 37 if (val.substr(0, 4) != 'http') {ldelim} 38 $(this).val('http://'+ val); 39 } 40 }); 41 }()); 38 42 {/footer_script} 39 43 40 44 {if $comment_add.ACTIVATE_RATING} 41 {combine_script id= "jquery.raty" path=$GUESTBOOK_PATH|@cat:"template/jquery.raty/jquery.raty.min.js"}45 {combine_script id='jquery.raty' path=$GUESTBOOK_PATH|cat:'template/jquery.raty/jquery.raty.min.js'} 42 46 {footer_script} 43 jQuery( "#comment_rate").raty({ldelim}44 path: "{$ROOT_URL}{$GUESTBOOK_PATH}template/jquery.raty/",47 jQuery('#comment_rate').raty({ldelim} 48 path: '{$ROOT_URL}{$GUESTBOOK_PATH}template/jquery.raty/', 45 49 half: true 46 50 }); … … 49 53 50 54 51 {* <!-- Menubar & titrePage --> *}52 {if $themeconf.name == "stripped" or $themeconf.parent == "stripped"}53 {include file=$ABS_GUESTBOOK_PATH|@cat:'template/themes/stripped.tpl'}54 {assign var="clear" value="true"}55 {elseif $themeconf.name == "simple-grey" or $themeconf.parent == "simple"}56 {include file=$ABS_GUESTBOOK_PATH|@cat:'template/themes/simple.tpl'}57 {assign var="clear" value="true"}58 {else}59 {include file=$ABS_GUESTBOOK_PATH|@cat:'template/themes/default.tpl'}60 {/if}61 62 {if isset($errors) or not empty($infos)}63 {include file='infos_errors.tpl'}64 {/if}65 66 67 55 {if isset($comment_add)} 68 56 <div id="guestbookAdd"> 69 <h4 id="expandForm">{'Sign the guestbook'| @translate}</h4>57 <h4 id="expandForm">{'Sign the guestbook'|translate}</h4> 70 58 <form method="post" action="{$comment_add.F_ACTION}" id="addComment" class="contact"> 71 59 <table> … … 73 61 <tr> 74 62 <td> 75 <label for="author">{'Author'| @translate}* :</label>63 <label for="author">{'Author'|translate}* :</label> 76 64 {if $comment_add.IS_LOGGED} 77 65 {$comment_add.AUTHOR} … … 82 70 </td> 83 71 <td> 84 <label for="email">{'Email address'| @translate}{if $comment_add.EMAIL_MANDATORY}*{/if} ({'not publicly visible'|@translate}) :</label>72 <label for="email">{'Email address'|translate}{if $comment_add.EMAIL_MANDATORY}*{/if} ({'not publicly visible'|translate}) :</label> 85 73 <input type="text" name="email" id="email" value="{$comment_add.EMAIL}"> 86 74 </td> … … 90 78 {if $comment_add.ACTIVATE_RATING} 91 79 <td> 92 <label>{'Rate'| @translate} :</label>80 <label>{'Rate'|translate} :</label> 93 81 <span id="comment_rate"></span> 94 82 </td> 95 83 {/if} 96 84 <td> 97 <label for="website">{'Website'| @translate} :</label>85 <label for="website">{'Website'|translate} :</label> 98 86 <input type="text" name="website" id="website" value="{$comment_add.WEBSITE}"> 99 87 </td> … … 101 89 <tr> 102 90 <td colspan="2"> 103 <label for="contentid">{'Comment'| @translate}* :</label>91 <label for="contentid">{'Comment'|translate}* :</label> 104 92 <textarea name="content" id="contentid" rows="7">{$comment_add.CONTENT}</textarea> 105 93 </td> … … 107 95 <tr> 108 96 <td colspan="2"> 109 <input type="submit" value="{'Send'| @translate}">110 {'* : mandatory fields'| @translate}97 <input type="submit" value="{'Send'|translate}"> 98 {'* : mandatory fields'|translate} 111 99 </td> 112 100 </tr> … … 118 106 {/if} 119 107 120 <p class="comment_count">{'There are %d messages'| @translate|@sprintf:$COMMENT_COUNT}</p>108 <p class="comment_count">{'There are %d messages'|translate:$COMMENT_COUNT}</p> 121 109 122 110 {if isset($comments)} … … 124 112 {if !empty($navbar)} 125 113 <div id="pictureCommentNavBar"> 126 {include file='navigation_bar.tpl'| @get_extent:'navbar'}114 {include file='navigation_bar.tpl'|get_extent:'navbar'} 127 115 </div> 128 116 {/if} 129 {include file=$ABS_GUESTBOOK_PATH| @cat:'template/comment_list.tpl'}117 {include file=$ABS_GUESTBOOK_PATH|cat:'template/comment_list.tpl'} 130 118 </div> 131 119 {/if} 132 133 {if $clear}<div style="clear: both;"></div>134 </div>{/if}135 </div>{* <!-- content --> *}
Note: See TracChangeset
for help on using the changeset viewer.