Update skinning with more flexible theme module

This commit is contained in:
Nabeel Shahzad
2018-03-11 18:00:42 -05:00
parent 03c15473b9
commit f05e37767f
50 changed files with 216 additions and 80 deletions

View File

@@ -28,6 +28,6 @@ class $CLASS$ extends Mailable
*/
public function build()
{
return $this->view('view.name');
return view('view.name');
}
}

View File

@@ -2,4 +2,4 @@
You probably don't want to edit anything here. Just make
sure to extend this in your views. It will pass the content section through
--}}
@extends('layouts.' . config('phpvms.skin') . '.app')
@extends('app')

View File

@@ -49,7 +49,6 @@
<div class="collapse" id="addons_menu" aria-expanded="true">
<ul class="nav">
@inject('moduleSvc', 'App\Services\ModuleService')
@foreach($moduleSvc->getAdminLinks() as &$link)
<li><a href="{!! url($link['url']) !!}"><i class="{!! $link['icon'] !!}"></i>{!! $link['title'] !!}</a></li>
@endforeach

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'live map')
@section('content')

View File

@@ -1,4 +1,3 @@
@inject('moduleSvc', 'App\Services\ModuleService')
<!DOCTYPE html>
<html lang="en">
<head>
@@ -41,7 +40,7 @@
</p>
</div>
<div class="collapse navbar-collapse justify-content-end" id="navigation">
@include("layouts.${SKIN_NAME}.nav")
@include('nav')
</div>
</div>
</nav>
@@ -50,7 +49,7 @@
<div class="wrapper">
<div class="clear"></div>
<div class="container-fluid" style="width: 85%!important;">
@include("layouts.${SKIN_NAME}.flash.message")
@include('flash.message')
@yield('content')
</div>
<div class="clearfix" style="height: 200px;"></div>

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.auth.layout")
@extends("auth.layout")
@section('title', 'log in')
@section('content')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
<!-- Main Content -->
@section('content')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('content')
<div class="container">

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'registration pending')
@section('content')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'register')
@section('content')
@@ -67,7 +67,7 @@
<p class="text-danger">{{ $errors->first('password_confirmation') }}</p>
@endif
@include("layouts.${SKIN_NAME}.auth.toc")
@include("auth.toc")
<div style="width: 100%; text-align: right; padding-top: 20px;">
By registering, you agree to the Term and Conditions<br /><br />

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'registration submitted')
@section('content')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'registration denied')
@section('content')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'account suspended')
@section('content')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'dashboard')
@section('content')
@@ -58,7 +58,7 @@
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
Your Last Report
</div>
@include("layouts.${SKIN_NAME}.pireps.pirep_card", ['pirep' => $last_pirep])
@include("pireps.pirep_card", ['pirep' => $last_pirep])
@endif
{{ Widget::latestNews(['count' => 1]) }}

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'not authorized')
@section('content')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'not found')
@section('content')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'flights')
@section('content')
@@ -6,18 +6,18 @@
@include('flash::message')
<div class="col-md-9">
<h2 class="description">flights</h2>
@include("layouts.${SKIN_NAME}.flights.table")
@include("flights.table")
</div>
<div class="col-md-3">
@include("layouts.${SKIN_NAME}.flights.search")
@include("flights.search")
</div>
</div>
<div class="row">
<div class="col-12 text-center">
{{ $flights->links("layouts.${SKIN_NAME}.pagination.default") }}
{{ $flights->links("pagination.default") }}
</div>
</div>
@endsection
@include("layouts.${SKIN_NAME}.flights.scripts")
@include("flights.scripts")

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'Flight '.$flight->ident)
@section('content')
@@ -49,5 +49,5 @@
</table>
</div>
</div>
@include("layouts.${SKIN_NAME}.flights.map")
@include("flights.map")
@endsection

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'welcome!')
@section('content')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'File Flight Report')
@section('content')
@@ -8,11 +8,11 @@
@include('flash::message')
{!! Form::open(['route' => 'frontend.pireps.store']) !!}
@include("layouts.${SKIN_NAME}.pireps.fields")
@include("pireps.fields")
{!! Form::close() !!}
</div>
</div>
@endsection
@include("layouts.${SKIN_NAME}.pireps.scripts")
@include("pireps.scripts")

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'Edit Flight Report')
@section('content')
<div class="row">
@@ -7,10 +7,10 @@
@include('flash::message')
{!! Form::model($pirep, ['route' => ['frontend.pireps.update', $pirep->id], 'method' => 'patch']) !!}
@include("layouts.${SKIN_NAME}.pireps.fields")
@include("pireps.fields")
{!! Form::close() !!}
</div>
</div>
@endsection
@include("layouts.${SKIN_NAME}.pireps.scripts")
@include("pireps.scripts")

View File

@@ -11,7 +11,7 @@ flight reports that have been filed. You've been warned!
@if($read_only)
<div class="row">
<div class="col-sm-12">
@component("layouts.${SKIN_NAME}.components.info")
@component("components.info")
Once a PIREP has been accepted/rejected, certain fields go into read-only mode.
@endcomponent
</div>
@@ -210,7 +210,7 @@ flight reports that have been filed. You've been warned!
<div class="row">
{{-- You don't want to change this ID unless you don't want the fares form to work :) --}}
<div id="fares_container" class="col-sm-12">
@include("layouts.${SKIN_NAME}.pireps.fares")
@include("pireps.fares")
</div>
</div>
<div class="row">

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'pireps')
@section('content')
@@ -11,12 +11,12 @@
</div>
<h2 class="description">pilot reports</h2>
@include('flash::message')
@include("layouts.${SKIN_NAME}.pireps.table")
@include("pireps.table")
</div>
</div>
<div class="row">
<div class="col-12 text-center">
{{ $pireps->links("layouts.${SKIN_NAME}.pagination.default") }}
{{ $pireps->links("pagination.default") }}
</div>
</div>
@endsection

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'PIREP '.$pirep->ident)
@section('content')
@@ -124,7 +124,7 @@
</div>
@endif
@include("layouts.${SKIN_NAME}.pireps.map")
@include("pireps.map")
@if(count($pirep->acars_logs) > 0)
<br /><br />

View File

@@ -1,2 +1,2 @@
@each("layouts.${SKIN_NAME}.pireps.pirep_card", $pireps, 'pirep')
@each("pireps.pirep_card", $pireps, 'pirep')

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'edit profile')
@section('content')
@@ -7,7 +7,7 @@
<h2 class="description">edit your profile</h2>
@include('flash::message')
{!! Form::model($user, ['route' => ['frontend.profile.update', $user->id], 'method' => 'patch']) !!}
@include("layouts.${SKIN_NAME}.profile.fields")
@include("profile.fields")
{!! Form::close() !!}
</div>
</div>

View File

@@ -1,4 +1,4 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'profile')
@section('content')

View File

@@ -0,0 +1,4 @@
{
"name": "default",
"parent_theme": null
}

View File

@@ -1,16 +1,16 @@
@extends("layouts.${SKIN_NAME}.app")
@extends('app')
@section('title', 'Pilots')
@section('content')
<div class="row">
<div class="col-md-12">
<h2 class="description">pilots</h2>
@include("layouts.${SKIN_NAME}.users.table")
@include("users.table")
</div>
</div>
<div class="row">
<div class="col-12 text-center">
{{ $users->links("layouts.${SKIN_NAME}.pagination.default") }}
{{ $users->links("pagination.default") }}
</div>
</div>
@endsection