I would like the users to be able to change the sort order, specifically by rating. It would be convenient after they're done grading pictures.
TIA
You as the admin can change the sort order. Then once the user has rated the items and refresh thy should chnage the order. Allowing users to change sort order would be a bit of code change to bypass permissions.
Dave _____________________________________________ Blog & G2 || floridave - Gallery Team
I tested something. I added this code to the Album template file:
<h2> {g->text text="Sort order"} </h2> <p class="giDescription"> {g->text text="This sets the sort order for the album. This applies to all current items, and any newly added items."} </p> <select name="{g->formVar var="form[orderBy]"}" onchange="pickOrder()"> {html_options options=$ItemEditAlbum.orderByList selected=$form.orderBy} </select> <select name="{g->formVar var="form[orderDirection]"}"> {html_options options=$ItemEditAlbum.orderDirectionList selected=$form.orderDirection} </select> {g->text text="with"} <select name="{g->formVar var="form[presort]"}" type="hidden"> {html_options options=$ItemEditAlbum.presortList selected=$form.presort} </select><br/> {g->changeInDescendents module="sort" text="Apply to all subalbums"} <script type="text/javascript"> // <![CDATA[ function pickOrder() {ldelim} var list = '{g->formVar var="form[orderBy]"}'; var frm = document.getElementById('itemAdminForm'); var index = frm.elements .selectedIndex; list = '{g->formVar var="form[orderDirection]"}'; frm.elements .disabled = (index <= 1) ?1:0; list = '{g->formVar var="form[presort]"}'; frm.elements .disabled = (index <= 1) ?1:0; {rdelim} pickOrder(); // ]]> </script>
<p class="giDescription"> {g->text text="This sets the sort order for the album. This applies to all current items, and any newly added items."} </p>
<select name="{g->formVar var="form[orderBy]"}" onchange="pickOrder()"> {html_options options=$ItemEditAlbum.orderByList selected=$form.orderBy} </select> <select name="{g->formVar var="form[orderDirection]"}"> {html_options options=$ItemEditAlbum.orderDirectionList selected=$form.orderDirection} </select> {g->text text="with"} <select name="{g->formVar var="form[presort]"}" type="hidden"> {html_options options=$ItemEditAlbum.presortList selected=$form.presort} </select><br/> {g->changeInDescendents module="sort" text="Apply to all subalbums"} <script type="text/javascript"> // <![CDATA[ function pickOrder() {ldelim} var list = '{g->formVar var="form[orderBy]"}'; var frm = document.getElementById('itemAdminForm'); var index = frm.elements
It shows the form, but since the user doesn't have the "Edit item" permission for the album, the drop down fields are just empty.
And yes, I understand I can change the sort order later, but I want them to do it on their own.
Is the permissions bypass complicated?
Posts: 27300
You as the admin can change the sort order. Then once the user has rated the items and refresh thy should chnage the order.
Allowing users to change sort order would be a bit of code change to bypass permissions.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 46
I tested something. I added this code to the Album template file:
It shows the form, but since the user doesn't have the "Edit item" permission for the album, the drop down fields are just empty.
And yes, I understand I can change the sort order later, but I want them to do it on their own.
Is the permissions bypass complicated?