<div dir="ltr">Hi David,<div>thx for the answers and explanations.</div><div><br></div><div>Looking forward to hear from you.</div><div><br></div><div>I'll start looking into the option you proposed for the custom_callbacks option as it looks the best option for now.</div>
<div><br></div><div>thx</div><div>rene</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 11:29 AM, David Precious <span dir="ltr"><<a href="mailto:davidp@preshweb.co.uk" target="_blank">davidp@preshweb.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Sun, 2 Feb 2014 11:43:05 +0100<br>
Rene Stoutjesdijk <<a href="mailto:r.stoutjesdijk@gmail.com">r.stoutjesdijk@gmail.com</a>> wrote:<br>
<br>
> Hi All,<br>
><br>
> first let me say that i'm not an experienced dancer user.<br>
> My experience for now is that it really works :).<br>
><br>
> I've just started to use the SimpleCRUD plugin, which makes live very<br>
> easy for this kind of actions.<br>
><br>
> I do have 2 related questions which i don't know how to resolve:<br>
> 1) can i remove the option to add an entry in the database, as i<br>
> would only want the users to do an edit action (delete was easy to<br>
> remove as it's a configurable parameter).<br>
<br>
</div>OTTOMH, I think adding and editing are lumped together at the moment;<br>
I'll see how difficult it would be to add a config parameter to<br>
disallow adding, too.<br>
<div class=""><br>
> 2) can i have somewhere the option to filter (eg by a where clause in<br>
> mysql) based upon the login credentials? I would like to limit the<br>
> table view by a where clause based upon the login name.<br>
<br>
</div>Hmm, there's nothing like that, currently, but it may well be possible<br>
to add a hook in the right place that would let you modify the query<br>
about to run, or pass extra criteria to go in the WHERE clause.<br>
<br>
What you could do, is use the custom_callbacks option to pass callbacks<br>
to HTML::Table::FromDatabase to modify/skip rows upon output - that'd<br>
be a bit hacky though, as:<br>
<br>
- if you used the download options, you'd get the original data<br>
unchanged<br>
- if you were using pagination, filtering out rows at that step would<br>
throw the pagination out<br>
<br>
So, a way to supply additional criteria for the where clause via a hook<br>
may be the way to go. I'll take a look at that when I have a chance,<br>
but I'm afraid I can't make any guesses as to when that'll be - $work,<br>
and life in general at the moment, is keeping me rather busy!<br>
<br>
Cheers<br>
<br>
Dave P<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
David Precious ("bigpresh") <<a href="mailto:davidp@preshweb.co.uk">davidp@preshweb.co.uk</a>><br>
<a href="http://www.preshweb.co.uk/" target="_blank">http://www.preshweb.co.uk/</a> <a href="http://www.preshweb.co.uk/twitter" target="_blank">www.preshweb.co.uk/twitter</a><br>
<a href="http://www.preshweb.co.uk/linkedin" target="_blank">www.preshweb.co.uk/linkedin</a> <a href="http://www.preshweb.co.uk/facebook" target="_blank">www.preshweb.co.uk/facebook</a><br>
<a href="http://www.preshweb.co.uk/cpan" target="_blank">www.preshweb.co.uk/cpan</a> <a href="http://www.preshweb.co.uk/github" target="_blank">www.preshweb.co.uk/github</a><br>
<br>
<br>
_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
</font></span></blockquote></div><br></div>