Ejemplo n.º 1
0
 public function show($id = 0)
 {
     $this->load->model('gallery_m');
     $this->load->model('gallery_files_m', 'images');
     $data = NULL;
     if (count_gallery_items($id) > 0) {
         $data = $this->images->get_many_by('gallery', $id);
     }
     $galleryData = $this->gallery_m->get($id);
     $this->template->set('pictures', $data)->set('galleryData', $galleryData)->build('show.twig');
 }
Ejemplo n.º 2
0
    foreach ($galleries as $gallery) {
        ?>
		<tr>
			<td><a href="<?php 
        echo site_url('admin/gallery/images/' . $gallery->id);
        ?>
"><?php 
        echo $gallery->name;
        ?>
</a></td>
			<td><?php 
        echo ellipsize($gallery->description, 75);
        ?>
</td>
			<td><?php 
        echo count_gallery_items($gallery->id);
        ?>
</td>
			<td class="action">
				<a class="action-icon" href="#">Action</a>
				<ul class="action-list" style="display: none;">
					<li><a class="confirm-delete" href="<?php 
        echo site_url('admin/gallery/delete/' . $gallery->id);
        ?>
"><i class="icon-trash icon-large"></i></a></li>
					<li><a href="<?php 
        echo site_url('admin/gallery/edit/' . $gallery->id);
        ?>
"><i class="icon-edit icon-large"></i></a></li>
				</ul>
			</td>