Changeset 32176 for extensions
- Timestamp:
- May 3, 2020, 2:40:14 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/manage_properties_photos/initpicture.php
r32151 r32176 274 274 <dt class="col-sm-5">{\'Albums\'|@translate}</dt> 275 275 <dd class="col-sm-7"> 276 <ul> 277 {foreach from=$related_categories item=cat} 278 <li>{$cat}</li> 279 {/foreach} 280 </ul> 276 {foreach from=$related_categories item=cat name=cat_loop} 277 {if !$smarty.foreach.cat_loop.first}<br />{/if}{$cat} 278 {/foreach} 281 279 </dd> 282 280 </dl> … … 303 301 </div> 304 302 {if isset($rating)} 305 <div id="rating" class="imageInfo"> 306 <dl class="row mb-0"> 307 <dt class="col-sm-5"> 308 <span id="updateRate">{if isset($rating.USER_RATE)}{\'Update your rating\'|@translate}{else}{\'Rate this photo\'|@translate}{/if}</span> 309 </dt> 310 <dd class="col-sm-7"> 311 <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> 312 <div> 313 {foreach from=$rating.marks item=mark name=rate_loop} 314 {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} 315 <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> 316 {else} 317 <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> 318 {/if} 319 {/foreach} 320 {strip}{combine_script id=\'core.scripts\' load=\'async\' path=\'themes/default/js/scripts.js\'} 321 {combine_script id=\'rating\' load=\'async\' require=\'core.scripts\' path=\'themes/default/js/rating.js\'} 322 {footer_script} 323 var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; 324 _pwgRatingAutoQueue.push( {ldelim}rootUrl: \'{$ROOT_URL}\', image_id: {$current.id}, 325 onSuccess : function(rating) {ldelim} 326 var e = document.getElementById("updateRate"); 327 if (e) e.innerHTML = "{\'Update your rating\'|@translate|@escape:\'javascript\'}"; 328 e = document.getElementById("ratingScore"); 329 if (e) e.innerHTML = rating.score; 330 e = document.getElementById("ratingCount"); 331 if (e) {ldelim} 332 if (rating.count == 1) {ldelim} 333 e.innerHTML = "({\'%d rate\'|@translate|@escape:\'javascript\'})".replace( "%d", rating.count); 334 } else {ldelim} 335 e.innerHTML = "({\'%d rates\'|@translate|@escape:\'javascript\'})".replace( "%d", rating.count); 336 } 337 {rdelim} 338 {rdelim}{rdelim} ); 339 {/footer_script} 340 {/strip} 341 </div> 342 </form> 343 </dd> 344 </dl> 345 </div> 346 {/if} 303 <div id="rating" class="imageInfo"> 304 <dl class="row mb-0"> 305 <dt class="col-sm-5" id="updateRate">{if isset($rating.USER_RATE)}{\'Update your rating\'|@translate}{else}{\'Rate this photo\'|@translate}{/if}</dt> 306 <dd class="col-sm-7"> 307 <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> 308 <div> 309 {foreach from=$rating.marks item=mark name=rate_loop} 310 {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} 311 <span class="rateButtonStarFull" data-value="{$mark}"></span> 312 {else} 313 <span class="rateButtonStarEmpty" data-value="{$mark}"></span> 314 {/if} 315 {/foreach} 316 {strip}{combine_script id=\'core.scripts\' path=\'themes/default/js/scripts.js\' load=\'async\'} 317 {combine_script id=\'rating\' require=\'core.scripts\' path=\'themes/bootstrap_darkroom/js/rating.js\' load=\'async\'} 318 {footer_script require=\'jquery\'} 319 var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; 320 _pwgRatingAutoQueue.push( {ldelim}rootUrl: \'{$ROOT_URL}\', image_id: {$current.id}, 321 onSuccess : function(rating) {ldelim} 322 var e = document.getElementById("updateRate"); 323 if (e) e.innerHTML = "{\'Update your rating\'|@translate|@escape:\'javascript\'}"; 324 e = document.getElementById("ratingScore"); 325 if (e) e.innerHTML = rating.score; 326 e = document.getElementById("ratingCount"); 327 if (e) {ldelim} 328 if (rating.count == 1) {ldelim} 329 e.innerHTML = "({\'%d rate\'|@translate|@escape:\'javascript\'})".replace( "%d", rating.count); 330 {rdelim} else {ldelim} 331 e.innerHTML = "({\'%d rates\'|@translate|@escape:\'javascript\'})".replace( "%d", rating.count); 332 {rdelim} 333 {rdelim} 334 $(\'#averageRate\').find(\'span\').each(function() {ldelim} 335 $(this).addClass(rating.average > $(this).data(\'value\') - 0.5 ? \'rateButtonStarFull\' : \'rateButtonStarEmpty\'); 336 $(this).removeClass(rating.average > $(this).data(\'value\') - 0.5 ? \'rateButtonStarEmpty\' : \'rateButtonStarFull\'); 337 {rdelim}); 338 {rdelim} 339 {rdelim}); 340 {/footer_script} 341 {/strip} 342 </div> 343 </form> 344 </dd> 345 </dl> 346 </div> 347 {/if} 347 348 {else if $addinfophotos.AIPID == 11 and $display_info.privacy_level and isset($available_permission_levels)} 348 349 <div id="Privacy" class="imageInfo"> … … 611 612 <th scope="row">{\'Albums\'|@translate}</th> 612 613 <td> 613 <ul> 614 {foreach from=$related_categories item=cat} 615 <li>{$cat}</li> 616 {/foreach} 617 </ul> 614 {foreach from=$related_categories item=cat name=cat_loop} 615 {if !$smarty.foreach.cat_loop.first}<br />{/if}{$cat} 616 {/foreach} 618 617 </td> 619 618 </tr> … … 642 641 <div id="rating" class="imageInfo"> 643 642 <tr> 644 <th scope="row"> 645 <span id="updateRate">{if isset($rating.USER_RATE)}{\'Update your rating\'|@translate}{else}{\'Rate this photo\'|@translate}{/if}</span> 646 </th> 643 <th scope="row" id="updateRate">{if isset($rating.USER_RATE)}{\'Update your rating\'|@translate}{else}{\'Rate this photo\'|@translate}{/if}</th> 647 644 <td> 648 <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> 649 <div> 650 {foreach from=$rating.marks item=mark name=rate_loop} 651 {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} 652 <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> 653 {else} 654 <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> 655 {/if} 656 {/foreach} 657 {strip}{combine_script id=\'core.scripts\' load=\'async\' path=\'themes/default/js/scripts.js\'} 658 {combine_script id=\'rating\' load=\'async\' require=\'core.scripts\' path=\'themes/default/js/rating.js\'} 659 {footer_script} 660 var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; 661 _pwgRatingAutoQueue.push( {ldelim}rootUrl: \'{$ROOT_URL}\', image_id: {$current.id}, 645 <div id="rating" class="imageInfo"> 646 <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> 647 <div> 648 {foreach from=$rating.marks item=mark name=rate_loop} 649 {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} 650 <span class="rateButtonStarFull" data-value="{$mark}"></span> 651 {else} 652 <span class="rateButtonStarEmpty" data-value="{$mark}"></span> 653 {/if} 654 {/foreach} 655 {strip}{combine_script id=\'core.scripts\' path=\'themes/default/js/scripts.js\' load=\'async\'} 656 {combine_script id=\'rating\' require=\'core.scripts\' path=\'themes/bootstrap_darkroom/js/rating.js\' load=\'async\'} 657 {footer_script require=\'jquery\'} 658 var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; 659 _pwgRatingAutoQueue.push( {ldelim}rootUrl: \'{$ROOT_URL}\', image_id: {$current.id}, 662 660 onSuccess : function(rating) {ldelim} 663 664 665 666 667 668 669 670 671 } else {ldelim}661 var e = document.getElementById("updateRate"); 662 if (e) e.innerHTML = "{\'Update your rating\'|@translate|@escape:\'javascript\'}"; 663 e = document.getElementById("ratingScore"); 664 if (e) e.innerHTML = rating.score; 665 e = document.getElementById("ratingCount"); 666 if (e) {ldelim} 667 if (rating.count == 1) {ldelim} 668 e.innerHTML = "({\'%d rate\'|@translate|@escape:\'javascript\'})".replace( "%d", rating.count); 669 {rdelim} else {ldelim} 672 670 e.innerHTML = "({\'%d rates\'|@translate|@escape:\'javascript\'})".replace( "%d", rating.count); 673 } 674 {rdelim} 675 {rdelim}{rdelim} ); 676 {/footer_script} 677 {/strip} 671 {rdelim} 672 {rdelim} 673 $(\'#averageRate\').find(\'span\').each(function() {ldelim} 674 $(this).addClass(rating.average > $(this).data(\'value\') - 0.5 ? \'rateButtonStarFull\' : \'rateButtonStarEmpty\'); 675 $(this).removeClass(rating.average > $(this).data(\'value\') - 0.5 ? \'rateButtonStarEmpty\' : \'rateButtonStarFull\'); 676 {rdelim}); 677 {rdelim} 678 {rdelim}); 679 {/footer_script} 680 {/strip} 681 </div> 682 </form> 678 683 </div> 679 </form>680 684 </td> 681 685 </tr> 682 686 </div> 683 687 {/if}
Note: See TracChangeset
for help on using the changeset viewer.