Merge pull request #1132 from cachethq/api-template-incidents

Incident API can now use incident templates with Twig templating
This commit is contained in:
James Brooks
2015-11-15 11:57:09 +00:00
31 changed files with 363 additions and 22 deletions
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => 'Navn',
'template' => 'Skabelon',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => 'Name',
'template' => 'Vorlage',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => 'Name',
'template' => 'Template',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -44,6 +44,7 @@ return [
'templates' => [
'name' => 'Nombre',
'template' => 'Plantilla',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => 'Nom',
'template' => 'Modéle',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => 'Nama',
'template' => 'Template',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => 'Nome',
'template' => 'Modello',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => '이름',
'template' => '템플릿',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => 'Naam',
'template' => 'Sjabloon',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -45,6 +45,7 @@ return [
'templates' => [
'name' => 'Nazwa',
'template' => 'Szablon',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => 'Nome',
'template' => 'Template',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => 'Название',
'template' => 'Шаблон',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => '事件模板名',
'template' => '模板',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
+1
View File
@@ -51,6 +51,7 @@ return [
'templates' => [
'name' => '事件模板名',
'template' => '模板',
'twig' => 'Incident Templates can make use of the <a href="http://twig.sensiolabs.org/" target="_blank">Twig</a> templating language.',
],
],
@@ -22,13 +22,7 @@
<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') }}">
@yield('css')
@include('partials.crowdin')
<script type="text/javascript">
var Global = {};
Global.locale = '{{ Setting::get('app_locale') }}';
</script>
<script src="{{ elixir('dist/js/all.js') }}"></script>
</head>
@@ -1,5 +1,25 @@
@extends('layout.dashboard')
@section('css')
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.css">
@stop
@section('js')
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/mode/twig/twig.min.js"></script>
<script>
(function() {
console.log(document.getElementById('cm-editor'));
var editor = CodeMirror.fromTextArea(document.getElementById('cm-editor'), {
lineNumbers: true,
mode: 'twig',
lineWrapping: true
});
}());
</script>
@stop
@section('content')
<div class="header">
<div class="sidebar-toggler visible-xs">
@@ -23,9 +43,8 @@
</div>
<div class="form-group">
<label>{{ trans('forms.incidents.templates.template') }}</label>
<div class='markdown-control'>
<textarea name="template[template]" class="form-control" rows="5" required></textarea>
</div>
<textarea name="template[template]" id="cm-editor" class="form-control" rows="8"></textarea>
<span class="help-block">{!! trans('forms.incidents.templates.twig') !!}</span>
</div>
</fieldset>
@@ -1,5 +1,25 @@
@extends('layout.dashboard')
@section('css')
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.css">
@stop
@section('js')
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/mode/twig/twig.min.js"></script>
<script>
(function() {
console.log(document.getElementById('cm-editor'));
var editor = CodeMirror.fromTextArea(document.getElementById('cm-editor'), {
lineNumbers: true,
mode: 'twig',
lineWrapping: true
});
}());
</script>
@stop
@section('content')
<div class="header">
<div class="sidebar-toggler visible-xs">
@@ -32,9 +52,8 @@
</div>
<div class="form-group">
<label>{{ trans('forms.incidents.templates.template') }}</label>
<div class='markdown-control'>
<textarea name="template[template]" class="form-control" rows="5" required>{{ $template->template }}</textarea>
</div>
<textarea name="template[template]" id="cm-editor" class="form-control" rows="8">{{ $template->template }}</textarea>
<span class="help-block">{!! trans('forms.incidents.templates.twig') !!}</span>
</div>
</fieldset>
@@ -9,5 +9,11 @@
@yield('content')
</div>
</div>
<script type="text/javascript">
var Global = {};
Global.locale = '{{ Setting::get('app_locale') }}';
</script>
@yield('js')
<script src="{{ elixir('dist/js/all.js') }}"></script>
</body>
</html>