Move $app_name into View composer
This commit is contained in:
@@ -31,6 +31,8 @@ class AppComposer
|
|||||||
$mailFrom = env('MAIL_NAME', false);
|
$mailFrom = env('MAIL_NAME', false);
|
||||||
|
|
||||||
$view->withSubscribersEnabled($isEnabled && $mailAddress && $mailFrom);
|
$view->withSubscribersEnabled($isEnabled && $mailAddress && $mailFrom);
|
||||||
|
$view->withAppName(Setting::get('app_name'));
|
||||||
$view->withAboutApp(Markdown::convertToHtml(Setting::get('app_about')));
|
$view->withAboutApp(Markdown::convertToHtml(Setting::get('app_about')));
|
||||||
|
$view->withShowSupport(Setting::get('show_support'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{ trans('forms.settings.app-setup.site-name') }}</label>
|
<label>{{ trans('forms.settings.app-setup.site-name') }}</label>
|
||||||
<input type="text" class="form-control" name="app_name" value="{{ Setting::get('app_name') }}" required>
|
<input type="text" class="form-control" name="app_name" value="{{ $app_name }}" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{ trans('forms.settings.app-setup.about-this-page') }}</label>
|
<label>{{ trans('forms.settings.app-setup.about-this-page') }}</label>
|
||||||
<div class='markdown-control'>
|
<div class='markdown-control'>
|
||||||
<textarea name="app_about" class="form-control autosize" rows="4">{{ Setting::get('app_about') }}</textarea>
|
<textarea name="app_about" class="form-control autosize" rows="4">{{ $app_about }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="hidden" value="0" name="show_support">
|
<input type="hidden" value="0" name="show_support">
|
||||||
<input type="checkbox" value="1" name="show_support" {{ Setting::get('show_support') ? 'checked' : null }}>
|
<input type="checkbox" value="1" name="show_support" {{ $show_support ? 'checked' : null }}>
|
||||||
{{ trans('setup.show_support') }}
|
{{ trans('setup.show_support') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@extends('layout.emails')
|
@extends('layout.emails')
|
||||||
|
|
||||||
@section('preheader')
|
@section('preheader')
|
||||||
{!! trans('cachet.subscriber.email.maintenance.html-preheader', ['app_name' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.subscriber.email.maintenance.html-preheader', ['app_name' => $app_name]) !!}
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! trans('cachet.subscriber.email.maintenance.html', ['app_name' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.subscriber.email.maintenance.html', ['app_name' => $app_name]) !!}
|
||||||
|
|
||||||
<p>{{ $scheduled_at }}</p>
|
<p>{{ $scheduled_at }}</p>
|
||||||
|
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
{!! $html_content !!}
|
{!! $html_content !!}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@if(Setting::get('show_support'))
|
@if($show_support)
|
||||||
<p>{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}</p>
|
<p>{!! trans('cachet.powered_by', ['app' => $app_name]) !!}</p>
|
||||||
@endif
|
@endif
|
||||||
<p>
|
<p>
|
||||||
<small><a href="{{ $unsubscribe_link }}">{!! trans('cachet.subscriber.email.unsubscribe') !!}</a></small>
|
<small><a href="{{ $unsubscribe_link }}">{!! trans('cachet.subscriber.email.unsubscribe') !!}</a></small>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{!! trans('cachet.subscriber.email.maintenance.text', ['app_name' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.subscriber.email.maintenance.text', ['app_name' => $app_name]) !!}
|
||||||
|
|
||||||
{{ $scheduled_at }}
|
{{ $scheduled_at }}
|
||||||
|
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
{!! $text_content !!}
|
{!! $text_content !!}
|
||||||
|
|
||||||
@if(Setting::get('show_support'))
|
@if($show_support)
|
||||||
{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.powered_by', ['app' => $app_name]) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
{!! trans('cachet.subscriber.email.unsubscribe') !!} {{ $unsubscribe_link }}
|
{!! trans('cachet.subscriber.email.unsubscribe') !!} {{ $unsubscribe_link }}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@extends('layout.emails')
|
@extends('layout.emails')
|
||||||
|
|
||||||
@section('preheader')
|
@section('preheader')
|
||||||
{!! trans('cachet.subscriber.email.incident.html-preheader', ['app_name' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.subscriber.email.incident.html-preheader', ['app_name' => $app_name]) !!}
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! trans('cachet.subscriber.email.incident.html-preheader', ['app_name' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.subscriber.email.incident.html-preheader', ['app_name' => $app_name]) !!}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{!! $status !!}
|
{!! $status !!}
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
{!! $html_content !!}
|
{!! $html_content !!}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@if(Setting::get('show_support'))
|
@if($show_support)
|
||||||
<p>{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}</p>
|
<p>{!! trans('cachet.powered_by', ['app' => $app_name]) !!}</p>
|
||||||
@endif
|
@endif
|
||||||
<p>
|
<p>
|
||||||
<small><a href="{{ $unsubscribe_link }}">{!! trans('cachet.subscriber.email.unsubscribe') !!}</a></small>
|
<small><a href="{{ $unsubscribe_link }}">{!! trans('cachet.subscriber.email.unsubscribe') !!}</a></small>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{!! trans('cachet.subscriber.email.incident.text', ['app_name' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.subscriber.email.incident.text', ['app_name' => $app_name]) !!}
|
||||||
|
|
||||||
{!! $status !!}
|
{!! $status !!}
|
||||||
@if($has_component)
|
@if($has_component)
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
{!! $text_content !!}
|
{!! $text_content !!}
|
||||||
|
|
||||||
@if(Setting::get('show_support'))
|
@if($show_support)
|
||||||
{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.powered_by', ['app' => $app_name]) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
{!! trans('cachet.subscriber.email.unsuscribe') !!} {{ $unsubscribe_link }}
|
{!! trans('cachet.subscriber.email.unsuscribe') !!} {{ $unsubscribe_link }}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
@extends('layout.emails')
|
@extends('layout.emails')
|
||||||
|
|
||||||
@section('preheader')
|
@section('preheader')
|
||||||
{!! trans('cachet.subscriber.email.verify.html-preheader', ['app_name' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.subscriber.email.verify.html-preheader', ['app_name' => $app_name]) !!}
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! trans('cachet.subscriber.email.verify.html', ['app_name' => Setting::get('app_name'), 'link' => $link]) !!}
|
{!! trans('cachet.subscriber.email.verify.html', ['app_name' => $app_name, 'link' => $link]) !!}
|
||||||
|
|
||||||
@if(Setting::get('show_support'))
|
@if($show_support)
|
||||||
<p>{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}</p>
|
<p>{!! trans('cachet.powered_by', ['app' => $app_name]) !!}</p>
|
||||||
@endif
|
@endif
|
||||||
@stop
|
@stop
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{ trans('cachet.subscriber.email.verify.text', ['app_name' => Setting::get('app_name'), 'link' => $link]) }}
|
{{ trans('cachet.subscriber.email.verify.text', ['app_name' => $app_name, 'link' => $link]) }}
|
||||||
|
|
||||||
@if(Setting::get('show_support'))
|
@if($show_support)
|
||||||
{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.powered_by', ['app' => $app_name]) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
@extends('layout.emails')
|
@extends('layout.emails')
|
||||||
|
|
||||||
@section('preheader')
|
@section('preheader')
|
||||||
{!! trans('cachet.users.email.invite.html-preheader', ['app_name' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.users.email.invite.html-preheader', ['app_name' => $app_name]) !!}
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! trans('cachet.users.email.invite.html', ['app_name' => Setting::get('app_name'), 'link' => $link]) !!}
|
{!! trans('cachet.users.email.invite.html', ['app_name' => $app_name, 'link' => $link]) !!}
|
||||||
|
|
||||||
@if(Setting::get('show_support'))
|
@if($show_support)
|
||||||
<p>{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}</p>
|
<p>{!! trans('cachet.powered_by', ['app' => $app_name]) !!}</p>
|
||||||
@endif
|
@endif
|
||||||
@stop
|
@stop
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{ trans('cachet.users.email.invite.text', ['app_name' => Setting::get('app_name'), 'link' => $link]) }}
|
{{ trans('cachet.users.email.invite.text', ['app_name' => $app_name, 'link' => $link]) }}
|
||||||
|
|
||||||
@if(Setting::get('show_support'))
|
@if($show_support)
|
||||||
{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}
|
{!! trans('cachet.powered_by', ['app' => $app_name]) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<meta name="format-detection" content="address=no;=no;telephone=no" />
|
<meta name="format-detection" content="address=no;=no;telephone=no" />
|
||||||
<title>{{ Setting::get('app_name') }}</title>
|
<title>{{ $app_name }}</title>
|
||||||
@include('partials.email-css')
|
@include('partials.email-css')
|
||||||
</head>
|
</head>
|
||||||
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
|
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="footer">{{ Setting::get('app_name') }}</td>
|
<td class="footer">{{ $app_name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
|
||||||
<link rel="alternate" type="application/atom+xml" href="/atom" title="{{ isset($page_title) ?: Setting::get('app_name') }} - Atom Feed">
|
<link rel="alternate" type="application/atom+xml" href="/atom" title="{{ isset($page_title) ?: $app_name }} - Atom Feed">
|
||||||
<link rel="alternate" type="application/rss+xml" href="/rss" title="{{ isset($page_title) ?: Setting::get('app_name') }} - RSS Feed">
|
<link rel="alternate" type="application/rss+xml" href="/rss" title="{{ isset($page_title) ?: $app_name }} - RSS Feed">
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="/favicon.ico">
|
<link rel="icon" type="image/png" href="/favicon.ico">
|
||||||
<link rel="shortcut icon" href="/favicon.png" type="image/x-icon">
|
<link rel="shortcut icon" href="/favicon.png" type="image/x-icon">
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<!-- Mobile IE allows us to activate ClearType technology for smoothing fonts for easy reading -->
|
<!-- Mobile IE allows us to activate ClearType technology for smoothing fonts for easy reading -->
|
||||||
<meta http-equiv="cleartype" content="on">
|
<meta http-equiv="cleartype" content="on">
|
||||||
|
|
||||||
<title>{{ isset($page_title) ?: Setting::get('app_name') }}</title>
|
<title>{{ isset($page_title) ?: $app_name }}</title>
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css">
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css">
|
||||||
<link rel="stylesheet" href="{{ elixir('dist/css/all.css') }}">
|
<link rel="stylesheet" href="{{ elixir('dist/css/all.css') }}">
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-5">
|
||||||
@if(Setting::get('show_support'))
|
@if($show_support)
|
||||||
<p>{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}</p>
|
<p>{!! trans('cachet.powered_by', ['app' => $app_name]) !!}</p>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-7">
|
<div class="col-sm-7">
|
||||||
|
|||||||
Reference in New Issue
Block a user