Let's not duplicate view code

This commit is contained in:
James Brooks
2015-10-17 14:27:15 +01:00
parent 4e7d4c4581
commit c3646fd64a
5 changed files with 23 additions and 39 deletions
+1 -18
View File
@@ -1,28 +1,11 @@
@extends('layout.master')
@section('content')
<div class="btn-group pull-right">
<a href="/" class="btn btn-info"><i class="ion-home"></i></a>
</div>
<div class="clearfix"></div>
<div class="section-messages">
@include('dashboard.partials.errors')
</div>
@if($bannerImage = Setting::get('app_banner'))
<div class="row app-banner">
<div class="col-md-12 text-center">
<?php $bannerType = Setting::get('app_banner_type') ?>
@if($app_url = Setting::get('app_domain'))
<a href="{{ $app_url }}" class="links"><img src="data:{{ $bannerType }};base64, {{ $bannerImage}}" class="banner-image img-responsive"></a>
@else
<img src="data:{{ $bannerType }};base64, {{ $bannerImage}}" class="banner-image img-responsive">
@endif
</div>
</div>
@endif
@include('partials.about-app')
<h4>{{ formatted_date($incident->created_at) }}</h4>
+1 -19
View File
@@ -5,25 +5,7 @@
@include('dashboard.partials.errors')
</div>
@if($bannerImage = Setting::get('app_banner'))
<div class="row app-banner">
<div class="col-md-12 text-center">
<?php $bannerType = Setting::get('app_banner_type') ?>
@if($app_url = Setting::get('app_domain'))
<a href="{{ $app_url }}"><img src="data:{{ $bannerType }};base64, {{ $bannerImage}}" class="banner-image img-responsive"></a>
@else
<img src="data:{{ $bannerType }};base64, {{ $bannerImage}}" class="banner-image img-responsive">
@endif
</div>
</div>
@endif
@if($about_app)
<div class="about-app">
<h1>{{ trans('cachet.about_this_site') }}</h1>
<p>{!! $about_app !!}</p>
</div>
@endif
@include('partials.about-app')
<div class="section-status">
<div class="alert alert-{{ $systemStatus }}">{{ $systemMessage }}</div>
@@ -0,0 +1,19 @@
@if($bannerImage = Setting::get('app_banner'))
<div class="row app-banner">
<div class="col-md-12 text-center">
<?php $bannerType = Setting::get('app_banner_type') ?>
@if($app_url = Setting::get('app_domain'))
<a href="{{ $app_url }}" class="links"><img src="data:{{ $bannerType }};base64, {{ $bannerImage}}" class="banner-image img-responsive"></a>
@else
<img src="data:{{ $bannerType }};base64, {{ $bannerImage}}" class="banner-image img-responsive">
@endif
</div>
</div>
@endif
@if($about_app)
<div class="about-app">
<h1>{{ trans('cachet.about_this_site') }}</h1>
<p>{!! $about_app !!}</p>
</div>
@endif