Skip to content

Commit 352537e

Browse files
committed
=Fix template issues
1 parent d8de8d3 commit 352537e

File tree

10 files changed

+58
-57
lines changed

10 files changed

+58
-57
lines changed

templates/default-collective/controller-with-form-request.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class DummyClass extends Controller
4848
{{fileSnippet}}
4949
{{modelNameClass}}::create($data);
5050

51-
Session::flash('flash_message', '{{modelNameClass}} was added!');
51+
Session::flash('success_message', '{{modelNameClass}} was added!');
5252

5353
return redirect()->route('{{indexRouteName}}');
5454
}
@@ -96,7 +96,7 @@ class DummyClass extends Controller
9696
{{fileSnippet}}
9797
${{modelName}}->update($data);
9898

99-
Session::flash('flash_message', '{{modelNameClass}} was updated!');
99+
Session::flash('success_message', '{{modelNameClass}} was updated!');
100100

101101
return redirect()->route('{{indexRouteName}}');
102102
}

templates/default-collective/index.blade.stub

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,20 @@
5252
<tr>
5353
{{bodyCells}}
5454
<td>
55-
<a href="{{ route('{{showRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-success btn-xs" title="View {{modelNameClass}}">
56-
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
57-
</a>
58-
<a href="{{ route('{{editRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-primary btn-xs" title="Edit {{modelNameClass}}">
59-
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
60-
</a>
55+
6156
{!! Form::open([
6257
'method' =>'DELETE',
6358
'route' => ['{{destroyRouteName}}', ${{modelName}}->{{primaryKey}}],
6459
'style' => 'display: inline;',
6560
]) !!}
61+
62+
<a href="{{ route('{{showRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-success btn-xs" title="View {{modelNameClass}}">
63+
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
64+
</a>
65+
<a href="{{ route('{{editRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-primary btn-xs" title="Edit {{modelNameClass}}">
66+
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
67+
</a>
68+
6669
{!! Form::button('<span class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete {{modelNameClass}}"></span>',
6770
[
6871
'type' => 'submit',

templates/default-collective/layout-with-validation.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="{{ config('app.locale') }}">
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">

templates/default-collective/layout.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="{{ config('app.locale') }}">
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">

templates/default-collective/show.blade.stub

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,28 @@
99
{{ !empty({{modelHeader}}) ? {{modelHeader}} : '{{modelName}}'}}
1010
</span>
1111

12-
<div class="btn-group btn-group-xs pull-right" role="group">
13-
14-
15-
<a href="{{ route('{{indexRouteName}}') }}" class="btn btn-primary" title="Show all {{modelNamePlural}}">
16-
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
17-
</a>
18-
19-
<a href="{{ route('{{editRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-primary" title="Edit {{modelNameClass}}">
20-
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
21-
</a>
22-
12+
<div class="pull-right">
13+
2314
{!! Form::open([
2415
'method' =>'DELETE',
25-
'route' => ['{{destroyRouteName}}', ${{modelName}}->{{primaryKey}}],
26-
'style' => 'display: inline;',
16+
'route' => ['{{destroyRouteName}}', ${{modelName}}->{{primaryKey}}]
2717
]) !!}
28-
{!! Form::button('<span class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete {{modelNameClass}}"></span>',
29-
[
30-
'type' => 'submit',
31-
'class' => 'btn btn-danger btn-xs',
32-
'title' => 'Delete {{modelNameClass}}',
33-
'onclick' => 'return confirm("Confirm delete?")',
34-
])
35-
!!}
18+
<div class="btn-group btn-group-xs" role="group">
19+
<a href="{{ route('{{indexRouteName}}') }}" class="btn btn-primary" title="Show all {{modelNamePlural}}">
20+
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
21+
</a>
22+
<a href="{{ route('{{editRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-primary" title="Edit {{modelNameClass}}">
23+
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
24+
</a>
25+
{!! Form::button('<span class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete {{modelNameClass}}"></span>',
26+
[
27+
'type' => 'submit',
28+
'class' => 'btn btn-danger btn-xs',
29+
'title' => 'Delete {{modelNameClass}}',
30+
'onclick' => 'return confirm("Confirm delete?")',
31+
])
32+
!!}
33+
</div>
3634
{!! Form::close() !!}
3735

3836
</div>

templates/default/controller-with-form-request.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class DummyClass extends Controller
4848
{{fileSnippet}}
4949
{{modelNameClass}}::create($data);
5050

51-
Session::flash('flash_message', '{{modelNameClass}} was added!');
51+
Session::flash('success_message', '{{modelNameClass}} was added!');
5252

5353
return redirect()->route('{{indexRouteName}}');
5454
}
@@ -96,7 +96,7 @@ class DummyClass extends Controller
9696
{{fileSnippet}}
9797
${{modelName}}->update($data);
9898

99-
Session::flash('flash_message', '{{modelNameClass}} was updated!');
99+
Session::flash('success_message', '{{modelNameClass}} was updated!');
100100

101101
return redirect()->route('{{indexRouteName}}');
102102
}

templates/default/index.blade.stub

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
</div>
3232

33-
3433
@if(count(${{modelNamePlural}}) == 0)
3534
<div class="panel-body text-center">
3635
<h4>There are no records!</h4>
@@ -51,16 +50,18 @@
5150
<tr>
5251
{{bodyCells}}
5352
<td>
54-
<a href="{{ route('{{showRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-success btn-xs" title="View {{modelNameClass}}">
55-
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
56-
</a>
57-
<a href="{{ route('{{editRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-primary btn-xs" title="Edit {{modelNameClass}}">
58-
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
59-
</a>
6053

61-
<form method="POST" action="{!! route('{{destroyRouteName}}', ${{modelName}}->{{primaryKey}}) !!}" accept-charset="UTF-8" style="display: inline;" novalidate="novalidate">
54+
<form method="POST" action="{!! route('{{destroyRouteName}}', ${{modelName}}->{{primaryKey}}) !!}" accept-charset="UTF-8">
6255
<input name="_method" value="DELETE" type="hidden">
6356
{{ csrf_field() }}
57+
58+
<a href="{{ route('{{showRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-success btn-xs" title="View {{modelNameClass}}">
59+
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
60+
</a>
61+
<a href="{{ route('{{editRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-primary btn-xs" title="Edit {{modelNameClass}}">
62+
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
63+
</a>
64+
6465
<button type="submit" class="btn btn-danger btn-xs" title="Delete {{modelNameClass}}" onclick="return confirm(&quot;Confirm delete?&quot;)">
6566
<span class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete {{modelNameClass}}"></span>
6667
</button>

templates/default/layout-with-validation.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="{{ config('app.locale') }}">
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">

templates/default/layout.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="{{ config('app.locale') }}">
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">

templates/default/show.blade.stub

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@
99
{{ !empty({{modelHeader}}) ? {{modelHeader}} : '{{modelName}}'}}
1010
</span>
1111

12-
<div class="btn-group btn-group-xs pull-right" role="group">
12+
<div class="pull-right">
1313

14-
15-
<a href="{{ route('{{indexRouteName}}') }}" class="btn btn-primary" title="Show all {{modelNamePlural}}">
16-
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
17-
</a>
18-
19-
<a href="{{ route('{{editRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-primary" title="Edit {{modelNameClass}}">
20-
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
21-
</a>
22-
23-
<form method="POST" action="{!! route('{{destroyRouteName}}', ${{modelName}}->{{primaryKey}}) !!}" accept-charset="UTF-8" style="display: inline;" novalidate="novalidate">
14+
<form method="POST" action="{!! route('{{destroyRouteName}}', ${{modelName}}->{{primaryKey}}) !!}" accept-charset="UTF-8">
2415
<input name="_method" value="DELETE" type="hidden">
2516
{{ csrf_field() }}
26-
<button type="submit" class="btn btn-danger btn-xs" title="Delete {{modelNameClass}}" onclick="return confirm(&quot;Confirm delete?&quot;)" id="sometest">
27-
<span class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete {{modelNameClass}}"></span>
28-
</button>
17+
<div class="btn-group btn-group-xs" role="group">
18+
<a href="{{ route('{{indexRouteName}}') }}" class="btn btn-primary" title="Show all {{modelNamePlural}}">
19+
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
20+
</a>
21+
<a href="{{ route('{{editRouteName}}', ${{modelName}}->{{primaryKey}} ) }}" class="btn btn-primary" title="Edit {{modelNameClass}}">
22+
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
23+
</a>
24+
<button type="submit" class="btn btn-danger btn-xs" title="Delete {{modelNameClass}}" onclick="return confirm(&quot;Confirm delete?&quot;)">
25+
<span class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete {{modelNameClass}}"></span>
26+
</button>
27+
</div>
2928
</form>
3029

3130
</div>

0 commit comments

Comments
 (0)