Re: Allow editable fields in a table-plus after checking a conditions

45 views
Skip to first unread message

Bob Sleys

unread,
Oct 24, 2012, 8:25:21 AM10/24/12
to hobo...@googlegroups.com
Does it need to be editable under those conditions always?  IE in any location that field shows up to be edited and not just the table? If so then add it to the models permissions.

Bob

On Tuesday, October 23, 2012 6:33:40 PM UTC-4, Ricardo wrote:
I'm using a table-plus and it's working great, but I need to be able to say for example that one field is editable for me and everyone today, but tomorrow it's editable only for me. How would you incorporate the if condition into the table-plus?

Thanks.

Ricardo

unread,
Oct 24, 2012, 7:44:50 PM10/24/12
to hobo...@googlegroups.com
Actually, some fields need to be editable and others not. So for example I can edit column1 and 2 today, and so can everyone else, but tomorrow only I can edit column1 but not 2.

Bob Sleys

unread,
Oct 24, 2012, 9:42:08 PM10/24/12
to hobo...@googlegroups.com
Then that goes in the model

Take a look at the default user model.  It sets only certain fields as editable.  You'll just need to adjust that based on the records created_at value and the current date.

Bob

Bryan Larsen

unread,
Oct 24, 2012, 9:42:16 PM10/24/12
to hobo...@googlegroups.com
You can customize the view for each column:

<column1-view:>
<if test="&this_parent.some_function">
<editor/>
</if>
<else>
<view/>
</else>
</column1-view:>

Bryan
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/G8tAFUJiXeAJ.
>
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.

Ricardo

unread,
Oct 26, 2012, 10:55:43 AM10/26/12
to hobo...@googlegroups.com
Thanks everyone, I got it working using Bryan's suggestion.
Reply all
Reply to author
Forward
0 new messages