Merge pull request #2931 from nstapelbroek/feature/2895-custom-meta-descriptions-per-incident

Custom meta descriptions per incident
This commit is contained in:
James Brooks
2019-01-27 14:31:34 +00:00
committed by GitHub
13 changed files with 447 additions and 15 deletions
@@ -129,6 +129,14 @@
</label>
</div>
@endif
<div class="form-group">
<label>{{ trans('forms.seo.title') }}</label> <small class="text-muted">{{ trans('forms.optional') }}</small>
<input type="text" name="seo[title]" class="form-control" placeholder="{{ trans('forms.optional') }}">
</div>
<div class="form-group">
<label>{{ trans('forms.seo.description') }}</label> <small class="text-muted">{{ trans('forms.optional') }}</small>
<input type="text" name="seo[description]" class="form-control" placeholder="{{ trans('forms.optional') }}">
</div>
</fieldset>
<div class="form-group">
@@ -111,6 +111,14 @@
<label>{{ trans('forms.incidents.occurred_at') }}</label> <small class="text-muted">{{ trans('forms.optional') }}</small>
<input type="text" name="occurred_at" class="form-control flatpickr-time" data-date-format="Y-m-d H:i" value="{{ $incident->occurred_at_datetimepicker }}" placeholder="{{ trans('forms.optional') }}">
</div>
<div class="form-group">
<label>{{ trans('forms.seo.title') }}</label> <small class="text-muted">{{ trans('forms.optional') }}</small>
<input type="text" name="seo[title]" class="form-control" value="{{ array_get($incident->meta, 'seo.title', '') }}">
</div>
<div class="form-group">
<label>{{ trans('forms.seo.description') }}</label> <small class="text-muted">{{ trans('forms.optional') }}</small>
<input type="text" name="seo[description]" class="form-control" value="{{ array_get($incident->meta, 'seo.description', '') }}">
</div>
</fieldset>
<div class="form-group">
+1 -1
View File
@@ -15,7 +15,7 @@
<meta name="description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $appName]))">
<meta property="og:type" content="website">
<meta property="og:title" content="{{ $siteTitle }}">
<meta property="og:title" content="@yield('title', $siteTitle)">
<meta property="og:image" content="/img/favicon.png">
<meta property="og:description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $appName]))">
+2 -2
View File
@@ -1,8 +1,8 @@
@extends('layout.master')
@section('title', $incident->name.' | '.$siteTitle)
@section('title', array_get($incident->meta, 'seo.title', $incident->name).' | '.$siteTitle)
@section('description', trans('cachet.meta.description.incident', ['name' => $incident->name, 'date' => $incident->occurred_at_formatted]))
@section('description', array_get($incident->meta, 'seo.description', trans('cachet.meta.description.incident', ['name' => $incident->name, 'date' => $incident->occurred_at_formatted])))
@section('bodyClass', 'no-padding')