From 2f87684e097c087b18b6630878e5545c5c37699e Mon Sep 17 00:00:00 2001 From: rvelices Date: Mon, 14 Nov 2011 20:10:37 +0000 Subject: feature 2486: Add an admin view for rates by user git-svn-id: http://piwigo.org/svn/trunk@12624 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/rating_user.tpl | 76 +++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 admin/themes/default/template/rating_user.tpl (limited to 'admin/themes/default') diff --git a/admin/themes/default/template/rating_user.tpl b/admin/themes/default/template/rating_user.tpl new file mode 100644 index 000000000..b69815528 --- /dev/null +++ b/admin/themes/default/template/rating_user.tpl @@ -0,0 +1,76 @@ +
+
+ + + + + +
+
+ +{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} +{footer_script}{literal} +function del(elt,uid,aid) +{ + if (!confirm('{'Are you sure?'|@translate|@escape:'javascript'}')) + return false; + var tr = elt; + while ( tr.nodeName != "TR") tr = tr.parentNode; + tr = jQuery(tr).fadeTo(1000, 0.4); + var ws = new PwgWS({/literal}'{$ROOT_URL|@escape:javascript}'{literal}); + ws.callService( + 'pwg.rates.delete', {user_id:uid, anonymous_id:aid}, + { + method: 'POST', + onFailure: function(num, text) { tr.stop(); tr.fadeTo(0,1); alert(num + " " + text); }, + onSuccess: function(result) { if (result) {tr.remove();} else alert(result); } + } + ); + return false; +} +{/literal}{/footer_script} + + + + + + + +{foreach from=$available_rates item=rate} + +{/foreach} + + +{foreach from=$ratings item=rating key=user} + + + + + + + {foreach from=$rating.rates item=rates key=rate} + + {/foreach} + + +{/foreach} +
{'Username'|@translate}{'Number of rates'|@translate}{'Average rate'|@translate}StDevCV{$rate}
{$user}{$rating.count}{$rating.avg|@number_format:2}{$rating.std|@number_format:3}{$rating.cv|@number_format:3}{if !empty($rates)} + {capture assign=rate_over}{foreach from=$rates item=rate_arr}thumb-{$rate_arr.id} + {/foreach}{/capture} + {$rates|@count} + {/if}[{'Delete'|@translate}]
+ +{combine_script id='jquery.cluetip' load='footer' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'} +{footer_script require='jquery.cluetip'} +{literal} + jQuery('.cluetip').cluetip({ + width: 350, splitTitle: '|' + }); +{/literal} +{/footer_script} \ No newline at end of file -- cgit v1.2.3