mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-01 15:32:23 +02:00
41d5c8a258
For these pages : picture modify, album notification, category permission, comments, menubar, all configurations, site update, element set ranks, notification by mail Change how success and errors messages are displayed and handled
118 lines
3.8 KiB
Smarty
118 lines
3.8 KiB
Smarty
{footer_script}
|
|
jQuery(document).ready(function(){
|
|
$("h1").append("<span class='badge-number'>"+{$nb_total}+"</span>");
|
|
|
|
function highlighComments() {
|
|
jQuery(".checkComment").each(function() {
|
|
var parent = jQuery(this).parent('tr');
|
|
if (jQuery(this).children("input[type=checkbox]").is(':checked')) {
|
|
jQuery(parent).addClass('selectedComment');
|
|
}
|
|
else {
|
|
jQuery(parent).removeClass('selectedComment');
|
|
}
|
|
});
|
|
}
|
|
|
|
jQuery(".checkComment").click(function(event) {
|
|
var checkbox = jQuery(this).children("input[type=checkbox]");
|
|
if (event.target.type !== 'checkbox') {
|
|
jQuery(checkbox).prop('checked', !jQuery(checkbox).prop('checked'));
|
|
}
|
|
highlighComments();
|
|
});
|
|
|
|
jQuery("#commentSelectAll").click(function () {
|
|
jQuery(".checkComment input[type=checkbox]").prop('checked', true);
|
|
highlighComments();
|
|
return false;
|
|
});
|
|
|
|
jQuery("#commentSelectNone").click(function () {
|
|
jQuery(".checkComment input[type=checkbox]").prop('checked', false);
|
|
highlighComments();
|
|
return false;
|
|
});
|
|
|
|
jQuery("#commentSelectInvert").click(function () {
|
|
jQuery(".checkComment input[type=checkbox]").each(function() {
|
|
jQuery(this).prop('checked', !$(this).prop('checked'));
|
|
});
|
|
highlighComments();
|
|
return false;
|
|
});
|
|
|
|
});
|
|
{/footer_script}
|
|
|
|
<div class="commentFilter">
|
|
<a href="{$F_ACTION}&filter=all" class="{if $filter == 'all'}commentFilterSelected{/if}">{'All'|@translate}</a> ({$nb_total})
|
|
| <a href="{$F_ACTION}&filter=pending" class="{if $filter == 'pending'}commentFilterSelected{/if}">{'Waiting'|@translate}</a> ({$nb_pending})
|
|
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
|
|
</div>
|
|
|
|
|
|
|
|
{if !empty($comments) }
|
|
<form method="post" action="{$F_ACTION}" id="pendingComments">
|
|
|
|
<table>
|
|
{foreach from=$comments item=comment name=comment}
|
|
<tr valign="top" class="{if $smarty.foreach.comment.index is odd}row2{else}row1{/if}">
|
|
<td style="width:50px;" class="checkComment">
|
|
<input type="checkbox" name="comments[]" value="{$comment.ID}">
|
|
</td>
|
|
<td>
|
|
<div class="comment">
|
|
<a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}"></a>
|
|
<p class="commentHeader">{if $comment.IS_PENDING}<span class="pendingFlag">{'Waiting'|@translate}</span> - {/if}{if !empty($comment.IP)}{$comment.IP} - {/if}<strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
|
|
<blockquote>{$comment.CONTENT}</blockquote>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</table>
|
|
|
|
<p class="checkActions">
|
|
{'Select:'|@translate}
|
|
<a href="#" id="commentSelectAll">{'All'|@translate}</a>,
|
|
<a href="#" id="commentSelectNone">{'None'|@translate}</a>,
|
|
<a href="#" id="commentSelectInvert">{'Invert'|@translate}</a>
|
|
</p>
|
|
|
|
<div class="savebar-footer">
|
|
<div class="savebar-footer-start">
|
|
</div>
|
|
<div class="savebar-footer-end">
|
|
{if isset($save_success)}
|
|
<div class="savebar-footer-block">
|
|
<div class="badge info-message">
|
|
<i class="icon-ok"></i>{$save_success}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{if isset($save_error)}
|
|
<div class="savebar-footer-block">
|
|
<div class="badge info-error">
|
|
<i class="icon-cancel-circled"></i>{$save_error}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{if isset($save_warning)}
|
|
<div class="savebar-footer-block">
|
|
<div class="badge info-warning">
|
|
<i class="icon-attention"></i>{$save_warning}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<div class="savebar-footer-block">
|
|
<button class="buttonSecond" type="submit" name="reject" value="{'Reject'|@translate}"><i class="icon-floppy"></i> {'Reject'|@translate}</button>
|
|
<button class="buttonLike" type="submit" name="validate" value="{'Validate'|@translate}"><i class="icon-floppy"></i> {'Validate'|@translate}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</form>
|
|
{/if}
|