<?php
-Route::get('/translations.js', 'HomeController@getTranslations');
+Route::get('/translations', 'HomeController@getTranslations');
// Authenticated routes...
Route::group(['middleware' => 'auth'], function () {
Route::put('/{bookSlug}/chapter/{chapterSlug}/move', 'ChapterController@move');
Route::get('/{bookSlug}/chapter/{chapterSlug}/edit', 'ChapterController@edit');
Route::get('/{bookSlug}/chapter/{chapterSlug}/permissions', 'ChapterController@showRestrict');
+ Route::get('/{bookSlug}/chapter/{chapterSlug}/export/pdf', 'ChapterController@exportPdf');
+ Route::get('/{bookSlug}/chapter/{chapterSlug}/export/html', 'ChapterController@exportHtml');
+ Route::get('/{bookSlug}/chapter/{chapterSlug}/export/plaintext', 'ChapterController@exportPlainText');
Route::put('/{bookSlug}/chapter/{chapterSlug}/permissions', 'ChapterController@restrict');
Route::get('/{bookSlug}/chapter/{chapterSlug}/delete', 'ChapterController@showDelete');
Route::delete('/{bookSlug}/chapter/{chapterSlug}', 'ChapterController@destroy');
Route::get('/ajax/search/entities', 'SearchController@searchEntitiesAjax');
+ // Comments
+ Route::post('/ajax/page/{pageId}/comment/', 'CommentController@save');
+ Route::put('/ajax/page/{pageId}/comment/{commentId}', 'CommentController@save');
+ Route::delete('/ajax/comment/{id}', 'CommentController@destroy');
+ Route::get('/ajax/page/{pageId}/comments/', 'CommentController@getPageComments');
+
// Links
Route::get('/link/{id}', 'PageController@redirectFromLink');
// Search
- Route::get('/search/all', 'SearchController@searchAll');
- Route::get('/search/pages', 'SearchController@searchPages');
- Route::get('/search/books', 'SearchController@searchBooks');
- Route::get('/search/chapters', 'SearchController@searchChapters');
+ Route::get('/search', 'SearchController@search');
Route::get('/search/book/{bookId}', 'SearchController@searchBook');
+ Route::get('/search/chapter/{bookId}', 'SearchController@searchChapter');
// Other Pages
Route::get('/', 'HomeController@index');