@extends('admin.admin-master') 
@section('content')
<div>&nbsp; </div>
<div>&nbsp; </div>
<h3><i class="fa fa-newspaper-o"></i> Pages </h3>
<div>&nbsp; </div>
<!-- Pages List table  -->
<div class="col-md-12">
    <div class="row">
        <div class="col-md-3"><a class="btn btn-warning btn-sm" href="/admin/manage-pages?page=new"><i class="fa fa-paper-plane-o"></i> Add new page</a></div>
        <div class="col-md-3"></div>
        <div class="col-md-3"></div>
         <div class="col-md-3"></div>
    </div>
    <div>&nbsp; </div>
    <table class="table table-responsive table-condensed">
        <tr>
            <th>Page Name</th>
            <th>Page Type</th>
            <th>Publish</th>
            <th>Action</th>
        </tr>
        @foreach($all_pages as $page)
        <tr>
            <td><strong><a href="/admin/manage-pages?page_id={{$page->page_id}}">{{$page->page_name}}</a></strong></td>
            <td><span class="label label-{{($page->page_type==1)?'default':'warning'}}">{{isset($page_type[$page->page_type])?$page_type[$page->page_type]:''}}</span></td>
            <td><a data-toggle="tooltip" data-placement="bottom" title="Click publish / Unpublish" href="/admin/manage-pages?publish=yes&page_id={{$page->page_id}}"><span class="label {{($page->published==1)?'label-success':'label-danger'}}">{{($page->published==1)?'Yes':'No'}}</span></a></td>
            <td>
                <a data-toggle="tooltip" data-placement="bottom" title="Edit" class="btn btn-sm btn-info" href="/admin/manage-pages?page_id={{$page->page_id}}"><i class="fa fa-edit"></i></a>

                <a data-toggle="tooltip" data-placement="bottom" title="Delete" class="btn btn-sm btn-danger delete-page" href="#" page_id="{{$page->page_id}}"><i class="fa fa-close"></i></a>
            </td>
        </tr>
        @endforeach
    </table>
</div>

<!-- End pages list -->
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Update new quiz</h4>
            </div>
            <div class="modal-body quiz-form">
            </div>
            <p class="">&nbsp;</p>
        </div>
    </div>
</div>
<!--// Modal -->
@stop
