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
3Duis elementum facilisis massa quis rhoncus.Yes
4Nulla lobortis, velit ut aliquet commodo, purus…Yes
5Maecenas volutpat commodo ante, a porta metus…No
6testeNo
7testeNo
8No
901No
10No
Search