diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-09-26 01:40:05 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-09-26 01:40:05 +0000 |
commit | c9efc7e0bf4db8a8e8381afdfa5a182300e25ae8 (patch) | |
tree | eefaca5cd2a2f70ababe02d08f7f6a5135f7c9ad /template | |
parent | 0db762f1f53b25e15d183a0caf2a232c4f79eaff (diff) |
- put the privacy level change select last in the table, added title attribute for the rating stars
git-svn-id: http://piwigo.org/svn/trunk@2594 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | template/yoga/picture.tpl | 81 |
1 files changed, 41 insertions, 40 deletions
diff --git a/template/yoga/picture.tpl b/template/yoga/picture.tpl index e86e24ee9..756434c4a 100644 --- a/template/yoga/picture.tpl +++ b/template/yoga/picture.tpl @@ -153,45 +153,20 @@ y.callService( <td class="label">{'Visits'|@translate}</td> <td class="value">{$INFO_VISITS}</td> </tr> - {if isset($available_permission_levels) } - <tr> - <td class="label">{'Privacy level'|@translate}:</td> - <td class="value"> -<script type="text/javascript"> -{literal}function setPrivacyLevel(selectElement, rootUrl, id, level) -{ -selectElement.disabled = true; -var y = new PwgWS(rootUrl); -y.callService( - "pwg.images.setPrivacyLevel", {image_id: id, level:level} , - { - onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); }, - onSuccess: function(result) { selectElement.disabled = false; } - } - ); -}{/literal} -</script> - <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)"> - {foreach from=$available_permission_levels item=level} - <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option> - {/foreach} - </select> - </td></tr> - {/if} - {if isset($rate_summary) } - <tr> - <td class="label">{'Average rate'|@translate}</td> - <td class="value" id="ratingSummary"> - {if $rate_summary.count} - {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate } - {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) } - {else} - {'no_rate'|@translate} - {/if} - </td> - </tr> - {/if} +{if isset($rate_summary) } + <tr> + <td class="label">{'Average rate'|@translate}</td> + <td class="value" id="ratingSummary"> + {if $rate_summary.count} + {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate } + {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) } + {else} + {'no_rate'|@translate} + {/if} + </td> + </tr> +{/if} {if isset($rating)} <tr> @@ -204,9 +179,9 @@ y.callService( {foreach from=$rating.marks item=mark name=rate_loop} {if !$smarty.foreach.rate_loop.first} | {/if} {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} - <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" /> + <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" /> {else} - <input type="submit" name="rate" value="{$mark}" class="rateButton" /> + <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" /> {/if} {/foreach} <script type="text/javascript" src="{$ROOT_URL}template/{$themeconf.template}/rating.js"></script> @@ -221,6 +196,32 @@ y.callService( </tr> {/if} +{if isset($available_permission_levels) } + <tr> + <td class="label">{'Privacy level'|@translate}:</td> + <td class="value"> +<script type="text/javascript"> +{literal}function setPrivacyLevel(selectElement, rootUrl, id, level) +{ +selectElement.disabled = true; +var y = new PwgWS(rootUrl); +y.callService( + "pwg.images.setPrivacyLevel", {image_id: id, level:level} , + { + onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); }, + onSuccess: function(result) { selectElement.disabled = false; } + } + ); +}{/literal} +</script> + <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)"> + {foreach from=$available_permission_levels item=level} + <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option> + {/foreach} + </select> + </td></tr> +{/if} + </table> {if isset($metadata)} |