0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-19 22:51:30 +00:00

Added custom meta titles to many pages. Closes .

This commit is contained in:
Dan Brown 2015-12-05 14:41:51 +00:00
parent f1c2866fbc
commit c32d70abc4
13 changed files with 56 additions and 11 deletions
app/Http/Controllers

View file

@ -40,6 +40,7 @@ class ChapterController extends Controller
{
$this->checkPermission('chapter-create');
$book = $this->bookRepo->getBySlug($bookSlug);
$this->setPageTitle('Create New Chapter');
return view('chapters/create', ['book' => $book, 'current' => $book]);
}
@ -79,6 +80,7 @@ class ChapterController extends Controller
$chapter = $this->chapterRepo->getBySlug($chapterSlug, $book->id);
$sidebarTree = $this->bookRepo->getChildren($book);
Views::add($chapter);
$this->setPageTitle($chapter->getShortName());
return view('chapters/show', ['book' => $book, 'chapter' => $chapter, 'current' => $chapter, 'sidebarTree' => $sidebarTree]);
}
@ -93,6 +95,7 @@ class ChapterController extends Controller
$this->checkPermission('chapter-update');
$book = $this->bookRepo->getBySlug($bookSlug);
$chapter = $this->chapterRepo->getBySlug($chapterSlug, $book->id);
$this->setPageTitle('Edit Chapter' . $chapter->getShortName());
return view('chapters/edit', ['book' => $book, 'chapter' => $chapter, 'current' => $chapter]);
}
@ -127,6 +130,7 @@ class ChapterController extends Controller
$this->checkPermission('chapter-delete');
$book = $this->bookRepo->getBySlug($bookSlug);
$chapter = $this->chapterRepo->getBySlug($chapterSlug, $book->id);
$this->setPageTitle('Delete Chapter' . $chapter->getShortName());
return view('chapters/delete', ['book' => $book, 'chapter' => $chapter, 'current' => $chapter]);
}