Modal and buttons

modal() can show full value of separate cell in a modal window. Additional buttons can be added in button columns. button() method supports {field_tags}.


public function modal_and_buttons()
{
  $xcrud = get_xcrud();
  $xcrud->table('gallery');
  $xcrud->modal('image,description');
  $xcrud->change_type('image', 'image', false, array(
    'width' => 450,
    'path' => realpath(FCPATH . 'assets/uploads/gallery'),
    'thumbs' => array(array(
    'height' => 55,
    'width' => 120,
    'crop' => true,
    'marker' => '_th'))));
  $xcrud->button('#bootstrap', 'bootstrap theme');
  $xcrud->button('#default', 'default theme');
  
  $data['content'] = $xcrud->render();
  
  return view('demos', $data);
}

Gallery

#ImageTitleDescriptionActive 
1Big TreeYes
2Nunc congue facilisis bibendum. Fusce mollis elitNo
3Cras quis quam quis est interdum suscipit. Ut…Yes
4Duis elementum facilisis massa quis rhoncus.Yes
5Nulla lobortis, velit ut aliquet commodo, purus…Yes
6Maecenas volutpat commodo ante, a porta metus…No
7testeNo
8testeNo
9No
1001No
Search