%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/sljcon/resources/views/admin/section/
Upload File :
Create Path :
Current File : /var/www/html/sljcon/resources/views/admin/section/all.blade.php

@extends('layouts.app')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-12 m_top_30">
                <div class="pull-right">
                    @if(count($sections) < 4)
                        <a href="{{route('admin.project.section.newOrEdit','new'.'?project_id='.$project_id)}}"
                           class="btn btn-success">
                            <i class="fa fa-plus"></i> New
                        </a>
                    @endif
                    <a href="{{route('admin.projects')}}" class="btn btn-warning">
                        <i class="fa fa-arrow-left"></i> Projects
                    </a>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="table-responsive">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th scope="col">#</th>
                            <th scope="col">Section Title</th>
                            <th scope="col">Action</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($sections as $key=>$section)
                            <tr>
                                <td scope="row">{{++$key}}</td>
                                <td>{{$section->title}}</td>
                                <td>
                                    <div class="btn-group" role="group" aria-label="Basic example">
                                        <a href="{{route('admin.project.section.newOrEdit',$section->id)}}"
                                           type="button" class="btn btn-warning"><i class="fa fa-edit"></i>
                                        </a>
                                        <a type="button" class="btn btn-success"
                                           href="{{route('project.details',$project->slug)}}" target="_blank">
                                            <i class="fa fa-search"></i>
                                        </a>
                                        <a href="#" type="button" class="btn btn-danger"
                                           onclick="if (confirm('Are you sure you want to delete this section?')) $('#deleteSection_{{$section->id}}').submit(); return false;">
                                            <i class="fa fa-trash"></i>
                                        </a>
                                        <form action="{{route('admin.project.section.delete')}}" method="post"
                                              id="deleteSection_{{$section->id}}">
                                            {{ csrf_field() }}
                                            {{ method_field('DELETE') }}
                                            <input type="hidden" name="id" value="{{ $section->id }}">
                                        </form>
                                    </div>
                                </td>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
@endsection
<script>
    function submitDeleteForm(id) {
        $('deleteSection_' + id).submit();
    }
</script>

Zerion Mini Shell 1.0