Mini Shell

Direktori : /home/brasafestival/www/old/bkp_2023/app/Plugin/Depoimentos_/View/Depoimentos/
Upload File :
Current File : /home/brasafestival/www/old/bkp_2023/app/Plugin/Depoimentos_/View/Depoimentos/admin_index.ctp

<fieldset class="box">
    <legend>Depoimentos</legend>
    <nav class="pannel">
        <?PHP echo $this->Html->link('Adicionar novo',array('action'=>'add')); ?>
    </nav>    
    <table class="tables">
        <thead>
            <tr>
                <td class="thumb"><a>Imagem</a></td>
                <td><?PHP echo $this->Paginator->sort('title','Nome')?></td>
                <td class="created"><?PHP echo $this->Paginator->sort('created','Criado')?></td>
                <td class="modified"><?PHP echo $this->Paginator->sort('modified','Editado')?></td>
                <td class="edit">&nbsp;</td>
                <td class="delete">&nbsp;</td>
            </tr>
        </thead>
        <tbody class="sortable">
            <?PHP foreach($posts as $post){ ?>
            <tr data-id="<?PHP echo $post['Depoimento']['id']; ?>">
                <td><?PHP if($post['Depoimento']['thumb']) echo $this->Fill->image($post['Depoimento']['thumb'],120,80,'ffffff'); ?></td>
                <td><?PHP echo $post['Depoimento']['title']?></td>
                <td><?PHP echo $post['Depoimento']['cdate']?></td>
                <td><?PHP echo $post['Depoimento']['mdate']?></td>
                <td><?PHP echo $this->Html->link('Editar',array('action'=>'edit',$post['Depoimento']['id']))?></td>
                <td><?PHP echo $this->Html->link('Excluir',array('action'=>'delete',$post['Depoimento']['id']),false,'Tem certeza?')?></td>
            </tr>
            <?PHP } ?>
        </tbody>
    </table>
    <?PHP echo $this->element('Painel.paginator');?>
</fieldset>

<script type="text/javascript">
    var base='<?= $this->base ?>';
    jQuery(function($){
        $(".sortable").sortable({
            stop:function(evt,ui){
                $(".sortable>tr").each(function(i,e){
                    var id=$(e).attr('data-id');
                    var index=$(e).index();
                    $.getJSON(base+'/admin/depoimentos/depoimentos/order/'+id+'/'+index,function(data){
                    });
                });
            }
        });
    });
</script>

Zerion Mini Shell 1.0