<?php $__env->startSection('title'); ?>
Álbuns do Facebook
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content-header'); ?>
Álbuns do Facebook
<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
<li class="active">
    Álbuns do Facebook
</li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-xs-12">
        <div class="box no-border">
            <div class="box-header">
                <h3 class="box-title">
                    <i class="fa fa-facebook-official text-blue"></i>
                    Ligação a <b><?php echo $album->profile_name; ?></b> <small>facebook.com/<?php echo $album->profile_id; ?></small>
                </h3>
            </div>
            <div class="box-body">
                <div class="box-body">
                    <div class="row">
                        <?php echo Form::model($album, array('route' => array('admin.fb-albums.update', $album->id), 'method' => 'PUT')); ?>

                        <div class="col-sm-5">
                            <div class="form-group">
                                <?php echo Form::label('action', 'Com os álbuns selecionados:'); ?>

                                <?php echo Form::select('action', $actions ,null, array('class' =>'form-control ckeditor')); ?>

                            </div>
                        </div>
                        <div class="col-sm-7">
                            <div class="form-group is-required">
                                <?php echo Form::label('album', 'Nome do álbum'); ?>

                                <div class="input-group">
                                    <?php echo Form::text('album', null, array('class' =>'form-control')); ?>

                                    <span class="input-group-btn">
                                        <?php echo Form::submit('Adicionar à lista', array('class' => 'btn btn-primary' )); ?>

                                    </span>
                                </div>
                            </div>
                        </div>
                        <?php echo Form::close(); ?>

                        <div class="col-sm-6">
                            <hr/>
                            <?php if(empty($albums)): ?>
                            <p class="text-muted">Não existem albuns adicionados à lista. 
                                <br/>
                                Vão ser apresentados todos os álbuns do facebook.
                            </p>
                            <?php else: ?>
                            <?php if($album->action == 'exclude'): ?>
                            <h4>Serão apresentados todos os álbuns, </b>excepto</b></h4>
                            <?php else: ?>
                            <h4>Serão apresentados <b>apenas os seguintes albuns</b></h4>
                            <?php endif; ?>
                            <table class="table">
                                <tr>
                                    <th>Álbum</th>
                                    <th></th>
                                </tr>
                                <?php foreach($albums as $albumName): ?>
                                <tr>
                                    <td><?php echo $albumName; ?></td>
                                    <td class="width-150px">
                                        <a href="<?php echo route('admin.fb-albums.destroy', array($album->id, 'album' => $albumName)); ?>" data-method="delete" data-confirm="Tem a certeza que prentende remover o álbum da lista?" class="text-red">
                                            <i class="fa fa-trash"></i> Remover da lista
                                        </a>
                                    </td>
                                </tr>
                                <?php endforeach; ?>
                            </table>
                            <?php endif; ?>
                        </div>
                    </div>

                </div>

            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>