Skip to content

Commit f633fc4

Browse files
committed
Re-add page titles
1 parent 43fc46f commit f633fc4

14 files changed

+10
-28
lines changed

app/Http/Controllers/ChatController.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ class ChatController extends Controller
55
{
66
public function getIndex()
77
{
8-
$this->title = 'Live Chat';
9-
108
return view('chat.index');
119
}
1210
}

app/Http/Controllers/Controller.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ class Controller extends BaseController
1111
{
1212
use DispatchesJobs, ValidatesRequests;
1313

14-
protected $title = '';
15-
1614
protected function redirectTo($url, $statusCode = 302)
1715
{
1816
return Redirect::to($url, $statusCode);

app/Http/Controllers/Forum/ForumThreadsController.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ public function getIndex($status = '')
5353
$threads->appends($tagAppends);
5454
$this->createSections(Input::get('tags'));
5555

56-
$this->title = 'Forum';
57-
5856
return view('forum.threads.index', compact('threads', 'tags', 'queryString'));
5957
}
6058

@@ -71,8 +69,6 @@ public function getShowThread($threadSlug)
7169

7270
$this->createSections($thread->getTags());
7371

74-
$this->title = ($thread->isSolved() ? '[SOLVED] ' : '') . $thread->subject;
75-
7672
return view('forum.threads.show', compact('thread', 'replies'));
7773
}
7874

@@ -88,8 +84,6 @@ public function getCreateThread()
8884
$tags = $this->tags->getAllForForum();
8985
$versions = $this->threads->getNew()->getLaravelVersions();
9086

91-
$this->title = "Create Forum Thread";
92-
9387
return view('forum.threads.create', compact('tags', 'versions'));
9488
}
9589

@@ -145,8 +139,6 @@ public function getEditThread($threadId)
145139

146140
$this->createSections(Input::get('tags'));
147141

148-
$this->title = "Edit Forum Thread";
149-
150142
return view('forum.threads.edit', compact('thread', 'tags', 'versions'));
151143
}
152144

@@ -221,8 +213,6 @@ public function getDelete($threadId)
221213

222214
$this->createSections(Input::get('tags'));
223215

224-
$this->title = "Delete Forum Thread";
225-
226216
return view('forum.threads.delete', compact('thread'));
227217
}
228218

@@ -251,7 +241,6 @@ public function getSearch()
251241
$results->appends(['query' => $query]);
252242

253243
$this->createSections(Input::get('tags'));
254-
$this->title = "Forum Search";
255244

256245
return view('forum.search', compact('query', 'results'));
257246
}

app/Http/Controllers/PastesController.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public function getShow($hash)
3030
return $this->redirectAction('PastesController@getCreate');
3131
}
3232

33-
$this->title = 'Paste Viewer';
34-
3533
return view('bin.show', compact('paste'));
3634
}
3735

@@ -48,7 +46,6 @@ public function postCreate()
4846
public function getFork($hash)
4947
{
5048
$paste = $this->pastes->getByHash($hash);
51-
$this->title = 'Fork Paste';
5249

5350
return view('bin.fork', compact('paste'));
5451
}

resources/views/bin/fork.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@extends('layouts.bin')
1+
@extends('layouts.bin', ['pageTitle' => 'Fork Paste'])
22

33
@section('table')
44
@include('bin._scripts')

resources/views/bin/show.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@extends('layouts.bin')
1+
@extends('layouts.bin', ['pageTitle' => 'Paste Viewer'])
22

33
@section('table')
44
@include('bin._scripts')

resources/views/chat/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@extends('layouts.default')
1+
@extends('layouts.default', ['pageTitle' => 'Live Chat'])
22

33
@section('table')
44
<h2>#Laravel IRC Chat</h2>

resources/views/forum/search.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@extends('layouts._two_columns_left_sidebar')
1+
@extends('layouts._two_columns_left_sidebar', ['pageTitle' => 'Forum Search'])
22

33
@section('sidebar')
44
@include('forum._sidebar', ['query' => $query])

resources/views/forum/threads/create.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@extends('layouts._two_columns_left_sidebar')
1+
@extends('layouts._two_columns_left_sidebar', ['pageTitle' => 'Create Forum Thread'])
22

33
@section('sidebar')
44
@include('forum._sidebar')

resources/views/forum/threads/delete.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@extends('layouts._two_columns_left_sidebar')
1+
@extends('layouts._two_columns_left_sidebar', ['pageTitle' => 'Delete Forum Thread'])
22

33
@section('sidebar')
44
@include('forum._sidebar')

resources/views/forum/threads/edit.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@extends('layouts._two_columns_left_sidebar')
1+
@extends('layouts._two_columns_left_sidebar', ['pageTitle' => 'Edit Forum Thread'])
22

33
@section('sidebar')
44
@include('forum._sidebar')

resources/views/forum/threads/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@extends('layouts._two_columns_left_sidebar')
1+
@extends('layouts._two_columns_left_sidebar', ['pageTitle' => 'Forum'])
22

33
@section('sidebar')
44
@include('forum._sidebar')

resources/views/forum/threads/show.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@extends('layouts._two_columns_left_sidebar')
1+
@extends('layouts._two_columns_left_sidebar', ['pageTitle' => ($thread->isSolved() ? '[SOLVED] ' : '') . $thread->subject])
22

33
@section('sidebar')
44
@include('forum._sidebar')

resources/views/layouts/default.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width">
77

8-
<title>{{ ! empty($title) ? $title . ' - ' : '' }}Laravel.io - The Laravel Community Portal</title>
8+
<title>{{ isset($pageTitle) ? $pageTitle . ' - ' : '' }}Laravel.io - The Laravel Community Portal</title>
99

1010
@section('styles')
1111
<link rel="stylesheet" href="{{ asset('stylesheets/app.css') }}?v=2">

0 commit comments

Comments
 (0)