⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

View only mode?



mephi
  • profile picture
  • Member

Posted 22 January 2013 - 07:41 AM

Hello,

Is it possible to have an extra action that shows all fields from a table in viewonly / html display?
Displaying only the values from table columns and a "back" button at the bottom.

davidoster
  • profile picture
  • Member

Posted 23 January 2013 - 04:05 AM

Maybe the unset_add/edit/delete functions help you?
http://www.grocerycrud.com/documentation/options_functions/unset_add

mephi
  • profile picture
  • Member

Posted 23 January 2013 - 04:33 AM

hey David,
when I said View Mode Only, I was refering to the action when you click on a row to edit details.
Instead of editing the row details, I want to have everything readonly and a "back" button at the bottom.

The normal actions from grid view remains the same (add/edit/delete etc)

So ... what options do I have?

davidoster
  • profile picture
  • Member

Posted 23 January 2013 - 11:14 AM

I am under the impression that when you use the unset functions there is no way to be able to add/edit or delete anything.
The view is still a grid since this is the default view that grocerycrud has.
Many things have been written about Read operation on a CRUD system just like grocerycrud!
I believe your best bet is to make a button on every row that says View(or something like this) and create your own read only view.
This can be done via http://www.grocerycr...ions/add_action add_action function and you map it to a controller function that loads up your own view!
It's pretty simple actually!

mephi
  • profile picture
  • Member

Posted 23 January 2013 - 11:27 AM

Hey David,

I was hoping to have something already done in the grocery_crud layout.
I have created many custom add_actions but this View mode wanted to use and look like other grocery_crud layouts.

I will see what I can do ... thanks for reply!

davidoster
  • profile picture
  • Member

Posted 23 January 2013 - 11:29 AM

Just replicate using the theme's css!