fixes #2313 remove privacy level from gallery

and anything related to having this configuration here
This commit is contained in:
HWFord 2025-01-21 15:27:28 +01:00
parent 28a676b2d9
commit 38bce29b33
4 changed files with 0 additions and 43 deletions

View file

@ -109,7 +109,6 @@ $display_info_checkboxes = array(
'categories',
'visits',
'rating_score',
'privacy_level',
);
// image order management

View file

@ -313,13 +313,6 @@
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[privacy_level]" {if ($display.picture_informations.privacy_level)}checked="checked"{/if}>
{'Who can see this photo?'|translate} <span class="adminOnlyIcon tiptip" title="{'available for administrators only'|translate}"><i class="icon-users"></i> {'administrators'}</span>
</label>
</li>
</ul>
</fieldset>

View file

@ -799,7 +799,6 @@ if (is_admin())
);
}
$template->assign('available_permission_levels', get_privacy_level_options());
}
// favorite manipulation

View file

@ -297,40 +297,6 @@ y.callService(
</div>
{/if}
{if $display_info.privacy_level and isset($available_permission_levels)}
<div id="Privacy" class="imageInfo">
<dt>{'Who can see this photo?'|@translate}</dt>
<dd>
<div>
<a id="privacyLevelLink" href>{$available_permission_levels[$current.level]}</a>
</div>
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
{footer_script require='jquery'}{strip}
function setPrivacyLevel(id, level){
(new PwgWS('{$ROOT_URL}')).callService(
"pwg.images.setPrivacyLevel", { image_id:id, level:level},
{
method: "POST",
onFailure: function(num, text) { alert(num + " " + text); },
onSuccess: function(result) {
jQuery('#privacyLevelBox .switchCheck').css('visibility','hidden');
jQuery('#switchLevel'+level).prev('.switchCheck').css('visibility','visible');
jQuery('#privacyLevelLink').text(jQuery('#switchLevel'+level).text());
}
}
);
}
(window.SwitchBox=window.SwitchBox||[]).push("#privacyLevelLink", "#privacyLevelBox");
{/strip}{/footer_script}
<div id="privacyLevelBox" class="switchBox" style="display:none">
{foreach from=$available_permission_levels item=label key=level}
<span class="switchCheck"{if $level != $current.level} style="visibility:hidden"{/if}>&#x2714; </span>
<a id="switchLevel{$level}" href="javascript:setPrivacyLevel({$current.id},{$level})">{$label}</a><br>
{/foreach}
</div>
</dd>
</div>
{/if}
{/strip}
</dl>