Dan Brown

Updated all application urls to allow path prefix.

Allows BookStack to be installed at a non-root location on a domain.
Closes #40.
Showing 81 changed files with 480 additions and 404 deletions
...@@ -3,6 +3,10 @@ APP_ENV=production ...@@ -3,6 +3,10 @@ APP_ENV=production
3 APP_DEBUG=false 3 APP_DEBUG=false
4 APP_KEY=SomeRandomString 4 APP_KEY=SomeRandomString
5 5
6 +# The below url has to be set if using social auth options
7 +# or if you are not using BookStack at the root path of your domain.
8 +# APP_URL=http://bookstack.dev
9 +
6 # Database details 10 # Database details
7 DB_HOST=localhost 11 DB_HOST=localhost
8 DB_DATABASE=database_database 12 DB_DATABASE=database_database
...@@ -42,8 +46,6 @@ GITHUB_APP_ID=false ...@@ -42,8 +46,6 @@ GITHUB_APP_ID=false
42 GITHUB_APP_SECRET=false 46 GITHUB_APP_SECRET=false
43 GOOGLE_APP_ID=false 47 GOOGLE_APP_ID=false
44 GOOGLE_APP_SECRET=false 48 GOOGLE_APP_SECRET=false
45 -# URL used for social login redirects, NO TRAILING SLASH
46 -APP_URL=http://bookstack.dev
47 49
48 # External services such as Gravatar 50 # External services such as Gravatar
49 DISABLE_EXTERNAL_SERVICES=false 51 DISABLE_EXTERNAL_SERVICES=false
......
...@@ -7,10 +7,14 @@ class Book extends Entity ...@@ -7,10 +7,14 @@ class Book extends Entity
7 7
8 /** 8 /**
9 * Get the url for this book. 9 * Get the url for this book.
10 + * @param string|bool $path
10 * @return string 11 * @return string
11 */ 12 */
12 - public function getUrl() 13 + public function getUrl($path = false)
13 { 14 {
15 + if ($path !== false) {
16 + return baseUrl('/books/' . $this->slug . '/' . trim($path, '/'));
17 + }
14 return baseUrl('/books/' . $this->slug); 18 return baseUrl('/books/' . $this->slug);
15 } 19 }
16 20
......
...@@ -25,11 +25,15 @@ class Chapter extends Entity ...@@ -25,11 +25,15 @@ class Chapter extends Entity
25 25
26 /** 26 /**
27 * Get the url of this chapter. 27 * Get the url of this chapter.
28 + * @param string|bool $path
28 * @return string 29 * @return string
29 */ 30 */
30 - public function getUrl() 31 + public function getUrl($path = false)
31 { 32 {
32 $bookSlug = $this->getAttribute('bookSlug') ? $this->getAttribute('bookSlug') : $this->book->slug; 33 $bookSlug = $this->getAttribute('bookSlug') ? $this->getAttribute('bookSlug') : $this->book->slug;
34 + if ($path !== false) {
35 + return baseUrl('/books/' . $bookSlug. '/chapter/' . $this->slug . '/' . trim($path, '/'));
36 + }
33 return baseUrl('/books/' . $bookSlug. '/chapter/' . $this->slug); 37 return baseUrl('/books/' . $bookSlug. '/chapter/' . $this->slug);
34 } 38 }
35 39
......
...@@ -48,8 +48,8 @@ class Handler extends ExceptionHandler ...@@ -48,8 +48,8 @@ class Handler extends ExceptionHandler
48 // Handle notify exceptions which will redirect to the 48 // Handle notify exceptions which will redirect to the
49 // specified location then show a notification message. 49 // specified location then show a notification message.
50 if ($e instanceof NotifyException) { 50 if ($e instanceof NotifyException) {
51 - \Session::flash('error', $e->message); 51 + session()->flash('error', $e->message);
52 - return response()->redirectTo($e->redirectLocation); 52 + return redirect($e->redirectLocation);
53 } 53 }
54 54
55 // Handle pretty exceptions which will show a friendly application-fitting page 55 // Handle pretty exceptions which will show a friendly application-fitting page
......
1 -<?php 1 +<?php namespace BookStack\Http\Controllers\Auth;
2 -
3 -namespace BookStack\Http\Controllers\Auth;
4 2
5 use BookStack\Exceptions\AuthException; 3 use BookStack\Exceptions\AuthException;
6 -use BookStack\Exceptions\PrettyException;
7 use Illuminate\Contracts\Auth\Authenticatable; 4 use Illuminate\Contracts\Auth\Authenticatable;
8 use Illuminate\Http\Request; 5 use Illuminate\Http\Request;
9 use BookStack\Exceptions\SocialSignInException; 6 use BookStack\Exceptions\SocialSignInException;
...@@ -36,7 +33,6 @@ class AuthController extends Controller ...@@ -36,7 +33,6 @@ class AuthController extends Controller
36 protected $redirectAfterLogout = '/login'; 33 protected $redirectAfterLogout = '/login';
37 protected $username = 'email'; 34 protected $username = 'email';
38 35
39 -
40 protected $socialAuthService; 36 protected $socialAuthService;
41 protected $emailConfirmationService; 37 protected $emailConfirmationService;
42 protected $userRepo; 38 protected $userRepo;
...@@ -53,6 +49,8 @@ class AuthController extends Controller ...@@ -53,6 +49,8 @@ class AuthController extends Controller
53 $this->socialAuthService = $socialAuthService; 49 $this->socialAuthService = $socialAuthService;
54 $this->emailConfirmationService = $emailConfirmationService; 50 $this->emailConfirmationService = $emailConfirmationService;
55 $this->userRepo = $userRepo; 51 $this->userRepo = $userRepo;
52 + $this->redirectPath = baseUrl('/');
53 + $this->redirectAfterLogout = baseUrl('/login');
56 $this->username = config('auth.method') === 'standard' ? 'email' : 'username'; 54 $this->username = config('auth.method') === 'standard' ? 'email' : 'username';
57 parent::__construct(); 55 parent::__construct();
58 } 56 }
......
...@@ -412,7 +412,7 @@ class PageController extends Controller ...@@ -412,7 +412,7 @@ class PageController extends Controller
412 */ 412 */
413 public function showRecentlyCreated() 413 public function showRecentlyCreated()
414 { 414 {
415 - $pages = $this->pageRepo->getRecentlyCreatedPaginated(20); 415 + $pages = $this->pageRepo->getRecentlyCreatedPaginated(20)->setPath(baseUrl('/pages/recently-created'));
416 return view('pages/detailed-listing', [ 416 return view('pages/detailed-listing', [
417 'title' => 'Recently Created Pages', 417 'title' => 'Recently Created Pages',
418 'pages' => $pages 418 'pages' => $pages
...@@ -425,7 +425,7 @@ class PageController extends Controller ...@@ -425,7 +425,7 @@ class PageController extends Controller
425 */ 425 */
426 public function showRecentlyUpdated() 426 public function showRecentlyUpdated()
427 { 427 {
428 - $pages = $this->pageRepo->getRecentlyUpdatedPaginated(20); 428 + $pages = $this->pageRepo->getRecentlyUpdatedPaginated(20)->setPath(baseUrl('/pages/recently-updated'));
429 return view('pages/detailed-listing', [ 429 return view('pages/detailed-listing', [
430 'title' => 'Recently Updated Pages', 430 'title' => 'Recently Updated Pages',
431 'pages' => $pages 431 'pages' => $pages
......
...@@ -33,7 +33,7 @@ class Authenticate ...@@ -33,7 +33,7 @@ class Authenticate
33 public function handle($request, Closure $next) 33 public function handle($request, Closure $next)
34 { 34 {
35 if ($this->auth->check() && setting('registration-confirmation') && !$this->auth->user()->email_confirmed) { 35 if ($this->auth->check() && setting('registration-confirmation') && !$this->auth->user()->email_confirmed) {
36 - return redirect()->guest('/register/confirm/awaiting'); 36 + return redirect()->guest(baseUrl('/register/confirm/awaiting'));
37 } 37 }
38 38
39 if ($this->auth->guest() && !setting('app-public')) { 39 if ($this->auth->guest() && !setting('app-public')) {
......
...@@ -56,13 +56,19 @@ class Page extends Entity ...@@ -56,13 +56,19 @@ class Page extends Entity
56 56
57 /** 57 /**
58 * Get the url for this page. 58 * Get the url for this page.
59 + * @param string|bool $path
59 * @return string 60 * @return string
60 */ 61 */
61 - public function getUrl() 62 + public function getUrl($path = false)
62 { 63 {
63 $bookSlug = $this->getAttribute('bookSlug') ? $this->getAttribute('bookSlug') : $this->book->slug; 64 $bookSlug = $this->getAttribute('bookSlug') ? $this->getAttribute('bookSlug') : $this->book->slug;
64 $midText = $this->draft ? '/draft/' : '/page/'; 65 $midText = $this->draft ? '/draft/' : '/page/';
65 $idComponent = $this->draft ? $this->id : $this->slug; 66 $idComponent = $this->draft ? $this->id : $this->slug;
67 +
68 + if ($path !== false) {
69 + return baseUrl('/books/' . $bookSlug . $midText . $idComponent . '/' . trim($path, '/'));
70 + }
71 +
66 return baseUrl('/books/' . $bookSlug . $midText . $idComponent); 72 return baseUrl('/books/' . $bookSlug . $midText . $idComponent);
67 } 73 }
68 74
......
1 +<?php namespace BookStack\Providers;
2 +
3 +
4 +use Illuminate\Support\ServiceProvider;
5 +use Illuminate\Pagination\Paginator;
6 +
7 +class PaginationServiceProvider extends ServiceProvider
8 +{
9 + /**
10 + * Register the service provider.
11 + *
12 + * @return void
13 + */
14 + public function register()
15 + {
16 + Paginator::currentPathResolver(function () {
17 + return baseUrl($this->app['request']->path());
18 + });
19 +
20 + Paginator::currentPageResolver(function ($pageName = 'page') {
21 + $page = $this->app['request']->input($pageName);
22 +
23 + if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) {
24 + return $page;
25 + }
26 +
27 + return 1;
28 + });
29 + }
30 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -13,7 +13,7 @@ class ImageRepo ...@@ -13,7 +13,7 @@ class ImageRepo
13 13
14 protected $image; 14 protected $image;
15 protected $imageService; 15 protected $imageService;
16 - protected $restictionService; 16 + protected $restrictionService;
17 protected $page; 17 protected $page;
18 18
19 /** 19 /**
...@@ -27,7 +27,7 @@ class ImageRepo ...@@ -27,7 +27,7 @@ class ImageRepo
27 { 27 {
28 $this->image = $image; 28 $this->image = $image;
29 $this->imageService = $imageService; 29 $this->imageService = $imageService;
30 - $this->restictionService = $permissionService; 30 + $this->restrictionService = $permissionService;
31 $this->page = $page; 31 $this->page = $page;
32 } 32 }
33 33
...@@ -52,7 +52,7 @@ class ImageRepo ...@@ -52,7 +52,7 @@ class ImageRepo
52 */ 52 */
53 private function returnPaginated($query, $page = 0, $pageSize = 24) 53 private function returnPaginated($query, $page = 0, $pageSize = 24)
54 { 54 {
55 - $images = $this->restictionService->filterRelatedPages($query, 'images', 'uploaded_to'); 55 + $images = $this->restrictionService->filterRelatedPages($query, 'images', 'uploaded_to');
56 $images = $images->orderBy('created_at', 'desc')->skip($pageSize * $page)->take($pageSize + 1)->get(); 56 $images = $images->orderBy('created_at', 'desc')->skip($pageSize * $page)->take($pageSize + 1)->get();
57 $hasMore = count($images) > $pageSize; 57 $hasMore = count($images) > $pageSize;
58 58
......
...@@ -265,7 +265,7 @@ class ImageService ...@@ -265,7 +265,7 @@ class ImageService
265 $this->storageUrl = $storageUrl; 265 $this->storageUrl = $storageUrl;
266 } 266 }
267 267
268 - return ($this->storageUrl == false ? '' : rtrim($this->storageUrl, '/')) . $filePath; 268 + return ($this->storageUrl == false ? rtrim(baseUrl(''), '/') : rtrim($this->storageUrl, '/')) . $filePath;
269 } 269 }
270 270
271 271
......
...@@ -113,20 +113,20 @@ class SocialAuthService ...@@ -113,20 +113,20 @@ class SocialAuthService
113 if ($isLoggedIn && $socialAccount === null) { 113 if ($isLoggedIn && $socialAccount === null) {
114 $this->fillSocialAccount($socialDriver, $socialUser); 114 $this->fillSocialAccount($socialDriver, $socialUser);
115 $currentUser->socialAccounts()->save($this->socialAccount); 115 $currentUser->socialAccounts()->save($this->socialAccount);
116 - \Session::flash('success', title_case($socialDriver) . ' account was successfully attached to your profile.'); 116 + session()->flash('success', title_case($socialDriver) . ' account was successfully attached to your profile.');
117 return redirect($currentUser->getEditUrl()); 117 return redirect($currentUser->getEditUrl());
118 } 118 }
119 119
120 // When a user is logged in and the social account exists and is already linked to the current user. 120 // When a user is logged in and the social account exists and is already linked to the current user.
121 if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id === $currentUser->id) { 121 if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id === $currentUser->id) {
122 - \Session::flash('error', 'This ' . title_case($socialDriver) . ' account is already attached to your profile.'); 122 + session()->flash('error', 'This ' . title_case($socialDriver) . ' account is already attached to your profile.');
123 return redirect($currentUser->getEditUrl()); 123 return redirect($currentUser->getEditUrl());
124 } 124 }
125 125
126 // When a user is logged in, A social account exists but the users do not match. 126 // When a user is logged in, A social account exists but the users do not match.
127 // Change the user that the social account is assigned to. 127 // Change the user that the social account is assigned to.
128 if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id != $currentUser->id) { 128 if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id != $currentUser->id) {
129 - \Session::flash('success', 'This ' . title_case($socialDriver) . ' account is already used by another user.'); 129 + session()->flash('success', 'This ' . title_case($socialDriver) . ' account is already used by another user.');
130 return redirect($currentUser->getEditUrl()); 130 return redirect($currentUser->getEditUrl());
131 } 131 }
132 132
...@@ -135,6 +135,7 @@ class SocialAuthService ...@@ -135,6 +135,7 @@ class SocialAuthService
135 if (setting('registration-enabled')) { 135 if (setting('registration-enabled')) {
136 $message .= ' or, If you do not yet have an account, You can register an account using the ' . $socialDriver . ' option'; 136 $message .= ' or, If you do not yet have an account, You can register an account using the ' . $socialDriver . ' option';
137 } 137 }
138 +
138 throw new SocialSignInException($message . '.', '/login'); 139 throw new SocialSignInException($message . '.', '/login');
139 } 140 }
140 141
......
...@@ -161,6 +161,15 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon ...@@ -161,6 +161,15 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
161 } 161 }
162 162
163 /** 163 /**
164 + * Get the url that links to this user's profile.
165 + * @return mixed
166 + */
167 + public function getProfileUrl()
168 + {
169 + return baseUrl('/user/' . $this->id);
170 + }
171 +
172 + /**
164 * Get a shortened version of the user's name. 173 * Get a shortened version of the user's name.
165 * @param int $chars 174 * @param int $chars
166 * @return string 175 * @return string
......
...@@ -69,11 +69,34 @@ function setting($key, $default = false) ...@@ -69,11 +69,34 @@ function setting($key, $default = false)
69 */ 69 */
70 function baseUrl($path) 70 function baseUrl($path)
71 { 71 {
72 + if (strpos($path, 'http') === 0) return $path;
72 $path = trim($path, '/'); 73 $path = trim($path, '/');
73 return rtrim(config('app.url'), '/') . '/' . $path; 74 return rtrim(config('app.url'), '/') . '/' . $path;
74 } 75 }
75 76
76 /** 77 /**
78 + * Get an instance of the redirector.
79 + * Overrides the default laravel redirect helper.
80 + * Ensures it redirects even when the app is in a subdirectory.
81 + *
82 + * @param string|null $to
83 + * @param int $status
84 + * @param array $headers
85 + * @param bool $secure
86 + * @return \Illuminate\Routing\Redirector|\Illuminate\Http\RedirectResponse
87 + */
88 +function redirect($to = null, $status = 302, $headers = [], $secure = null)
89 +{
90 + if (is_null($to)) {
91 + return app('redirect');
92 + }
93 +
94 + $to = baseUrl($to);
95 +
96 + return app('redirect')->to($to, $status, $headers, $secure);
97 +}
98 +
99 +/**
77 * Generate a url with multiple parameters for sorting purposes. 100 * Generate a url with multiple parameters for sorting purposes.
78 * Works out the logic to set the correct sorting direction 101 * Works out the logic to set the correct sorting direction
79 * Discards empty parameters and allows overriding. 102 * Discards empty parameters and allows overriding.
...@@ -102,5 +125,5 @@ function sortUrl($path, $data, $overrideData = []) ...@@ -102,5 +125,5 @@ function sortUrl($path, $data, $overrideData = [])
102 125
103 if (count($queryStringSections) === 0) return $path; 126 if (count($queryStringSections) === 0) return $path;
104 127
105 - return $path . '?' . implode('&', $queryStringSections); 128 + return baseUrl($path . '?' . implode('&', $queryStringSections));
106 } 129 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -14,6 +14,7 @@ define('LARAVEL_START', microtime(true)); ...@@ -14,6 +14,7 @@ define('LARAVEL_START', microtime(true));
14 | 14 |
15 */ 15 */
16 16
17 +require __DIR__.'/../app/helpers.php';
17 require __DIR__.'/../vendor/autoload.php'; 18 require __DIR__.'/../vendor/autoload.php';
18 19
19 /* 20 /*
......
...@@ -29,10 +29,7 @@ ...@@ -29,10 +29,7 @@
29 ], 29 ],
30 "psr-4": { 30 "psr-4": {
31 "BookStack\\": "app/" 31 "BookStack\\": "app/"
32 - }, 32 + }
33 - "files": [
34 - "app/helpers.php"
35 - ]
36 }, 33 },
37 "autoload-dev": { 34 "autoload-dev": {
38 "classmap": [ 35 "classmap": [
......
...@@ -130,7 +130,6 @@ return [ ...@@ -130,7 +130,6 @@ return [
130 Illuminate\Foundation\Providers\FoundationServiceProvider::class, 130 Illuminate\Foundation\Providers\FoundationServiceProvider::class,
131 Illuminate\Hashing\HashServiceProvider::class, 131 Illuminate\Hashing\HashServiceProvider::class,
132 Illuminate\Mail\MailServiceProvider::class, 132 Illuminate\Mail\MailServiceProvider::class,
133 - Illuminate\Pagination\PaginationServiceProvider::class,
134 Illuminate\Pipeline\PipelineServiceProvider::class, 133 Illuminate\Pipeline\PipelineServiceProvider::class,
135 Illuminate\Queue\QueueServiceProvider::class, 134 Illuminate\Queue\QueueServiceProvider::class,
136 Illuminate\Redis\RedisServiceProvider::class, 135 Illuminate\Redis\RedisServiceProvider::class,
...@@ -153,6 +152,8 @@ return [ ...@@ -153,6 +152,8 @@ return [
153 /* 152 /*
154 * Application Service Providers... 153 * Application Service Providers...
155 */ 154 */
155 + BookStack\Providers\PaginationServiceProvider::class,
156 +
156 BookStack\Providers\AuthServiceProvider::class, 157 BookStack\Providers\AuthServiceProvider::class,
157 BookStack\Providers\AppServiceProvider::class, 158 BookStack\Providers\AppServiceProvider::class,
158 BookStack\Providers\EventServiceProvider::class, 159 BookStack\Providers\EventServiceProvider::class,
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
5 */ 5 */
6 return [ 6 return [
7 7
8 - 'app-editor' => 'wysiwyg', 8 + 'app-name' => 'BookStack',
9 - 'app-color' => '#0288D1', 9 + 'app-editor' => 'wysiwyg',
10 + 'app-color' => '#0288D1',
10 'app-color-light' => 'rgba(21, 101, 192, 0.15)' 11 'app-color-light' => 'rgba(21, 101, 192, 0.15)'
11 12
12 ]; 13 ];
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -50,3 +50,4 @@ These are the great projects used to help build BookStack: ...@@ -50,3 +50,4 @@ These are the great projects used to help build BookStack:
50 * [ZeroClipboard](http://zeroclipboard.org/) 50 * [ZeroClipboard](http://zeroclipboard.org/)
51 * [TinyColorPicker](http://www.dematte.at/tinyColorPicker/index.html) 51 * [TinyColorPicker](http://www.dematte.at/tinyColorPicker/index.html)
52 * [Marked](https://github.com/chjj/marked) 52 * [Marked](https://github.com/chjj/marked)
53 +* [Moment.js](http://momentjs.com/)
......
1 "use strict"; 1 "use strict";
2 2
3 -var moment = require('moment'); 3 +const moment = require('moment');
4 4
5 module.exports = function (ngApp, events) { 5 module.exports = function (ngApp, events) {
6 6
...@@ -35,7 +35,7 @@ module.exports = function (ngApp, events) { ...@@ -35,7 +35,7 @@ module.exports = function (ngApp, events) {
35 * @returns {string} 35 * @returns {string}
36 */ 36 */
37 $scope.getUploadUrl = function () { 37 $scope.getUploadUrl = function () {
38 - return '/images/' + $scope.imageType + '/upload'; 38 + return window.baseUrl('/images/' + $scope.imageType + '/upload');
39 }; 39 };
40 40
41 /** 41 /**
...@@ -133,7 +133,7 @@ module.exports = function (ngApp, events) { ...@@ -133,7 +133,7 @@ module.exports = function (ngApp, events) {
133 $scope.showing = false; 133 $scope.showing = false;
134 }; 134 };
135 135
136 - var baseUrl = '/images/' + $scope.imageType + '/all/' 136 + var baseUrl = window.baseUrl('/images/' + $scope.imageType + '/all/');
137 137
138 /** 138 /**
139 * Fetch the list image data from the server. 139 * Fetch the list image data from the server.
...@@ -178,7 +178,7 @@ module.exports = function (ngApp, events) { ...@@ -178,7 +178,7 @@ module.exports = function (ngApp, events) {
178 $scope.images = []; 178 $scope.images = [];
179 $scope.hasMore = false; 179 $scope.hasMore = false;
180 page = 0; 180 page = 0;
181 - baseUrl = '/images/' + $scope.imageType + '/search/'; 181 + baseUrl = window.baseUrl('/images/' + $scope.imageType + '/search/');
182 fetchData(); 182 fetchData();
183 }; 183 };
184 184
...@@ -192,7 +192,7 @@ module.exports = function (ngApp, events) { ...@@ -192,7 +192,7 @@ module.exports = function (ngApp, events) {
192 $scope.hasMore = false; 192 $scope.hasMore = false;
193 page = 0; 193 page = 0;
194 $scope.view = viewName; 194 $scope.view = viewName;
195 - baseUrl = '/images/' + $scope.imageType + '/' + viewName + '/'; 195 + baseUrl = window.baseUrl('/images/' + $scope.imageType + '/' + viewName + '/');
196 fetchData(); 196 fetchData();
197 } 197 }
198 198
...@@ -202,7 +202,7 @@ module.exports = function (ngApp, events) { ...@@ -202,7 +202,7 @@ module.exports = function (ngApp, events) {
202 */ 202 */
203 $scope.saveImageDetails = function (event) { 203 $scope.saveImageDetails = function (event) {
204 event.preventDefault(); 204 event.preventDefault();
205 - var url = '/images/update/' + $scope.selectedImage.id; 205 + var url = window.baseUrl('/images/update/' + $scope.selectedImage.id);
206 $http.put(url, this.selectedImage).then((response) => { 206 $http.put(url, this.selectedImage).then((response) => {
207 events.emit('success', 'Image details updated'); 207 events.emit('success', 'Image details updated');
208 }, (response) => { 208 }, (response) => {
...@@ -228,7 +228,7 @@ module.exports = function (ngApp, events) { ...@@ -228,7 +228,7 @@ module.exports = function (ngApp, events) {
228 $scope.deleteImage = function (event) { 228 $scope.deleteImage = function (event) {
229 event.preventDefault(); 229 event.preventDefault();
230 var force = $scope.dependantPages !== false; 230 var force = $scope.dependantPages !== false;
231 - var url = '/images/' + $scope.selectedImage.id; 231 + var url = window.baseUrl('/images/' + $scope.selectedImage.id);
232 if (force) url += '?force=true'; 232 if (force) url += '?force=true';
233 $http.delete(url).then((response) => { 233 $http.delete(url).then((response) => {
234 $scope.images.splice($scope.images.indexOf($scope.selectedImage), 1); 234 $scope.images.splice($scope.images.indexOf($scope.selectedImage), 1);
...@@ -267,7 +267,7 @@ module.exports = function (ngApp, events) { ...@@ -267,7 +267,7 @@ module.exports = function (ngApp, events) {
267 if (term.length == 0) return; 267 if (term.length == 0) return;
268 $scope.searching = true; 268 $scope.searching = true;
269 $scope.searchResults = ''; 269 $scope.searchResults = '';
270 - var searchUrl = '/search/book/' + $attrs.bookId; 270 + var searchUrl = window.baseUrl('/search/book/' + $attrs.bookId);
271 searchUrl += '?term=' + encodeURIComponent(term); 271 searchUrl += '?term=' + encodeURIComponent(term);
272 $http.get(searchUrl).then((response) => { 272 $http.get(searchUrl).then((response) => {
273 $scope.searchResults = $sce.trustAsHtml(response.data); 273 $scope.searchResults = $sce.trustAsHtml(response.data);
...@@ -368,7 +368,8 @@ module.exports = function (ngApp, events) { ...@@ -368,7 +368,8 @@ module.exports = function (ngApp, events) {
368 368
369 if (isMarkdown) data.markdown = $scope.editContent; 369 if (isMarkdown) data.markdown = $scope.editContent;
370 370
371 - $http.put('/ajax/page/' + pageId + '/save-draft', data).then((responseData) => { 371 + let url = window.baseUrl('/ajax/page/' + pageId + '/save-draft');
372 + $http.put(url, data).then((responseData) => {
372 var updateTime = moment.utc(moment.unix(responseData.data.timestamp)).toDate(); 373 var updateTime = moment.utc(moment.unix(responseData.data.timestamp)).toDate();
373 $scope.draftText = responseData.data.message + moment(updateTime).format('HH:mm'); 374 $scope.draftText = responseData.data.message + moment(updateTime).format('HH:mm');
374 if (!$scope.isNewPageDraft) $scope.isUpdateDraft = true; 375 if (!$scope.isNewPageDraft) $scope.isUpdateDraft = true;
...@@ -393,7 +394,8 @@ module.exports = function (ngApp, events) { ...@@ -393,7 +394,8 @@ module.exports = function (ngApp, events) {
393 * content from the system via an AJAX request. 394 * content from the system via an AJAX request.
394 */ 395 */
395 $scope.discardDraft = function () { 396 $scope.discardDraft = function () {
396 - $http.get('/ajax/page/' + pageId).then((responseData) => { 397 + let url = window.baseUrl('/ajax/page/' + pageId);
398 + $http.get(url).then((responseData) => {
397 if (autoSave) $interval.cancel(autoSave); 399 if (autoSave) $interval.cancel(autoSave);
398 $scope.draftText = 'Editing Page'; 400 $scope.draftText = 'Editing Page';
399 $scope.isUpdateDraft = false; 401 $scope.isUpdateDraft = false;
...@@ -437,7 +439,8 @@ module.exports = function (ngApp, events) { ...@@ -437,7 +439,8 @@ module.exports = function (ngApp, events) {
437 * Get all tags for the current book and add into scope. 439 * Get all tags for the current book and add into scope.
438 */ 440 */
439 function getTags() { 441 function getTags() {
440 - $http.get('/ajax/tags/get/page/' + pageId).then((responseData) => { 442 + let url = window.baseUrl('/ajax/tags/get/page/' + pageId);
443 + $http.get(url).then((responseData) => {
441 $scope.tags = responseData.data; 444 $scope.tags = responseData.data;
442 addEmptyTag(); 445 addEmptyTag();
443 }); 446 });
...@@ -486,7 +489,8 @@ module.exports = function (ngApp, events) { ...@@ -486,7 +489,8 @@ module.exports = function (ngApp, events) {
486 $scope.saveTags = function() { 489 $scope.saveTags = function() {
487 setTagOrder(); 490 setTagOrder();
488 let postData = {tags: $scope.tags}; 491 let postData = {tags: $scope.tags};
489 - $http.post('/ajax/tags/update/page/' + pageId, postData).then((responseData) => { 492 + let url = window.baseUrl('/ajax/tags/update/page/' + pageId);
493 + $http.post(url, postData).then((responseData) => {
490 $scope.tags = responseData.data.tags; 494 $scope.tags = responseData.data.tags;
491 addEmptyTag(); 495 addEmptyTag();
492 events.emit('success', responseData.data.message); 496 events.emit('success', responseData.data.message);
......
1 "use strict"; 1 "use strict";
2 -var DropZone = require('dropzone'); 2 +const DropZone = require('dropzone');
3 -var markdown = require('marked'); 3 +const markdown = require('marked');
4 4
5 -var toggleSwitchTemplate = require('./components/toggle-switch.html'); 5 +const toggleSwitchTemplate = require('./components/toggle-switch.html');
6 -var imagePickerTemplate = require('./components/image-picker.html'); 6 +const imagePickerTemplate = require('./components/image-picker.html');
7 -var dropZoneTemplate = require('./components/drop-zone.html'); 7 +const dropZoneTemplate = require('./components/drop-zone.html');
8 8
9 module.exports = function (ngApp, events) { 9 module.exports = function (ngApp, events) {
10 10
...@@ -54,7 +54,7 @@ module.exports = function (ngApp, events) { ...@@ -54,7 +54,7 @@ module.exports = function (ngApp, events) {
54 imageClass: '@' 54 imageClass: '@'
55 }, 55 },
56 link: function (scope, element, attrs) { 56 link: function (scope, element, attrs) {
57 - var usingIds = typeof scope.currentId !== 'undefined' || scope.currentId === 'false'; 57 + let usingIds = typeof scope.currentId !== 'undefined' || scope.currentId === 'false';
58 scope.image = scope.currentImage; 58 scope.image = scope.currentImage;
59 scope.value = scope.currentImage || ''; 59 scope.value = scope.currentImage || '';
60 if (usingIds) scope.value = scope.currentId; 60 if (usingIds) scope.value = scope.currentId;
...@@ -80,7 +80,7 @@ module.exports = function (ngApp, events) { ...@@ -80,7 +80,7 @@ module.exports = function (ngApp, events) {
80 }; 80 };
81 81
82 scope.updateImageFromModel = function (model) { 82 scope.updateImageFromModel = function (model) {
83 - var isResized = scope.resizeWidth && scope.resizeHeight; 83 + let isResized = scope.resizeWidth && scope.resizeHeight;
84 84
85 if (!isResized) { 85 if (!isResized) {
86 scope.$apply(() => { 86 scope.$apply(() => {
...@@ -89,8 +89,9 @@ module.exports = function (ngApp, events) { ...@@ -89,8 +89,9 @@ module.exports = function (ngApp, events) {
89 return; 89 return;
90 } 90 }
91 91
92 - var cropped = scope.resizeCrop ? 'true' : 'false'; 92 + let cropped = scope.resizeCrop ? 'true' : 'false';
93 - var requestString = '/images/thumb/' + model.id + '/' + scope.resizeWidth + '/' + scope.resizeHeight + '/' + cropped; 93 + let requestString = '/images/thumb/' + model.id + '/' + scope.resizeWidth + '/' + scope.resizeHeight + '/' + cropped;
94 + requestString = window.baseUrl(requestString);
94 $http.get(requestString).then((response) => { 95 $http.get(requestString).then((response) => {
95 setImage(model, response.data.url); 96 setImage(model, response.data.url);
96 }); 97 });
...@@ -332,9 +333,9 @@ module.exports = function (ngApp, events) { ...@@ -332,9 +333,9 @@ module.exports = function (ngApp, events) {
332 // Insert image shortcut 333 // Insert image shortcut
333 if (event.which === 73 && event.ctrlKey && event.shiftKey) { 334 if (event.which === 73 && event.ctrlKey && event.shiftKey) {
334 event.preventDefault(); 335 event.preventDefault();
335 - var caretPos = input[0].selectionStart; 336 + let caretPos = input[0].selectionStart;
336 - var currentContent = input.val(); 337 + let currentContent = input.val();
337 - var mdImageText = "![](http://)"; 338 + const mdImageText = "![](http://)";
338 input.val(currentContent.substring(0, caretPos) + mdImageText + currentContent.substring(caretPos)); 339 input.val(currentContent.substring(0, caretPos) + mdImageText + currentContent.substring(caretPos));
339 input.focus(); 340 input.focus();
340 input[0].selectionStart = caretPos + ("![](".length); 341 input[0].selectionStart = caretPos + ("![](".length);
...@@ -348,9 +349,9 @@ module.exports = function (ngApp, events) { ...@@ -348,9 +349,9 @@ module.exports = function (ngApp, events) {
348 // Insert image from image manager 349 // Insert image from image manager
349 insertImage.click(event => { 350 insertImage.click(event => {
350 window.ImageManager.showExternal(image => { 351 window.ImageManager.showExternal(image => {
351 - var caretPos = currentCaretPos; 352 + let caretPos = currentCaretPos;
352 - var currentContent = input.val(); 353 + let currentContent = input.val();
353 - var mdImageText = "![" + image.name + "](" + image.url + ")"; 354 + let mdImageText = "![" + image.name + "](" + image.url + ")";
354 input.val(currentContent.substring(0, caretPos) + mdImageText + currentContent.substring(caretPos)); 355 input.val(currentContent.substring(0, caretPos) + mdImageText + currentContent.substring(caretPos));
355 input.change(); 356 input.change();
356 }); 357 });
...@@ -624,7 +625,7 @@ module.exports = function (ngApp, events) { ...@@ -624,7 +625,7 @@ module.exports = function (ngApp, events) {
624 // Get search url with correct types 625 // Get search url with correct types
625 function getSearchUrl() { 626 function getSearchUrl() {
626 let types = (attrs.entityTypes) ? encodeURIComponent(attrs.entityTypes) : encodeURIComponent('page,book,chapter'); 627 let types = (attrs.entityTypes) ? encodeURIComponent(attrs.entityTypes) : encodeURIComponent('page,book,chapter');
627 - return `/ajax/search/entities?types=${types}`; 628 + return window.baseUrl(`/ajax/search/entities?types=${types}`);
628 } 629 }
629 630
630 // Get initial contents 631 // Get initial contents
......
...@@ -7,6 +7,14 @@ var ngAnimate = require('angular-animate'); ...@@ -7,6 +7,14 @@ var ngAnimate = require('angular-animate');
7 var ngSanitize = require('angular-sanitize'); 7 var ngSanitize = require('angular-sanitize');
8 require('angular-ui-sortable'); 8 require('angular-ui-sortable');
9 9
10 +// Url retrieval function
11 +window.baseUrl = function(path) {
12 + let basePath = document.querySelector('meta[name="base-url"]').getAttribute('content');
13 + if (basePath[basePath.length-1] === '/') basePath = basePath.slice(0, basePath.length-1);
14 + if (path[0] === '/') path = path.slice(1);
15 + return basePath + '/' + path;
16 +};
17 +
10 var ngApp = angular.module('bookStack', ['ngResource', 'ngAnimate', 'ngSanitize', 'ui.sortable']); 18 var ngApp = angular.module('bookStack', ['ngResource', 'ngAnimate', 'ngSanitize', 'ui.sortable']);
11 19
12 // Global Event System 20 // Global Event System
...@@ -29,6 +37,7 @@ var Events = { ...@@ -29,6 +37,7 @@ var Events = {
29 }; 37 };
30 window.Events = Events; 38 window.Events = Events;
31 39
40 +
32 var services = require('./services')(ngApp, Events); 41 var services = require('./services')(ngApp, Events);
33 var directives = require('./directives')(ngApp, Events); 42 var directives = require('./directives')(ngApp, Events);
34 var controllers = require('./controllers')(ngApp, Events); 43 var controllers = require('./controllers')(ngApp, Events);
......
1 var mceOptions = module.exports = { 1 var mceOptions = module.exports = {
2 selector: '#html-editor', 2 selector: '#html-editor',
3 content_css: [ 3 content_css: [
4 - '/css/styles.css', 4 + window.baseUrl('/css/styles.css'),
5 - '/libs/material-design-iconic-font/css/material-design-iconic-font.min.css' 5 + window.baseUrl('/libs/material-design-iconic-font/css/material-design-iconic-font.min.css')
6 ], 6 ],
7 body_class: 'page-content', 7 body_class: 'page-content',
8 relative_urls: false, 8 relative_urls: false,
...@@ -148,7 +148,7 @@ var mceOptions = module.exports = { ...@@ -148,7 +148,7 @@ var mceOptions = module.exports = {
148 formData.append('file', file, remoteFilename); 148 formData.append('file', file, remoteFilename);
149 formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content')); 149 formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content'));
150 150
151 - xhr.open('POST', '/images/gallery/upload'); 151 + xhr.open('POST', window.baseUrl('/images/gallery/upload'));
152 xhr.onload = function () { 152 xhr.onload = function () {
153 if (xhr.status === 200 || xhr.status === 201) { 153 if (xhr.status === 200 || xhr.status === 201) {
154 var result = JSON.parse(xhr.responseText); 154 var result = JSON.parse(xhr.responseText);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 // Configure ZeroClipboard 2 // Configure ZeroClipboard
3 var zeroClipBoard = require('zeroclipboard'); 3 var zeroClipBoard = require('zeroclipboard');
4 zeroClipBoard.config({ 4 zeroClipBoard.config({
5 - swfPath: '/ZeroClipboard.swf' 5 + swfPath: window.baseUrl('/ZeroClipboard.swf')
6 }); 6 });
7 7
8 window.setupPageShow = module.exports = function (pageId) { 8 window.setupPageShow = module.exports = function (pageId) {
...@@ -36,7 +36,8 @@ window.setupPageShow = module.exports = function (pageId) { ...@@ -36,7 +36,8 @@ window.setupPageShow = module.exports = function (pageId) {
36 36
37 // Show pointer and set link 37 // Show pointer and set link
38 var $elem = $(this); 38 var $elem = $(this);
39 - var link = window.location.protocol + "//" + window.location.host + '/link/' + pageId + '#' + $elem.attr('id'); 39 + let link = window.baseUrl('/link/' + pageId + '#' + $elem.attr('id'));
40 + if (link.indexOf('http') !== 0) link = window.location.protocol + "//" + window.location.host + link;
40 $pointer.find('input').val(link); 41 $pointer.find('input').val(link);
41 $pointer.find('button').first().attr('data-clipboard-text', link); 42 $pointer.find('button').first().attr('data-clipboard-text', link);
42 $elem.before($pointer); 43 $elem.before($pointer);
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
6 font-style: normal; 6 font-style: normal;
7 font-weight: 100; 7 font-weight: 100;
8 src: local('Roboto Thin'), local('Roboto-Thin'), 8 src: local('Roboto Thin'), local('Roboto-Thin'),
9 - url('/fonts/roboto-v15-cyrillic_latin-100.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 9 + url('../fonts/roboto-v15-cyrillic_latin-100.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
10 - url('/fonts/roboto-v15-cyrillic_latin-100.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 10 + url('../fonts/roboto-v15-cyrillic_latin-100.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
11 } 11 }
12 /* roboto-100italic - cyrillic_latin */ 12 /* roboto-100italic - cyrillic_latin */
13 @font-face { 13 @font-face {
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
15 font-style: italic; 15 font-style: italic;
16 font-weight: 100; 16 font-weight: 100;
17 src: local('Roboto Thin Italic'), local('Roboto-ThinItalic'), 17 src: local('Roboto Thin Italic'), local('Roboto-ThinItalic'),
18 - url('/fonts/roboto-v15-cyrillic_latin-100italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 18 + url('../fonts/roboto-v15-cyrillic_latin-100italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
19 - url('/fonts/roboto-v15-cyrillic_latin-100italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 19 + url('../fonts/roboto-v15-cyrillic_latin-100italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
20 } 20 }
21 /* roboto-300 - cyrillic_latin */ 21 /* roboto-300 - cyrillic_latin */
22 @font-face { 22 @font-face {
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
24 font-style: normal; 24 font-style: normal;
25 font-weight: 300; 25 font-weight: 300;
26 src: local('Roboto Light'), local('Roboto-Light'), 26 src: local('Roboto Light'), local('Roboto-Light'),
27 - url('/fonts/roboto-v15-cyrillic_latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 27 + url('../fonts/roboto-v15-cyrillic_latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
28 - url('/fonts/roboto-v15-cyrillic_latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 28 + url('../fonts/roboto-v15-cyrillic_latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
29 } 29 }
30 /* roboto-300italic - cyrillic_latin */ 30 /* roboto-300italic - cyrillic_latin */
31 @font-face { 31 @font-face {
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
33 font-style: italic; 33 font-style: italic;
34 font-weight: 300; 34 font-weight: 300;
35 src: local('Roboto Light Italic'), local('Roboto-LightItalic'), 35 src: local('Roboto Light Italic'), local('Roboto-LightItalic'),
36 - url('/fonts/roboto-v15-cyrillic_latin-300italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 36 + url('../fonts/roboto-v15-cyrillic_latin-300italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
37 - url('/fonts/roboto-v15-cyrillic_latin-300italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 37 + url('../fonts/roboto-v15-cyrillic_latin-300italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
38 } 38 }
39 /* roboto-regular - cyrillic_latin */ 39 /* roboto-regular - cyrillic_latin */
40 @font-face { 40 @font-face {
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
42 font-style: normal; 42 font-style: normal;
43 font-weight: 400; 43 font-weight: 400;
44 src: local('Roboto'), local('Roboto-Regular'), 44 src: local('Roboto'), local('Roboto-Regular'),
45 - url('/fonts/roboto-v15-cyrillic_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 45 + url('../fonts/roboto-v15-cyrillic_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
46 - url('/fonts/roboto-v15-cyrillic_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 46 + url('../fonts/roboto-v15-cyrillic_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
47 } 47 }
48 /* roboto-italic - cyrillic_latin */ 48 /* roboto-italic - cyrillic_latin */
49 @font-face { 49 @font-face {
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
51 font-style: italic; 51 font-style: italic;
52 font-weight: 400; 52 font-weight: 400;
53 src: local('Roboto Italic'), local('Roboto-Italic'), 53 src: local('Roboto Italic'), local('Roboto-Italic'),
54 - url('/fonts/roboto-v15-cyrillic_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 54 + url('../fonts/roboto-v15-cyrillic_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
55 - url('/fonts/roboto-v15-cyrillic_latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 55 + url('../fonts/roboto-v15-cyrillic_latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
56 } 56 }
57 /* roboto-500 - cyrillic_latin */ 57 /* roboto-500 - cyrillic_latin */
58 @font-face { 58 @font-face {
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
60 font-style: normal; 60 font-style: normal;
61 font-weight: 500; 61 font-weight: 500;
62 src: local('Roboto Medium'), local('Roboto-Medium'), 62 src: local('Roboto Medium'), local('Roboto-Medium'),
63 - url('/fonts/roboto-v15-cyrillic_latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 63 + url('../fonts/roboto-v15-cyrillic_latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
64 - url('/fonts/roboto-v15-cyrillic_latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 64 + url('../fonts/roboto-v15-cyrillic_latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
65 } 65 }
66 /* roboto-500italic - cyrillic_latin */ 66 /* roboto-500italic - cyrillic_latin */
67 @font-face { 67 @font-face {
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
69 font-style: italic; 69 font-style: italic;
70 font-weight: 500; 70 font-weight: 500;
71 src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'), 71 src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'),
72 - url('/fonts/roboto-v15-cyrillic_latin-500italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 72 + url('../fonts/roboto-v15-cyrillic_latin-500italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
73 - url('/fonts/roboto-v15-cyrillic_latin-500italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 73 + url('../fonts/roboto-v15-cyrillic_latin-500italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
74 } 74 }
75 /* roboto-700 - cyrillic_latin */ 75 /* roboto-700 - cyrillic_latin */
76 @font-face { 76 @font-face {
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
78 font-style: normal; 78 font-style: normal;
79 font-weight: 700; 79 font-weight: 700;
80 src: local('Roboto Bold'), local('Roboto-Bold'), 80 src: local('Roboto Bold'), local('Roboto-Bold'),
81 - url('/fonts/roboto-v15-cyrillic_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 81 + url('../fonts/roboto-v15-cyrillic_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
82 - url('/fonts/roboto-v15-cyrillic_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 82 + url('../fonts/roboto-v15-cyrillic_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
83 } 83 }
84 /* roboto-700italic - cyrillic_latin */ 84 /* roboto-700italic - cyrillic_latin */
85 @font-face { 85 @font-face {
...@@ -87,8 +87,8 @@ ...@@ -87,8 +87,8 @@
87 font-style: italic; 87 font-style: italic;
88 font-weight: 700; 88 font-weight: 700;
89 src: local('Roboto Bold Italic'), local('Roboto-BoldItalic'), 89 src: local('Roboto Bold Italic'), local('Roboto-BoldItalic'),
90 - url('/fonts/roboto-v15-cyrillic_latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 90 + url('../fonts/roboto-v15-cyrillic_latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
91 - url('/fonts/roboto-v15-cyrillic_latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 91 + url('../fonts/roboto-v15-cyrillic_latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
92 } 92 }
93 93
94 /* roboto-mono-regular - latin */ 94 /* roboto-mono-regular - latin */
...@@ -97,6 +97,6 @@ ...@@ -97,6 +97,6 @@
97 font-style: normal; 97 font-style: normal;
98 font-weight: 400; 98 font-weight: 400;
99 src: local('Roboto Mono'), local('RobotoMono-Regular'), 99 src: local('Roboto Mono'), local('RobotoMono-Regular'),
100 - url('/fonts/roboto-mono-v4-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */ 100 + url('../fonts/roboto-mono-v4-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
101 - url('/fonts/roboto-mono-v4-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 101 + url('../fonts/roboto-mono-v4-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
102 } 102 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
6 <div class="form-group"> 6 <div class="form-group">
7 <label for="password">Password</label> 7 <label for="password">Password</label>
8 @include('form/password', ['name' => 'password', 'tabindex' => 2]) 8 @include('form/password', ['name' => 'password', 'tabindex' => 2])
9 - <span class="block small"><a href="/password/email">Forgot Password?</a></span> 9 + <span class="block small"><a href="{{ baseUrl('/password/email') }}">Forgot Password?</a></span>
10 </div> 10 </div>
...\ No newline at end of file ...\ No newline at end of file
......
1 @extends('public') 1 @extends('public')
2 2
3 @section('header-buttons') 3 @section('header-buttons')
4 - @if(Setting::get('registration-enabled')) 4 + @if(setting('registration-enabled', false))
5 - <a href="/register"><i class="zmdi zmdi-account-add"></i>Sign up</a> 5 + <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>Sign up</a>
6 @endif 6 @endif
7 @stop 7 @stop
8 8
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <div class="center-box"> 12 <div class="center-box">
13 <h1>Log In</h1> 13 <h1>Log In</h1>
14 14
15 - <form action="/login" method="POST" id="login-form"> 15 + <form action="{{ baseUrl("/login") }}" method="POST" id="login-form">
16 {!! csrf_field() !!} 16 {!! csrf_field() !!}
17 17
18 18
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
34 <hr class="margin-top"> 34 <hr class="margin-top">
35 <h3 class="text-muted">Social Login</h3> 35 <h3 class="text-muted">Social Login</h3>
36 @if(isset($socialDrivers['google'])) 36 @if(isset($socialDrivers['google']))
37 - <a href="/login/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a> 37 + <a href="{{ baseUrl("/login/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
38 @endif 38 @endif
39 @if(isset($socialDrivers['github'])) 39 @if(isset($socialDrivers['github']))
40 - <a href="/login/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a> 40 + <a href="{{ baseUrl("/login/service/github") }}" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a>
41 @endif 41 @endif
42 @endif 42 @endif
43 </div> 43 </div>
......
1 @extends('public') 1 @extends('public')
2 2
3 -@section('body-class', 'image-cover login')
4 -
5 @section('content') 3 @section('content')
6 4
7 5
...@@ -11,7 +9,7 @@ ...@@ -11,7 +9,7 @@
11 9
12 <p class="muted small">Enter your email below and you will be sent an email with a password reset link.</p> 10 <p class="muted small">Enter your email below and you will be sent an email with a password reset link.</p>
13 11
14 - <form action="/password/email" method="POST"> 12 + <form action="{{ baseUrl("/password/email") }}" method="POST">
15 {!! csrf_field() !!} 13 {!! csrf_field() !!}
16 14
17 <div class="form-group"> 15 <div class="form-group">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 2
3 @section('header-buttons') 3 @section('header-buttons')
4 @if(!$signedIn) 4 @if(!$signedIn)
5 - <a href="/login"><i class="zmdi zmdi-sign-in"></i>Sign in</a> 5 + <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
6 @endif 6 @endif
7 @stop 7 @stop
8 8
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
11 <div class="text-center"> 11 <div class="text-center">
12 <div class="center-box"> 12 <div class="center-box">
13 <h2>Thanks for registering!</h2> 13 <h2>Thanks for registering!</h2>
14 - <p>Please check your email and click the confirmation button to access {{ \Setting::get('app-name') }}.</p> 14 + <p>Please check your email and click the confirmation button to access {{ setting('app-name', 'BookStack') }}.</p>
15 </div> 15 </div>
16 </div> 16 </div>
17 17
......
1 @extends('public') 1 @extends('public')
2 2
3 @section('header-buttons') 3 @section('header-buttons')
4 - <a href="/login"><i class="zmdi zmdi-sign-in"></i>Sign in</a> 4 + <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
5 @stop 5 @stop
6 6
7 @section('content') 7 @section('content')
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
10 <div class="center-box"> 10 <div class="center-box">
11 <h1>Sign Up</h1> 11 <h1>Sign Up</h1>
12 12
13 - <form action="/register" method="POST"> 13 + <form action="{{ baseUrl("/register") }}" method="POST">
14 {!! csrf_field() !!} 14 {!! csrf_field() !!}
15 15
16 <div class="form-group"> 16 <div class="form-group">
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
38 <h3 class="text-muted">Social Registration</h3> 38 <h3 class="text-muted">Social Registration</h3>
39 <p class="text-small">Register and sign in using another service.</p> 39 <p class="text-small">Register and sign in using another service.</p>
40 @if(isset($socialDrivers['google'])) 40 @if(isset($socialDrivers['google']))
41 - <a href="/register/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a> 41 + <a href="{{ baseUrl("/register/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
42 @endif 42 @endif
43 @if(isset($socialDrivers['github'])) 43 @if(isset($socialDrivers['github']))
44 - <a href="/register/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a> 44 + <a href="{{ baseUrl("/register/service/github") }}" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a>
45 @endif 45 @endif
46 @endif 46 @endif
47 </div> 47 </div>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
9 <div class="center-box text-left"> 9 <div class="center-box text-left">
10 <h1>Reset Password</h1> 10 <h1>Reset Password</h1>
11 11
12 - <form action="/password/reset" method="POST"> 12 + <form action="{{ baseUrl("/password/reset") }}" method="POST">
13 {!! csrf_field() !!} 13 {!! csrf_field() !!}
14 <input type="hidden" name="token" value="{{ $token }}"> 14 <input type="hidden" name="token" value="{{ $token }}">
15 15
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
10 If you cannot find the email you can re-send the confirmation email by submitting the form below. 10 If you cannot find the email you can re-send the confirmation email by submitting the form below.
11 </p> 11 </p>
12 <hr> 12 <hr>
13 - <form action="/register/confirm/resend" method="POST"> 13 + <form action="{{ baseUrl("/register/confirm/resend") }}" method="POST">
14 {!! csrf_field() !!} 14 {!! csrf_field() !!}
15 <div class="form-group"> 15 <div class="form-group">
16 <label for="email">Email Address</label> 16 <label for="email">Email Address</label>
......
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html class="@yield('body-class')"> 2 <html class="@yield('body-class')">
3 <head> 3 <head>
4 - <title>{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name', 'BookStack') }}</title> 4 + <title>{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name') }}</title>
5 5
6 <!-- Meta --> 6 <!-- Meta -->
7 <meta name="viewport" content="width=device-width"> 7 <meta name="viewport" content="width=device-width">
8 <meta name="token" content="{{ csrf_token() }}"> 8 <meta name="token" content="{{ csrf_token() }}">
9 + <meta name="base-url" content="{{ baseUrl('/') }}">
9 <meta charset="utf-8"> 10 <meta charset="utf-8">
10 11
11 <!-- Styles and Fonts --> 12 <!-- Styles and Fonts -->
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
38 @if(setting('app-logo', '') !== 'none') 39 @if(setting('app-logo', '') !== 'none')
39 <img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo"> 40 <img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo">
40 @endif 41 @endif
41 - <span class="logo-text">{{ setting('app-name', 'BookStack') }}</span> 42 + <span class="logo-text">{{ setting('app-name') }}</span>
42 </a> 43 </a>
43 </div> 44 </div>
44 <div class="col-lg-4 col-sm-3 text-center"> 45 <div class="col-lg-4 col-sm-3 text-center">
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 <h1>Create New Book</h1> 6 <h1>Create New Book</h1>
7 - <form action="/books" method="POST"> 7 + <form action="{{ baseUrl("/books") }}" method="POST">
8 @include('books/form') 8 @include('books/form')
9 </form> 9 </form>
10 </div> 10 </div>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 <h1>Edit Book</h1> 6 <h1>Edit Book</h1>
7 - <form action="/books/{{$book->slug}}" method="POST"> 7 + <form action="{{ $book->getUrl() }}" method="POST">
8 <input type="hidden" name="_method" value="PUT"> 8 <input type="hidden" name="_method" value="PUT">
9 @include('books/form', ['model' => $book]) 9 @include('books/form', ['model' => $book])
10 </form> 10 </form>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
9 <div class="col-xs-11 faded"> 9 <div class="col-xs-11 faded">
10 <div class="action-buttons"> 10 <div class="action-buttons">
11 @if($currentUser->can('book-create-all')) 11 @if($currentUser->can('book-create-all'))
12 - <a href="/books/create" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>Add new book</a> 12 + <a href="{{ baseUrl("/books/create") }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>Add new book</a>
13 @endif 13 @endif
14 </div> 14 </div>
15 </div> 15 </div>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
31 @else 31 @else
32 <p class="text-muted">No books have been created.</p> 32 <p class="text-muted">No books have been created.</p>
33 @if(userCan('books-create-all')) 33 @if(userCan('books-create-all'))
34 - <a href="/books/create" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a> 34 + <a href="{{ baseUrl("/books/create") }}" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a>
35 @endif 35 @endif
36 @endif 36 @endif
37 </div> 37 </div>
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
8 <div class="col-md-12"> 8 <div class="col-md-12">
9 <div class="action-buttons faded"> 9 <div class="action-buttons faded">
10 @if(userCan('page-create', $book)) 10 @if(userCan('page-create', $book))
11 - <a href="{{$book->getUrl() . '/page/create'}}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Page</a> 11 + <a href="{{ $book->getUrl('/page/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Page</a>
12 @endif 12 @endif
13 @if(userCan('chapter-create', $book)) 13 @if(userCan('chapter-create', $book))
14 - <a href="{{$book->getUrl() . '/chapter/create'}}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Chapter</a> 14 + <a href="{{ $book->getUrl('/chapter/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Chapter</a>
15 @endif 15 @endif
16 @if(userCan('book-update', $book)) 16 @if(userCan('book-update', $book))
17 <a href="{{$book->getEditUrl()}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a> 17 <a href="{{$book->getEditUrl()}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a>
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
21 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a> 21 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
22 <ul> 22 <ul>
23 @if(userCan('book-update', $book)) 23 @if(userCan('book-update', $book))
24 - <li><a href="{{ $book->getUrl() }}/sort" class="text-primary"><i class="zmdi zmdi-sort"></i>Sort</a></li> 24 + <li><a href="{{ $book->getUrl('/sort') }}" class="text-primary"><i class="zmdi zmdi-sort"></i>Sort</a></li>
25 @endif 25 @endif
26 @if(userCan('restrictions-manage', $book)) 26 @if(userCan('restrictions-manage', $book))
27 - <li><a href="{{$book->getUrl()}}/permissions" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li> 27 + <li><a href="{{ $book->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li>
28 @endif 28 @endif
29 @if(userCan('book-delete', $book)) 29 @if(userCan('book-delete', $book))
30 - <li><a href="{{ $book->getUrl() }}/delete" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li> 30 + <li><a href="{{ $book->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li>
31 @endif 31 @endif
32 </ul> 32 </ul>
33 </div> 33 </div>
...@@ -61,16 +61,16 @@ ...@@ -61,16 +61,16 @@
61 @else 61 @else
62 <p class="text-muted">No pages or chapters have been created for this book.</p> 62 <p class="text-muted">No pages or chapters have been created for this book.</p>
63 <p> 63 <p>
64 - <a href="{{$book->getUrl() . '/page/create'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a> 64 + <a href="{{ $book->getUrl('/page/create') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
65 &nbsp;&nbsp;<em class="text-muted">-or-</em>&nbsp;&nbsp;&nbsp; 65 &nbsp;&nbsp;<em class="text-muted">-or-</em>&nbsp;&nbsp;&nbsp;
66 - <a href="{{$book->getUrl() . '/chapter/create'}}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>Add a chapter</a> 66 + <a href="{{ $book->getUrl('/chapter/create') }}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>Add a chapter</a>
67 </p> 67 </p>
68 <hr> 68 <hr>
69 @endif 69 @endif
70 <p class="text-muted small"> 70 <p class="text-muted small">
71 - Created {{$book->created_at->diffForHumans()}} @if($book->createdBy) by <a href="/user/{{ $book->createdBy->id }}">{{$book->createdBy->name}}</a> @endif 71 + Created {{$book->created_at->diffForHumans()}} @if($book->createdBy) by <a href="{{ $book->createdBy->getProfileUrl() }}">{{$book->createdBy->name}}</a> @endif
72 <br> 72 <br>
73 - Last Updated {{$book->updated_at->diffForHumans()}} @if($book->updatedBy) by <a href="/user/{{ $book->updatedBy->id }}">{{$book->updatedBy->name}}</a> @endif 73 + Last Updated {{$book->updated_at->diffForHumans()}} @if($book->updatedBy) by <a href="{{ $book->updatedBy->getProfileUrl() }}">{{$book->updatedBy->name}}</a> @endif
74 </p> 74 </p>
75 </div> 75 </div>
76 </div> 76 </div>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
90 @if($book->restricted) 90 @if($book->restricted)
91 <p class="text-muted"> 91 <p class="text-muted">
92 @if(userCan('restrictions-manage', $book)) 92 @if(userCan('restrictions-manage', $book))
93 - <a href="{{ $book->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a> 93 + <a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a>
94 @else 94 @else
95 <i class="zmdi zmdi-lock-outline"></i>Book Permissions Active 95 <i class="zmdi zmdi-lock-outline"></i>Book Permissions Active
96 @endif 96 @endif
......
1 @extends('base') 1 @extends('base')
2 2
3 @section('head') 3 @section('head')
4 - <script src="/libs/jquery-sortable/jquery-sortable.min.js"></script> 4 + <script src="{{ baseUrl("/libs/jquery-sortable/jquery-sortable.min.js") }}"></script>
5 @stop 5 @stop
6 6
7 @section('content') 7 @section('content')
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 @foreach($books as $otherBook) 22 @foreach($books as $otherBook)
23 @if($otherBook->id !== $book->id) 23 @if($otherBook->id !== $book->id)
24 <div> 24 <div>
25 - <a href="/books/{{ $otherBook->slug }}/sort-item" class="text-book"><i class="zmdi zmdi-book"></i>{{ $otherBook->name }}</a> 25 + <a href="{{ $otherBook->getUrl('/sort-item') }}" class="text-book"><i class="zmdi zmdi-book"></i>{{ $otherBook->name }}</a>
26 </div> 26 </div>
27 @endif 27 @endif
28 @endforeach 28 @endforeach
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
32 32
33 </div> 33 </div>
34 34
35 - <form action="{{$book->getUrl()}}/sort" method="POST"> 35 + <form action="{{ $book->getUrl('/sort') }}" method="POST">
36 {!! csrf_field() !!} 36 {!! csrf_field() !!}
37 <input type="hidden" name="_method" value="PUT"> 37 <input type="hidden" name="_method" value="PUT">
38 <input type="hidden" id="sort-tree-input" name="sort-tree"> 38 <input type="hidden" id="sort-tree-input" name="sort-tree">
39 <div class="list"> 39 <div class="list">
40 - <a href="{{$book->getUrl()}}" class="button muted">Cancel</a> 40 + <a href="{{ $book->getUrl() }}" class="button muted">Cancel</a>
41 <button class="button pos" type="submit">Save Order</button> 41 <button class="button pos" type="submit">Save Order</button>
42 </div> 42 </div>
43 </form> 43 </form>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 <h1>Create New Chapter</h1> 6 <h1>Create New Chapter</h1>
7 - <form action="{{$book->getUrl()}}/chapter/create" method="POST"> 7 + <form action="{{ $book->getUrl('/chapter/create') }}" method="POST">
8 @include('chapters/form') 8 @include('chapters/form')
9 </form> 9 </form>
10 </div> 10 </div>
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
8 and added directly to the book.</p> 8 and added directly to the book.</p>
9 <p class="text-neg">Are you sure you want to delete this chapter?</p> 9 <p class="text-neg">Are you sure you want to delete this chapter?</p>
10 10
11 - <form action="{{$chapter->getUrl()}}" method="POST"> 11 + <form action="{{ $chapter->getUrl() }}" method="POST">
12 {!! csrf_field() !!} 12 {!! csrf_field() !!}
13 <input type="hidden" name="_method" value="DELETE"> 13 <input type="hidden" name="_method" value="DELETE">
14 - <a href="{{$chapter->getUrl()}}" class="button primary">Cancel</a> 14 + <a href="{{ $chapter->getUrl() }}" class="button primary">Cancel</a>
15 <button type="submit" class="button neg">Confirm</button> 15 <button type="submit" class="button neg">Confirm</button>
16 </form> 16 </form>
17 </div> 17 </div>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 <h1>Edit Chapter</h1> 6 <h1>Edit Chapter</h1>
7 - <form action="{{$chapter->getUrl()}}" method="POST"> 7 + <form action="{{ $chapter->getUrl() }}" method="POST">
8 <input type="hidden" name="_method" value="PUT"> 8 <input type="hidden" name="_method" value="PUT">
9 @include('chapters/form', ['model' => $chapter]) 9 @include('chapters/form', ['model' => $chapter])
10 </form> 10 </form>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 <p class="text-muted chapter-toggle"><i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ count($chapter->pages) }} Pages</span></p> 20 <p class="text-muted chapter-toggle"><i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ count($chapter->pages) }} Pages</span></p>
21 <div class="inset-list"> 21 <div class="inset-list">
22 @foreach($chapter->pages as $page) 22 @foreach($chapter->pages as $page)
23 - <h4 class="@if($page->draft) draft @endif"><a href="{{$page->getUrl()}}" class="text-page @if($page->draft) draft @endif"><i class="zmdi zmdi-file-text"></i>{{$page->name}}</a></h4> 23 + <h4 class="@if($page->draft) draft @endif"><a href="{{ $page->getUrl() }}" class="text-page @if($page->draft) draft @endif"><i class="zmdi zmdi-file-text"></i>{{$page->name}}</a></h4>
24 @endforeach 24 @endforeach
25 </div> 25 </div>
26 @endif 26 @endif
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
7 <div class="row"> 7 <div class="row">
8 <div class="col-sm-12 faded"> 8 <div class="col-sm-12 faded">
9 <div class="breadcrumbs"> 9 <div class="breadcrumbs">
10 - <a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a> 10 + <a href="{{ $book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a>
11 <span class="sep">&raquo;</span> 11 <span class="sep">&raquo;</span>
12 - <a href="{{$chapter->getUrl()}}" class="text-chapter text-button"><i class="zmdi zmdi-collection-bookmark"></i>{{ $chapter->getShortName() }}</a> 12 + <a href="{{ $chapter->getUrl() }}" class="text-chapter text-button"><i class="zmdi zmdi-collection-bookmark"></i>{{ $chapter->getShortName() }}</a>
13 </div> 13 </div>
14 </div> 14 </div>
15 </div> 15 </div>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 <div class="container"> 19 <div class="container">
20 <h1>Move Chapter <small class="subheader">{{$chapter->name}}</small></h1> 20 <h1>Move Chapter <small class="subheader">{{$chapter->name}}</small></h1>
21 21
22 - <form action="{{ $chapter->getUrl() }}/move" method="POST"> 22 + <form action="{{ $chapter->getUrl('/move') }}" method="POST">
23 {!! csrf_field() !!} 23 {!! csrf_field() !!}
24 <input type="hidden" name="_method" value="PUT"> 24 <input type="hidden" name="_method" value="PUT">
25 25
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <div class="row"> 7 <div class="row">
8 <div class="col-sm-12 faded"> 8 <div class="col-sm-12 faded">
9 <div class="breadcrumbs"> 9 <div class="breadcrumbs">
10 - <a href="{{$chapter->book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $chapter->book->getShortName() }}</a> 10 + <a href="{{ $chapter->book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $chapter->book->getShortName() }}</a>
11 <span class="sep">&raquo;</span> 11 <span class="sep">&raquo;</span>
12 <a href="{{ $chapter->getUrl() }}" class="text-chapter text-button"><i class="zmdi zmdi-collection-bookmark"></i>{{$chapter->getShortName()}}</a> 12 <a href="{{ $chapter->getUrl() }}" class="text-chapter text-button"><i class="zmdi zmdi-collection-bookmark"></i>{{$chapter->getShortName()}}</a>
13 </div> 13 </div>
......
...@@ -7,29 +7,29 @@ ...@@ -7,29 +7,29 @@
7 <div class="row"> 7 <div class="row">
8 <div class="col-sm-8 faded" ng-non-bindable> 8 <div class="col-sm-8 faded" ng-non-bindable>
9 <div class="breadcrumbs"> 9 <div class="breadcrumbs">
10 - <a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a> 10 + <a href="{{ $book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a>
11 </div> 11 </div>
12 </div> 12 </div>
13 <div class="col-sm-4 faded"> 13 <div class="col-sm-4 faded">
14 <div class="action-buttons"> 14 <div class="action-buttons">
15 @if(userCan('page-create', $chapter)) 15 @if(userCan('page-create', $chapter))
16 - <a href="{{$chapter->getUrl() . '/create-page'}}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>New Page</a> 16 + <a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>New Page</a>
17 @endif 17 @endif
18 @if(userCan('chapter-update', $chapter)) 18 @if(userCan('chapter-update', $chapter))
19 - <a href="{{$chapter->getUrl() . '/edit'}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a> 19 + <a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a>
20 @endif 20 @endif
21 @if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter)) 21 @if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
22 <div dropdown class="dropdown-container"> 22 <div dropdown class="dropdown-container">
23 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a> 23 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
24 <ul> 24 <ul>
25 @if(userCan('chapter-update', $chapter)) 25 @if(userCan('chapter-update', $chapter))
26 - <li><a href="{{$chapter->getUrl() . '/move'}}" class="text-primary"><i class="zmdi zmdi-folder"></i>Move</a></li> 26 + <li><a href="{{ $chapter->getUrl('/move') }}" class="text-primary"><i class="zmdi zmdi-folder"></i>Move</a></li>
27 @endif 27 @endif
28 @if(userCan('restrictions-manage', $chapter)) 28 @if(userCan('restrictions-manage', $chapter))
29 - <li><a href="{{$chapter->getUrl()}}/permissions" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li> 29 + <li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li>
30 @endif 30 @endif
31 @if(userCan('chapter-delete', $chapter)) 31 @if(userCan('chapter-delete', $chapter))
32 - <li><a href="{{$chapter->getUrl() . '/delete'}}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li> 32 + <li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li>
33 @endif 33 @endif
34 </ul> 34 </ul>
35 </div> 35 </div>
...@@ -60,22 +60,22 @@ ...@@ -60,22 +60,22 @@
60 <p class="text-muted">No pages are currently in this chapter.</p> 60 <p class="text-muted">No pages are currently in this chapter.</p>
61 <p> 61 <p>
62 @if(userCan('page-create', $chapter)) 62 @if(userCan('page-create', $chapter))
63 - <a href="{{$chapter->getUrl() . '/create-page'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a> 63 + <a href="{{ $chapter->getUrl('/create-page') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
64 @endif 64 @endif
65 @if(userCan('page-create', $chapter) && userCan('book-update', $book)) 65 @if(userCan('page-create', $chapter) && userCan('book-update', $book))
66 &nbsp;&nbsp;<em class="text-muted">-or-</em>&nbsp;&nbsp;&nbsp; 66 &nbsp;&nbsp;<em class="text-muted">-or-</em>&nbsp;&nbsp;&nbsp;
67 @endif 67 @endif
68 @if(userCan('book-update', $book)) 68 @if(userCan('book-update', $book))
69 - <a href="{{$book->getUrl() . '/sort'}}" class="text-book"><i class="zmdi zmdi-book"></i>Sort the current book</a> 69 + <a href="{{ $book->getUrl('/sort') }}" class="text-book"><i class="zmdi zmdi-book"></i>Sort the current book</a>
70 @endif 70 @endif
71 </p> 71 </p>
72 <hr> 72 <hr>
73 @endif 73 @endif
74 74
75 <p class="text-muted small"> 75 <p class="text-muted small">
76 - Created {{$chapter->created_at->diffForHumans()}} @if($chapter->createdBy) by <a href="/user/{{ $chapter->createdBy->id }}">{{ $chapter->createdBy->name}}</a> @endif 76 + Created {{ $chapter->created_at->diffForHumans() }} @if($chapter->createdBy) by <a href="{{ $chapter->createdBy->getProfileUrl() }}">{{ $chapter->createdBy->name}}</a> @endif
77 <br> 77 <br>
78 - Last Updated {{$chapter->updated_at->diffForHumans()}} @if($chapter->updatedBy) by <a href="/user/{{ $chapter->updatedBy->id }}">{{ $chapter->updatedBy->name}}</a> @endif 78 + Last Updated {{ $chapter->updated_at->diffForHumans() }} @if($chapter->updatedBy) by <a href="{{ $chapter->updatedBy->getProfileUrl() }}">{{ $chapter->updatedBy->name}}</a> @endif
79 </p> 79 </p>
80 </div> 80 </div>
81 <div class="col-md-3 col-md-offset-1"> 81 <div class="col-md-3 col-md-offset-1">
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
85 85
86 @if($book->restricted) 86 @if($book->restricted)
87 @if(userCan('restrictions-manage', $book)) 87 @if(userCan('restrictions-manage', $book))
88 - <a href="{{ $book->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a> 88 + <a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a>
89 @else 89 @else
90 <i class="zmdi zmdi-lock-outline"></i>Book Permissions Active 90 <i class="zmdi zmdi-lock-outline"></i>Book Permissions Active
91 @endif 91 @endif
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
94 94
95 @if($chapter->restricted) 95 @if($chapter->restricted)
96 @if(userCan('restrictions-manage', $chapter)) 96 @if(userCan('restrictions-manage', $chapter))
97 - <a href="{{ $chapter->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active</a> 97 + <a href="{{ $chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active</a>
98 @else 98 @else
99 <i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active 99 <i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active
100 @endif 100 @endif
......
1 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 -<html xmlns="http://www.w3.org/1999/xhtml" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> 2 + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 +<html xmlns="http://www.w3.org/1999/xhtml"
4 + style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;">
3 5
4 <head style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> 6 <head style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;">
5 - <meta name="viewport" content="width=device-width" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> 7 + <meta name="viewport" content="width=device-width"
6 - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> 8 + style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"/>
7 - <title>Confirm Your Email At {{ Setting::get('app-name')}}</title> 9 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
10 + style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"/>
11 + <title>Confirm Your Email At {{ setting('app-name')}}</title>
8 <style style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> 12 <style style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;">
9 * { 13 * {
10 - margin: 0; 14 + margin: 0;
11 - padding: 0; 15 + padding: 0;
12 - font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; 16 + font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
13 - font-size: 100%; 17 + font-size: 100%;
14 - line-height: 1.6; 18 + line-height: 1.6;
15 } 19 }
16 20
17 img { 21 img {
18 - max-width: 100%; 22 + max-width: 100%;
19 } 23 }
20 24
21 body { 25 body {
22 - -webkit-font-smoothing: antialiased; 26 + -webkit-font-smoothing: antialiased;
23 - -webkit-text-size-adjust: none; 27 + -webkit-text-size-adjust: none;
24 - width: 100%!important; 28 + width: 100% !important;
25 - height: 100%; 29 + height: 100%;
26 } 30 }
27 31
28 a { 32 a {
29 - color: #348eda; 33 + color: #348eda;
30 } 34 }
31 35
32 .btn-primary { 36 .btn-primary {
33 - text-decoration: none; 37 + text-decoration: none;
34 - color: #FFF; 38 + color: #FFF;
35 - background-color: #348eda; 39 + background-color: #348eda;
36 - border: solid #348eda; 40 + border: solid #348eda;
37 - border-width: 10px 20px; 41 + border-width: 10px 20px;
38 - line-height: 2; 42 + line-height: 2;
39 - font-weight: bold; 43 + font-weight: bold;
40 - margin-right: 10px; 44 + margin-right: 10px;
41 - text-align: center; 45 + text-align: center;
42 - cursor: pointer; 46 + cursor: pointer;
43 - display: inline-block; 47 + display: inline-block;
44 - border-radius: 4px; 48 + border-radius: 4px;
45 } 49 }
46 50
47 .btn-secondary { 51 .btn-secondary {
48 - text-decoration: none; 52 + text-decoration: none;
49 - color: #FFF; 53 + color: #FFF;
50 - background-color: #aaa; 54 + background-color: #aaa;
51 - border: solid #aaa; 55 + border: solid #aaa;
52 - border-width: 10px 20px; 56 + border-width: 10px 20px;
53 - line-height: 2; 57 + line-height: 2;
54 - font-weight: bold; 58 + font-weight: bold;
55 - margin-right: 10px; 59 + margin-right: 10px;
56 - text-align: center; 60 + text-align: center;
57 - cursor: pointer; 61 + cursor: pointer;
58 - display: inline-block; 62 + display: inline-block;
59 - border-radius: 25px; 63 + border-radius: 25px;
60 } 64 }
61 65
62 .last { 66 .last {
63 - margin-bottom: 0; 67 + margin-bottom: 0;
64 } 68 }
65 69
66 .first { 70 .first {
67 - margin-top: 0; 71 + margin-top: 0;
68 } 72 }
69 73
70 .padding { 74 .padding {
71 - padding: 10px 0; 75 + padding: 10px 0;
72 } 76 }
73 77
74 table.body-wrap { 78 table.body-wrap {
75 - width: 100%; 79 + width: 100%;
76 - padding: 20px; 80 + padding: 20px;
77 } 81 }
78 82
79 table.body-wrap .container { 83 table.body-wrap .container {
80 - border: 1px solid #f0f0f0; 84 + border: 1px solid #f0f0f0;
81 } 85 }
82 86
83 h1, 87 h1,
84 h2, 88 h2,
85 h3 { 89 h3 {
86 - font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; 90 + font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
87 - color: #444; 91 + color: #444;
88 - margin: 10px 0 10px; 92 + margin: 10px 0 10px;
89 - line-height: 1.2; 93 + line-height: 1.2;
90 - font-weight: 200; 94 + font-weight: 200;
91 } 95 }
92 96
93 h1 { 97 h1 {
94 - font-size: 36px; 98 + font-size: 36px;
95 } 99 }
96 100
97 h2 { 101 h2 {
98 - font-size: 28px; 102 + font-size: 28px;
99 } 103 }
100 104
101 h3 { 105 h3 {
102 - font-size: 22px; 106 + font-size: 22px;
103 } 107 }
104 108
105 p, 109 p,
106 ul, 110 ul,
107 ol { 111 ol {
108 - margin-bottom: 10px; 112 + margin-bottom: 10px;
109 - font-weight: normal; 113 + font-weight: normal;
110 - font-size: 14px; 114 + font-size: 14px;
111 - color: #888888; 115 + color: #888888;
112 } 116 }
113 117
114 ul li, 118 ul li,
115 ol li { 119 ol li {
116 - margin-left: 5px; 120 + margin-left: 5px;
117 - list-style-position: inside; 121 + list-style-position: inside;
118 } 122 }
119 123
120 .container { 124 .container {
121 - display: block!important; 125 + display: block !important;
122 - max-width: 600px!important; 126 + max-width: 600px !important;
123 - margin: 0 auto!important; 127 + margin: 0 auto !important;
124 - clear: both!important; 128 + clear: both !important;
125 } 129 }
126 130
127 .body-wrap .container { 131 .body-wrap .container {
128 - padding: 20px; 132 + padding: 20px;
129 } 133 }
130 134
131 .content { 135 .content {
132 - max-width: 600px; 136 + max-width: 600px;
133 - margin: 0 auto; 137 + margin: 0 auto;
134 - display: block; 138 + display: block;
135 } 139 }
136 140
137 .content table { 141 .content table {
138 - width: 100%; 142 + width: 100%;
139 } 143 }
140 </style> 144 </style>
141 - </head> 145 +</head>
142 146
143 - <body bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;width:100%!important;height:100%;"> 147 +<body bgcolor="#f6f6f6"
144 - <!-- body --> 148 + style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;width:100%!important;height:100%;">
145 - <table class="body-wrap" bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;"> 149 +<!-- body -->
150 +<table class="body-wrap" bgcolor="#f6f6f6"
151 + style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;">
146 <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> 152 <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;">
147 - <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> 153 + <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td>
148 - <td class="container" bgcolor="#FFFFFF" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;display:block!important;max-width:600px!important;margin-top:0 !important;margin-bottom:0 !important;margin-right:auto !important;margin-left:auto !important;clear:both!important;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;border-width:1px;border-style:solid;border-color:#f0f0f0;"> 154 + <td class="container" bgcolor="#FFFFFF"
149 - <!-- content --> 155 + style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;display:block!important;max-width:600px!important;margin-top:0 !important;margin-bottom:0 !important;margin-right:auto !important;margin-left:auto !important;clear:both!important;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;border-width:1px;border-style:solid;border-color:#f0f0f0;">
150 - <div class="content" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;max-width:600px;margin-top:0;margin-bottom:0;margin-right:auto;margin-left:auto;display:block;"> 156 + <!-- content -->
151 - <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> 157 + <div class="content"
152 - <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> 158 + style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;max-width:600px;margin-top:0;margin-bottom:0;margin-right:auto;margin-left:auto;display:block;">
153 - <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> 159 + <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;">
154 - <h1 style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;color:#444;margin-top:10px;margin-bottom:10px;margin-right:0;margin-left:0;line-height:1.2;font-weight:200;font-size:36px;">Email Confirmation</h1> 160 + <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;">
155 - <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;">Thanks for joining <a href="{{ url('/') }}">{{ Setting::get('app-name')}}</a>. <br /> 161 + <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;">
156 - Please confirm your email address by clicking the button below.</p> 162 + <h1 style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;color:#444;margin-top:10px;margin-bottom:10px;margin-right:0;margin-left:0;line-height:1.2;font-weight:200;font-size:36px;">
157 - <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> 163 + Email Confirmation</h1>
158 - <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> 164 + <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;">
159 - <td class="padding" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;padding-top:10px;padding-bottom:10px;padding-right:0;padding-left:0;"> 165 + Thanks for joining <a href="{{ baseUrl('/') }}">{{ setting('app-name')}}</a>. <br/>
160 - <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;"><a class="btn-primary" href="{{ url('/register/confirm/'.$token) }}" style="margin-top:0;margin-bottom:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;text-decoration:none;color:#FFF;background-color:#348eda;border-style:solid;border-color:#348eda;border-width:10px 20px;line-height:2;font-weight:bold;margin-right:10px;text-align:center;cursor:pointer;display:inline-block;border-radius:4px;">Confirm Email</a></p> 166 + Please confirm your email address by clicking the button below.</p>
161 - </td> 167 + <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;">
162 - </tr> 168 + <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;">
163 - </table> 169 + <td class="padding"
164 - </td> 170 + style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;padding-top:10px;padding-bottom:10px;padding-right:0;padding-left:0;">
165 - </tr> 171 + <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;">
166 - </table> 172 + <a class="btn-primary" href="{{ baseUrl('/register/confirm/' . $token) }}"
167 - </div> 173 + style="margin-top:0;margin-bottom:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;text-decoration:none;color:#FFF;background-color:#348eda;border-style:solid;border-color:#348eda;border-width:10px 20px;line-height:2;font-weight:bold;margin-right:10px;text-align:center;cursor:pointer;display:inline-block;border-radius:4px;">Confirm
168 - <!-- /content --> 174 + Email</a></p>
169 - </td> 175 + </td>
170 - <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> 176 + </tr>
171 - </tr> 177 + </table>
172 - </table> 178 + </td>
173 - <!-- /body --> 179 + </tr>
174 - </body> 180 + </table>
175 - 181 + </div>
176 - </html> 182 + <!-- /content -->
183 + </td>
184 + <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td>
185 + </tr>
186 +</table>
187 +<!-- /body -->
188 +</body>
189 +
190 +</html>
......
1 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <head style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <meta name="viewport" content="width=device-width" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> <title>Password Reset From {{ Setting::get('app-name')}}</title> <style style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> * { margin: 0; padding: 0; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; } img { max-width: 100%; } body { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100%!important; height: 100%; } a { color: #348eda; } .btn-primary { text-decoration: none; color: #FFF; background-color: #348eda; border: solid #348eda; border-width: 10px 20px; line-height: 2; font-weight: bold; margin-right: 10px; text-align: center; cursor: pointer; display: inline-block; border-radius: 4px; } .btn-secondary { text-decoration: none; color: #FFF; background-color: #aaa; border: solid #aaa; border-width: 10px 20px; line-height: 2; font-weight: bold; margin-right: 10px; text-align: center; cursor: pointer; display: inline-block; border-radius: 25px; } .last { margin-bottom: 0; } .first { margin-top: 0; } .padding { padding: 10px 0; } table.body-wrap { width: 100%; padding: 20px; } table.body-wrap .container { border: 1px solid #f0f0f0; } h1, h2, h3 { font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; color: #444; margin: 10px 0 10px; line-height: 1.2; font-weight: 200; } h1 { font-size: 36px; } h2 { font-size: 28px; } h3 { font-size: 22px; } p, ul, ol { margin-bottom: 10px; font-weight: normal; font-size: 14px; color: #888888; } ul li, ol li { margin-left: 5px; list-style-position: inside; } .container { display: block!important; max-width: 600px!important; margin: 0 auto!important; clear: both!important; } .body-wrap .container { padding: 20px; } .content { max-width: 600px; margin: 0 auto; display: block; } .content table { width: 100%; } </style> </head> <body bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;width:100%!important;height:100%;"> <!-- body --> <table class="body-wrap" bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;"> <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> <td class="container" bgcolor="#FFFFFF" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;display:block!important;max-width:600px!important;margin-top:0 !important;margin-bottom:0 !important;margin-right:auto !important;margin-left:auto !important;clear:both!important;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;border-width:1px;border-style:solid;border-color:#f0f0f0;"> <!-- content --> <div class="content" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;max-width:600px;margin-top:0;margin-bottom:0;margin-right:auto;margin-left:auto;display:block;"> <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <h1 style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;color:#444;margin-top:10px;margin-bottom:10px;margin-right:0;margin-left:0;line-height:1.2;font-weight:200;font-size:36px;">Password Reset</h1> <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;">A password reset was requested for this email address on <a href="{{ url('/') }}">{{ Setting::get('app-name')}}</a>. If you did not request a password change please ignore this email.</p> <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <td class="padding" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;padding-top:10px;padding-bottom:10px;padding-right:0;padding-left:0;"> <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;"><a class="btn-primary" href="{{ url('password/reset/'.$token) }}" style="margin-top:0;margin-bottom:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;text-decoration:none;color:#FFF;background-color:#348eda;border-style:solid;border-color:#348eda;border-width:10px 20px;line-height:2;font-weight:bold;margin-right:10px;text-align:center;cursor:pointer;display:inline-block;border-radius:4px;">Click here to reset your password</a></p> </td> </tr> </table> </td> </tr> </table> </div> <!-- /content --> </td> <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> </tr> </table> <!-- /body --> </body> </html>
...\ No newline at end of file ...\ No newline at end of file
1 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <head style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <meta name="viewport" content="width=device-width" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"/> <title>Password Reset From {{ setting('app-name')}}</title> <style style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> * { margin: 0; padding: 0; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; } img { max-width: 100%; } body { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; } a { color: #348eda; } .btn-primary { text-decoration: none; color: #FFF; background-color: #348eda; border: solid #348eda; border-width: 10px 20px; line-height: 2; font-weight: bold; margin-right: 10px; text-align: center; cursor: pointer; display: inline-block; border-radius: 4px; } .btn-secondary { text-decoration: none; color: #FFF; background-color: #aaa; border: solid #aaa; border-width: 10px 20px; line-height: 2; font-weight: bold; margin-right: 10px; text-align: center; cursor: pointer; display: inline-block; border-radius: 25px; } .last { margin-bottom: 0; } .first { margin-top: 0; } .padding { padding: 10px 0; } table.body-wrap { width: 100%; padding: 20px; } table.body-wrap .container { border: 1px solid #f0f0f0; } h1, h2, h3 { font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; color: #444; margin: 10px 0 10px; line-height: 1.2; font-weight: 200; } h1 { font-size: 36px; } h2 { font-size: 28px; } h3 { font-size: 22px; } p, ul, ol { margin-bottom: 10px; font-weight: normal; font-size: 14px; color: #888888; } ul li, ol li { margin-left: 5px; list-style-position: inside; } .container { display: block !important; max-width: 600px !important; margin: 0 auto !important; clear: both !important; } .body-wrap .container { padding: 20px; } .content { max-width: 600px; margin: 0 auto; display: block; } .content table { width: 100%; } </style></head> <body bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;width:100%!important;height:100%;"><!-- body --><table class="body-wrap" bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;"> <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> <td class="container" bgcolor="#FFFFFF" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;display:block!important;max-width:600px!important;margin-top:0 !important;margin-bottom:0 !important;margin-right:auto !important;margin-left:auto !important;clear:both!important;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;border-width:1px;border-style:solid;border-color:#f0f0f0;"> <!-- content --> <div class="content" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;max-width:600px;margin-top:0;margin-bottom:0;margin-right:auto;margin-left:auto;display:block;"> <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <h1 style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;color:#444;margin-top:10px;margin-bottom:10px;margin-right:0;margin-left:0;line-height:1.2;font-weight:200;font-size:36px;"> Password Reset</h1> <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;"> A password reset was requested for this email address on <a href="{{ baseUrl('/') }}">{{ setting('app-name')}}</a>. If you did not request a password change please ignore this email.</p> <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <td class="padding" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;padding-top:10px;padding-bottom:10px;padding-right:0;padding-left:0;"> <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;"> <a class="btn-primary" href="{{ baseUrl('/password/reset/' . $token) }}" style="margin-top:0;margin-bottom:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;text-decoration:none;color:#FFF;background-color:#348eda;border-style:solid;border-color:#348eda;border-width:10px 20px;line-height:2;font-weight:bold;margin-right:10px;text-align:center;cursor:pointer;display:inline-block;border-radius:4px;">Click here to reset your password</a></p> </td> </tr> </table> </td> </tr> </table> </div> <!-- /content --> </td> <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> </tr></table><!-- /body --></body> </html>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
6 <div class="container"> 6 <div class="container">
7 <h1 class="text-muted">{{ $message or 'Page Not Found' }}</h1> 7 <h1 class="text-muted">{{ $message or 'Page Not Found' }}</h1>
8 <p>Sorry, The page you were looking for could not be found.</p> 8 <p>Sorry, The page you were looking for could not be found.</p>
9 - <a href="/" class="button">Return To Home</a> 9 + <a href="{{ baseUrl('/') }}" class="button">Return To Home</a>
10 </div> 10 </div>
11 11
12 @stop 12 @stop
...\ No newline at end of file ...\ No newline at end of file
......
1 -<!DOCTYPE html> 1 +@extends('public')
2 -<html>
3 - <head>
4 - <title>Be right back.</title>
5 2
6 - <link href="//fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"> 3 +@section('content')
7 4
8 - <style> 5 + <div class="container">
9 - html, body { 6 + <h1 class="text-muted">{{ setting('app-name') }} is down right now</h1>
10 - height: 100%; 7 + <p>It will be back up soon.</p>
11 - } 8 + </div>
12 9
13 - body { 10 +@stop
14 - margin: 0;
15 - padding: 0;
16 - width: 100%;
17 - color: #B0BEC5;
18 - display: table;
19 - font-weight: 100;
20 - font-family: 'Lato';
21 - }
22 -
23 - .container {
24 - text-align: center;
25 - display: table-cell;
26 - vertical-align: middle;
27 - }
28 -
29 - .content {
30 - text-align: center;
31 - display: inline-block;
32 - }
33 -
34 - .title {
35 - font-size: 72px;
36 - margin-bottom: 40px;
37 - }
38 - </style>
39 - </head>
40 - <body>
41 - <div class="container">
42 - <div class="content">
43 - <div class="title">Be right back.</div>
44 - </div>
45 - </div>
46 - </body>
47 -</html>
...\ No newline at end of file ...\ No newline at end of file
......
1 -<form action="{{ $model->getUrl() }}/permissions" method="POST"> 1 +<form action="{{ $model->getUrl('/permissions') }}" method="POST">
2 {!! csrf_field() !!} 2 {!! csrf_field() !!}
3 <input type="hidden" name="_method" value="PUT"> 3 <input type="hidden" name="_method" value="PUT">
4 4
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
42 </div> 42 </div>
43 43
44 <div class="col-sm-4"> 44 <div class="col-sm-4">
45 - <h3><a class="no-color" href="/pages/recently-created">Recently Created Pages</a></h3> 45 + <h3><a class="no-color" href="{{ baseUrl("/pages/recently-created") }}">Recently Created Pages</a></h3>
46 <div id="recently-created-pages"> 46 <div id="recently-created-pages">
47 @include('partials/entity-list', [ 47 @include('partials/entity-list', [
48 'entities' => $recentlyCreatedPages, 48 'entities' => $recentlyCreatedPages,
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
51 ]) 51 ])
52 </div> 52 </div>
53 53
54 - <h3><a class="no-color" href="/pages/recently-updated">Recently Updated Pages</a></h3> 54 + <h3><a class="no-color" href="{{ baseUrl("/pages/recently-updated") }}">Recently Updated Pages</a></h3>
55 <div id="recently-updated-pages"> 55 <div id="recently-updated-pages">
56 @include('partials/entity-list', [ 56 @include('partials/entity-list', [
57 'entities' => $recentlyUpdatedPages, 57 'entities' => $recentlyUpdatedPages,
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
6 <h1>Delete {{ $page->draft ? 'Draft' : '' }} Page</h1> 6 <h1>Delete {{ $page->draft ? 'Draft' : '' }} Page</h1>
7 <p class="text-neg">Are you sure you want to delete this {{ $page->draft ? 'draft' : '' }} page?</p> 7 <p class="text-neg">Are you sure you want to delete this {{ $page->draft ? 'draft' : '' }} page?</p>
8 8
9 - <form action="{{$page->getUrl()}}" method="POST"> 9 + <form action="{{ $page->getUrl() }}" method="POST">
10 {!! csrf_field() !!} 10 {!! csrf_field() !!}
11 <input type="hidden" name="_method" value="DELETE"> 11 <input type="hidden" name="_method" value="DELETE">
12 - <a href="{{$page->getUrl()}}" class="button primary">Cancel</a> 12 + <a href="{{ $page->getUrl() }}" class="button primary">Cancel</a>
13 <button type="submit" class="button neg">Confirm</button> 13 <button type="submit" class="button neg">Confirm</button>
14 </form> 14 </form>
15 </div> 15 </div>
......
1 @extends('base') 1 @extends('base')
2 2
3 @section('head') 3 @section('head')
4 - <script src="/libs/tinymce/tinymce.min.js?ver=4.3.7"></script> 4 + <script src="{{ baseUrl('/libs/tinymce/tinymce.min.js?ver=4.3.7') }}"></script>
5 @stop 5 @stop
6 6
7 @section('body-class', 'flexbox') 7 @section('body-class', 'flexbox')
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
9 @section('content') 9 @section('content')
10 10
11 <div class="flex-fill flex"> 11 <div class="flex-fill flex">
12 - <form action="{{$page->getUrl()}}" autocomplete="off" data-page-id="{{ $page->id }}" method="POST" class="flex flex-fill"> 12 + <form action="{{ $page->getUrl() }}" autocomplete="off" data-page-id="{{ $page->id }}" method="POST" class="flex flex-fill">
13 @if(!isset($isDraft)) 13 @if(!isset($isDraft))
14 <input type="hidden" name="_method" value="PUT"> 14 <input type="hidden" name="_method" value="PUT">
15 @endif 15 @endif
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
14 <tbody ui-sortable="sortOptions" ng-model="tags" > 14 <tbody ui-sortable="sortOptions" ng-model="tags" >
15 <tr ng-repeat="tag in tags track by $index"> 15 <tr ng-repeat="tag in tags track by $index">
16 <td width="20" ><i class="handle zmdi zmdi-menu"></i></td> 16 <td width="20" ><i class="handle zmdi zmdi-menu"></i></td>
17 - <td><input autosuggest="/ajax/tags/suggest/names" autosuggest-type="name" class="outline" ng-attr-name="tags[@{{$index}}][name]" type="text" ng-model="tag.name" ng-change="tagChange(tag)" ng-blur="tagBlur(tag)" placeholder="Tag"></td> 17 + <td><input autosuggest="{{ baseUrl('/ajax/tags/suggest/names') }}" autosuggest-type="name" class="outline" ng-attr-name="tags[@{{$index}}][name]" type="text" ng-model="tag.name" ng-change="tagChange(tag)" ng-blur="tagBlur(tag)" placeholder="Tag"></td>
18 - <td><input autosuggest="/ajax/tags/suggest/values" autosuggest-type="value" class="outline" ng-attr-name="tags[@{{$index}}][value]" type="text" ng-model="tag.value" ng-change="tagChange(tag)" ng-blur="tagBlur(tag)" placeholder="Tag Value (Optional)"></td> 18 + <td><input autosuggest="{{ baseUrl('/ajax/tags/suggest/values') }}" autosuggest-type="value" class="outline" ng-attr-name="tags[@{{$index}}][value]" type="text" ng-model="tag.value" ng-change="tagChange(tag)" ng-blur="tagBlur(tag)" placeholder="Tag Value (Optional)"></td>
19 <td width="10" ng-show="tags.length != 1" class="text-center text-neg" style="padding: 0;" ng-click="removeTag(tag)"><i class="zmdi zmdi-close"></i></td> 19 <td width="10" ng-show="tags.length != 1" class="text-center text-neg" style="padding: 0;" ng-click="removeTag(tag)"><i class="zmdi zmdi-close"></i></td>
20 </tr> 20 </tr>
21 </tbody> 21 </tbody>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 <a ng-click="forceDraftSave()" class="text-pos"><i class="zmdi zmdi-save"></i>Save Draft</a> 20 <a ng-click="forceDraftSave()" class="text-pos"><i class="zmdi zmdi-save"></i>Save Draft</a>
21 </li> 21 </li>
22 <li ng-if="isNewPageDraft"> 22 <li ng-if="isNewPageDraft">
23 - <a href="{{$model->getUrl()}}/delete" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete Draft</a> 23 + <a href="{{ $model->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete Draft</a>
24 </li> 24 </li>
25 </ul> 25 </ul>
26 </div> 26 </div>
......
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
7 <div class="row"> 7 <div class="row">
8 <div class="col-sm-12 faded"> 8 <div class="col-sm-12 faded">
9 <div class="breadcrumbs"> 9 <div class="breadcrumbs">
10 - <a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a> 10 + <a href="{{ $book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a>
11 @if($page->hasChapter()) 11 @if($page->hasChapter())
12 <span class="sep">&raquo;</span> 12 <span class="sep">&raquo;</span>
13 <a href="{{ $page->chapter->getUrl() }}" class="text-chapter text-button"> 13 <a href="{{ $page->chapter->getUrl() }}" class="text-chapter text-button">
14 <i class="zmdi zmdi-collection-bookmark"></i> 14 <i class="zmdi zmdi-collection-bookmark"></i>
15 - {{$page->chapter->getShortName()}} 15 + {{ $page->chapter->getShortName() }}
16 </a> 16 </a>
17 @endif 17 @endif
18 <span class="sep">&raquo;</span> 18 <span class="sep">&raquo;</span>
19 - <a href="{{$page->getUrl()}}" class="text-page text-button"><i class="zmdi zmdi-file-text"></i>{{ $page->getShortName() }}</a> 19 + <a href="{{ $page->getUrl() }}" class="text-page text-button"><i class="zmdi zmdi-file-text"></i>{{ $page->getShortName() }}</a>
20 </div> 20 </div>
21 </div> 21 </div>
22 </div> 22 </div>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
26 <div class="container"> 26 <div class="container">
27 <h1>Move Page <small class="subheader">{{$page->name}}</small></h1> 27 <h1>Move Page <small class="subheader">{{$page->name}}</small></h1>
28 28
29 - <form action="{{ $page->getUrl() }}/move" method="POST"> 29 + <form action="{{ $page->getUrl('/move') }}" method="POST">
30 {!! csrf_field() !!} 30 {!! csrf_field() !!}
31 <input type="hidden" name="_method" value="PUT"> 31 <input type="hidden" name="_method" value="PUT">
32 32
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
8 <table> 8 <table>
9 @foreach($page->tags as $tag) 9 @foreach($page->tags as $tag)
10 <tr class="tag"> 10 <tr class="tag">
11 - <td @if(!$tag->value) colspan="2" @endif><a href="/search/all?term=%5B{{ urlencode($tag->name) }}%5D">{{ $tag->name }}</a></td> 11 + <td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td>
12 - @if($tag->value) <td class="tag-value"><a href="/search/all?term=%5B{{ urlencode($tag->name) }}%3D{{ urlencode($tag->value) }}%5D">{{$tag->value}}</a></td> @endif 12 + @if($tag->value) <td class="tag-value"><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}">{{$tag->value}}</a></td> @endif
13 </tr> 13 </tr>
14 @endforeach 14 @endforeach
15 </table> 15 </table>
......
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
7 <div class="row"> 7 <div class="row">
8 <div class="col-sm-12 faded"> 8 <div class="col-sm-12 faded">
9 <div class="breadcrumbs"> 9 <div class="breadcrumbs">
10 - <a href="{{$page->book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $page->book->getShortName() }}</a> 10 + <a href="{{ $page->book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $page->book->getShortName() }}</a>
11 @if($page->hasChapter()) 11 @if($page->hasChapter())
12 <span class="sep">&raquo;</span> 12 <span class="sep">&raquo;</span>
13 <a href="{{ $page->chapter->getUrl() }}" class="text-chapter text-button"> 13 <a href="{{ $page->chapter->getUrl() }}" class="text-chapter text-button">
14 <i class="zmdi zmdi-collection-bookmark"></i> 14 <i class="zmdi zmdi-collection-bookmark"></i>
15 - {{$page->chapter->getShortName()}} 15 + {{ $page->chapter->getShortName() }}
16 </a> 16 </a>
17 @endif 17 @endif
18 <span class="sep">&raquo;</span> 18 <span class="sep">&raquo;</span>
19 - <a href="{{$page->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-file"></i>{{ $page->getShortName() }}</a> 19 + <a href="{{ $page->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-file"></i>{{ $page->getShortName() }}</a>
20 </div> 20 </div>
21 </div> 21 </div>
22 </div> 22 </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <div class="row"> 7 <div class="row">
8 <div class="col-md-6 faded"> 8 <div class="col-md-6 faded">
9 <div class="breadcrumbs"> 9 <div class="breadcrumbs">
10 - <a href="{{$page->getUrl()}}" class="text-primary text-button"><i class="zmdi zmdi-arrow-left"></i>Back to page</a> 10 + <a href="{{ $page->getUrl() }}" class="text-primary text-button"><i class="zmdi zmdi-arrow-left"></i>Back to page</a>
11 </div> 11 </div>
12 </div> 12 </div>
13 <div class="col-md-6 faded"> 13 <div class="col-md-6 faded">
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
40 <td> @if($revision->createdBy) {{$revision->createdBy->name}} @else Deleted User @endif</td> 40 <td> @if($revision->createdBy) {{$revision->createdBy->name}} @else Deleted User @endif</td>
41 <td><small>{{$revision->created_at->format('jS F, Y H:i:s')}} <br> ({{$revision->created_at->diffForHumans()}})</small></td> 41 <td><small>{{$revision->created_at->format('jS F, Y H:i:s')}} <br> ({{$revision->created_at->diffForHumans()}})</small></td>
42 <td> 42 <td>
43 - <a href="{{$revision->getUrl()}}" target="_blank">Preview</a> 43 + <a href="{{ $revision->getUrl() }}" target="_blank">Preview</a>
44 <span class="text-muted">&nbsp;|&nbsp;</span> 44 <span class="text-muted">&nbsp;|&nbsp;</span>
45 - <a href="{{$revision->getUrl()}}/restore">Restore</a> 45 + <a href="{{ $revision->getUrl('/restore') }}">Restore</a>
46 </td> 46 </td>
47 </tr> 47 </tr>
48 @endforeach 48 @endforeach
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
7 <div class="row"> 7 <div class="row">
8 <div class="col-sm-6 faded"> 8 <div class="col-sm-6 faded">
9 <div class="breadcrumbs"> 9 <div class="breadcrumbs">
10 - <a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a> 10 + <a href="{{ $book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a>
11 @if($page->hasChapter()) 11 @if($page->hasChapter())
12 <span class="sep">&raquo;</span> 12 <span class="sep">&raquo;</span>
13 <a href="{{ $page->chapter->getUrl() }}" class="text-chapter text-button"> 13 <a href="{{ $page->chapter->getUrl() }}" class="text-chapter text-button">
14 <i class="zmdi zmdi-collection-bookmark"></i> 14 <i class="zmdi zmdi-collection-bookmark"></i>
15 - {{$page->chapter->getShortName()}} 15 + {{ $page->chapter->getShortName() }}
16 </a> 16 </a>
17 @endif 17 @endif
18 </div> 18 </div>
...@@ -22,27 +22,27 @@ ...@@ -22,27 +22,27 @@
22 <span dropdown class="dropdown-container"> 22 <span dropdown class="dropdown-container">
23 <div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>Export</div> 23 <div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>Export</div>
24 <ul class="wide"> 24 <ul class="wide">
25 - <li><a href="{{$page->getUrl()}}/export/html" target="_blank">Contained Web File <span class="text-muted float right">.html</span></a></li> 25 + <li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">Contained Web File <span class="text-muted float right">.html</span></a></li>
26 - <li><a href="{{$page->getUrl()}}/export/pdf" target="_blank">PDF File <span class="text-muted float right">.pdf</span></a></li> 26 + <li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">PDF File <span class="text-muted float right">.pdf</span></a></li>
27 - <li><a href="{{$page->getUrl()}}/export/plaintext" target="_blank">Plain Text File <span class="text-muted float right">.txt</span></a></li> 27 + <li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">Plain Text File <span class="text-muted float right">.txt</span></a></li>
28 </ul> 28 </ul>
29 </span> 29 </span>
30 @if(userCan('page-update', $page)) 30 @if(userCan('page-update', $page))
31 - <a href="{{$page->getUrl()}}/edit" class="text-primary text-button" ><i class="zmdi zmdi-edit"></i>Edit</a> 31 + <a href="{{ $page->getUrl('/edit') }}" class="text-primary text-button" ><i class="zmdi zmdi-edit"></i>Edit</a>
32 @endif 32 @endif
33 @if(userCan('page-update', $page) || userCan('restrictions-manage', $page) || userCan('page-delete', $page)) 33 @if(userCan('page-update', $page) || userCan('restrictions-manage', $page) || userCan('page-delete', $page))
34 <div dropdown class="dropdown-container"> 34 <div dropdown class="dropdown-container">
35 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a> 35 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
36 <ul> 36 <ul>
37 @if(userCan('page-update', $page)) 37 @if(userCan('page-update', $page))
38 - <li><a href="{{$page->getUrl()}}/move" class="text-primary" ><i class="zmdi zmdi-folder"></i>Move</a></li> 38 + <li><a href="{{ $page->getUrl('/move') }}" class="text-primary" ><i class="zmdi zmdi-folder"></i>Move</a></li>
39 - <li><a href="{{$page->getUrl()}}/revisions" class="text-primary"><i class="zmdi zmdi-replay"></i>Revisions</a></li> 39 + <li><a href="{{ $page->getUrl('/revisions') }}" class="text-primary"><i class="zmdi zmdi-replay"></i>Revisions</a></li>
40 @endif 40 @endif
41 @if(userCan('restrictions-manage', $page)) 41 @if(userCan('restrictions-manage', $page))
42 - <li><a href="{{$page->getUrl()}}/permissions" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li> 42 + <li><a href="{{ $page->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li>
43 @endif 43 @endif
44 @if(userCan('page-delete', $page)) 44 @if(userCan('page-delete', $page))
45 - <li><a href="{{$page->getUrl()}}/delete" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li> 45 + <li><a href="{{ $page->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li>
46 @endif 46 @endif
47 </ul> 47 </ul>
48 </div> 48 </div>
...@@ -73,13 +73,14 @@ ...@@ -73,13 +73,14 @@
73 <hr> 73 <hr>
74 74
75 <p class="text-muted small"> 75 <p class="text-muted small">
76 - Created {{$page->created_at->diffForHumans()}} @if($page->createdBy) by <a href="/user/{{ $page->createdBy->id }}">{{$page->createdBy->name}}</a> @endif 76 + Created {{ $page->created_at->diffForHumans() }} @if($page->createdBy) by <a href="{{ $page->createdBy->getProfileUrl() }}">{{$page->createdBy->name}}</a> @endif
77 <br> 77 <br>
78 - Last Updated {{$page->updated_at->diffForHumans()}} @if($page->updatedBy) by <a href="/user/{{ $page->updatedBy->id }}">{{$page->updatedBy->name}}</a> @endif 78 + Last Updated {{ $page->updated_at->diffForHumans() }} @if($page->updatedBy) by <a href="{{ $page->updatedBy->getProfileUrl() }}">{{$page->updatedBy->name}}</a> @endif
79 </p> 79 </p>
80 80
81 </div> 81 </div>
82 </div> 82 </div>
83 +
83 <div class="col-md-3 print-hidden"> 84 <div class="col-md-3 print-hidden">
84 <div class="margin-top large"></div> 85 <div class="margin-top large"></div>
85 @if($book->restricted || ($page->chapter && $page->chapter->restricted) || $page->restricted) 86 @if($book->restricted || ($page->chapter && $page->chapter->restricted) || $page->restricted)
...@@ -87,7 +88,7 @@ ...@@ -87,7 +88,7 @@
87 88
88 @if($book->restricted) 89 @if($book->restricted)
89 @if(userCan('restrictions-manage', $book)) 90 @if(userCan('restrictions-manage', $book))
90 - <a href="{{ $book->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a> 91 + <a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a>
91 @else 92 @else
92 <i class="zmdi zmdi-lock-outline"></i>Book Permissions Active 93 <i class="zmdi zmdi-lock-outline"></i>Book Permissions Active
93 @endif 94 @endif
...@@ -96,7 +97,7 @@ ...@@ -96,7 +97,7 @@
96 97
97 @if($page->chapter && $page->chapter->restricted) 98 @if($page->chapter && $page->chapter->restricted)
98 @if(userCan('restrictions-manage', $page->chapter)) 99 @if(userCan('restrictions-manage', $page->chapter))
99 - <a href="{{ $page->chapter->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active</a> 100 + <a href="{{ $page->chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active</a>
100 @else 101 @else
101 <i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active 102 <i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active
102 @endif 103 @endif
...@@ -105,7 +106,7 @@ ...@@ -105,7 +106,7 @@
105 106
106 @if($page->restricted) 107 @if($page->restricted)
107 @if(userCan('restrictions-manage', $page)) 108 @if(userCan('restrictions-manage', $page))
108 - <a href="{{ $page->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Page Permissions Active</a> 109 + <a href="{{ $page->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Page Permissions Active</a>
109 @else 110 @else
110 <i class="zmdi zmdi-lock-outline"></i>Page Permissions Active 111 <i class="zmdi zmdi-lock-outline"></i>Page Permissions Active
111 @endif 112 @endif
...@@ -114,8 +115,8 @@ ...@@ -114,8 +115,8 @@
114 </div> 115 </div>
115 @endif 116 @endif
116 @include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree]) 117 @include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree])
117 -
118 </div> 118 </div>
119 +
119 </div> 120 </div>
120 </div> 121 </div>
121 122
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
2 <div class="book-tree" ng-non-bindable> 2 <div class="book-tree" ng-non-bindable>
3 <h6 class="text-muted">Book Navigation</h6> 3 <h6 class="text-muted">Book Navigation</h6>
4 <ul class="sidebar-page-list menu"> 4 <ul class="sidebar-page-list menu">
5 - <li class="book-header"><a href="{{$book->getUrl()}}" class="book {{ $current->matches($book)? 'selected' : '' }}"><i class="zmdi zmdi-book"></i>{{$book->name}}</a></li> 5 + <li class="book-header"><a href="{{ $book->getUrl() }}" class="book {{ $current->matches($book)? 'selected' : '' }}"><i class="zmdi zmdi-book"></i>{{$book->name}}</a></li>
6 6
7 7
8 @foreach($sidebarTree as $bookChild) 8 @foreach($sidebarTree as $bookChild)
9 <li class="list-item-{{ $bookChild->getClassName() }} {{ $bookChild->getClassName() }} {{ $bookChild->isA('page') && $bookChild->draft ? 'draft' : '' }}"> 9 <li class="list-item-{{ $bookChild->getClassName() }} {{ $bookChild->getClassName() }} {{ $bookChild->isA('page') && $bookChild->draft ? 'draft' : '' }}">
10 - <a href="{{$bookChild->getUrl()}}" class="{{ $bookChild->getClassName() }} {{ $current->matches($bookChild)? 'selected' : '' }}"> 10 + <a href="{{ $bookChild->getUrl() }}" class="{{ $bookChild->getClassName() }} {{ $current->matches($bookChild)? 'selected' : '' }}">
11 @if($bookChild->isA('chapter'))<i class="zmdi zmdi-collection-bookmark"></i>@else <i class="zmdi zmdi-file-text"></i>@endif{{ $bookChild->name }} 11 @if($bookChild->isA('chapter'))<i class="zmdi zmdi-collection-bookmark"></i>@else <i class="zmdi zmdi-file-text"></i>@endif{{ $bookChild->name }}
12 </a> 12 </a>
13 13
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
18 <ul class="menu sub-menu inset-list @if($bookChild->matchesOrContains($current)) open @endif"> 18 <ul class="menu sub-menu inset-list @if($bookChild->matchesOrContains($current)) open @endif">
19 @foreach($bookChild->pages as $childPage) 19 @foreach($bookChild->pages as $childPage)
20 <li class="list-item-page {{ $childPage->isA('page') && $childPage->draft ? 'draft' : '' }}"> 20 <li class="list-item-page {{ $childPage->isA('page') && $childPage->draft ? 'draft' : '' }}">
21 - <a href="{{$childPage->getUrl()}}" class="page {{ $current->matches($childPage)? 'selected' : '' }}"> 21 + <a href="{{ $childPage->getUrl() }}" class="page {{ $current->matches($childPage)? 'selected' : '' }}">
22 <i class="zmdi zmdi-file-text"></i> {{ $childPage->name }} 22 <i class="zmdi zmdi-file-text"></i> {{ $childPage->name }}
23 </a> 23 </a>
24 </li> 24 </li>
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
3 3
4 @if($activity->user) 4 @if($activity->user)
5 <div class="left"> 5 <div class="left">
6 - <img class="avatar" src="{{ $activity->user->getAvatar(30) }}" alt="{{$activity->user->name}}"> 6 + <img class="avatar" src="{{ $activity->user->getAvatar(30) }}" alt="{{ $activity->user->name }}">
7 </div> 7 </div>
8 @endif 8 @endif
9 9
10 <div class="right" ng-non-bindable> 10 <div class="right" ng-non-bindable>
11 @if($activity->user) 11 @if($activity->user)
12 - <a href="/user/{{ $activity->user->id }}">{{$activity->user->name}}</a> 12 + <a href="{{ $activity->user->getProfileUrl() }}">{{ $activity->user->name }}</a>
13 @else 13 @else
14 A deleted user 14 A deleted user
15 @endif 15 @endif
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 <a href="{{ $activity->entity->getUrl() }}">{{ $activity->entity->name }}</a> 20 <a href="{{ $activity->entity->getUrl() }}">{{ $activity->entity->name }}</a>
21 @endif 21 @endif
22 22
23 - @if($activity->extra) "{{$activity->extra}}" @endif 23 + @if($activity->extra) "{{ $activity->extra }}" @endif
24 24
25 <br> 25 <br>
26 26
......
1 <style> 1 <style>
2 header, #back-to-top, .primary-background { 2 header, #back-to-top, .primary-background {
3 - background-color: {{ Setting::get('app-color') }} !important; 3 + background-color: {{ setting('app-color') }} !important;
4 } 4 }
5 .faded-small, .primary-background-light { 5 .faded-small, .primary-background-light {
6 - background-color: {{ Setting::get('app-color-light') }}; 6 + background-color: {{ setting('app-color-light') }};
7 } 7 }
8 .button-base, .button, input[type="button"], input[type="submit"] { 8 .button-base, .button, input[type="button"], input[type="submit"] {
9 - background-color: {{ Setting::get('app-color') }}; 9 + background-color: {{ setting('app-color') }};
10 } 10 }
11 .button-base:hover, .button:hover, input[type="button"]:hover, input[type="submit"]:hover, .button:focus { 11 .button-base:hover, .button:hover, input[type="button"]:hover, input[type="submit"]:hover, .button:focus {
12 - background-color: {{ Setting::get('app-color') }}; 12 + background-color: {{ setting('app-color') }};
13 } 13 }
14 .nav-tabs a.selected, .nav-tabs .tab-item.selected { 14 .nav-tabs a.selected, .nav-tabs .tab-item.selected {
15 - border-bottom-color: {{ Setting::get('app-color') }}; 15 + border-bottom-color: {{ setting('app-color') }};
16 } 16 }
17 p.primary:hover, p .primary:hover, span.primary:hover, .text-primary:hover, a, a:hover, a:focus, .text-button, .text-button:hover, .text-button:focus { 17 p.primary:hover, p .primary:hover, span.primary:hover, .text-primary:hover, a, a:hover, a:focus, .text-button, .text-button:hover, .text-button:focus {
18 - color: {{ Setting::get('app-color') }}; 18 + color: {{ setting('app-color') }};
19 } 19 }
20 </style> 20 </style>
...\ No newline at end of file ...\ No newline at end of file
......
1 1
2 -<script src="/libs/highlightjs/highlight.min.js"></script> 2 +<script src="{{ baseUrl('/libs/highlightjs/highlight.min.js') }}"></script>
3 <script> 3 <script>
4 $(function() { 4 $(function() {
5 var aCodes = document.getElementsByTagName('pre'); 5 var aCodes = document.getElementsByTagName('pre');
......
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 - <title>BookStack</title> 4 + <title>{{ setting('app-name') }}</title>
5 5
6 <!-- Meta --> 6 <!-- Meta -->
7 <meta name="viewport" content="width=device-width"> 7 <meta name="viewport" content="width=device-width">
8 <meta name="token" content="{{ csrf_token() }}"> 8 <meta name="token" content="{{ csrf_token() }}">
9 + <meta name="base-url" content="{{ baseUrl('/') }}">
9 <meta charset="utf-8"> 10 <meta charset="utf-8">
10 11
11 <!-- Styles and Fonts --> 12 <!-- Styles and Fonts -->
12 <link rel="stylesheet" href="{{ versioned_asset('css/styles.css') }}"> 13 <link rel="stylesheet" href="{{ versioned_asset('css/styles.css') }}">
13 <link rel="stylesheet" media="print" href="{{ versioned_asset('css/print-styles.css') }}"> 14 <link rel="stylesheet" media="print" href="{{ versioned_asset('css/print-styles.css') }}">
14 - <link rel="stylesheet" href="/libs/material-design-iconic-font/css/material-design-iconic-font.min.css"> 15 + <link rel="stylesheet" href="{{ baseUrl("/libs/material-design-iconic-font/css/material-design-iconic-font.min.css") }}">
15 16
16 <!-- Scripts --> 17 <!-- Scripts -->
17 - <script src="/libs/jquery/jquery.min.js?version=2.1.4"></script> 18 + <script src="{{ baseUrl("/libs/jquery/jquery.min.js?version=2.1.4") }}"></script>
18 @include('partials/custom-styles') 19 @include('partials/custom-styles')
19 </head> 20 </head>
20 <body class="@yield('body-class')" ng-app="bookStack"> 21 <body class="@yield('body-class')" ng-app="bookStack">
...@@ -26,9 +27,11 @@ ...@@ -26,9 +27,11 @@
26 <div class="row"> 27 <div class="row">
27 <div class="col-md-6"> 28 <div class="col-md-6">
28 29
29 - <a href="/" class="logo"> 30 + <a href="{{ baseUrl('/') }}" class="logo">
30 - <img class="logo-image" src="/logo.png" alt="Logo"> 31 + @if(setting('app-logo', '') !== 'none')
31 - <span class="logo-text">{{ Setting::get('app-name', 'BookStack') }}</span> 32 + <img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo">
33 + @endif
34 + <span class="logo-text">{{ setting('app-name') }}</span>
32 </a> 35 </a>
33 </div> 36 </div>
34 <div class="col-md-6"> 37 <div class="col-md-6">
...@@ -38,16 +41,19 @@ ...@@ -38,16 +41,19 @@
38 </div> 41 </div>
39 @if(isset($signedIn) && $signedIn) 42 @if(isset($signedIn) && $signedIn)
40 <div class="dropdown-container" dropdown> 43 <div class="dropdown-container" dropdown>
41 - <span class="user-name" dropdown-toggle> 44 + <span class="user-name" dropdown-toggle>
42 - <img class="avatar" src="{{$currentUser->getAvatar(30)}}" alt="{{ $currentUser->name }}"> 45 + <img class="avatar" src="{{$currentUser->getAvatar(30)}}" alt="{{ $currentUser->name }}">
43 - <span class="name" ng-non-bindable>{{ $currentUser->name }}</span> <i class="zmdi zmdi-caret-down"></i> 46 + <span class="name" ng-non-bindable>{{ $currentUser->getShortName(9) }}</span> <i class="zmdi zmdi-caret-down"></i>
44 - </span> 47 + </span>
45 <ul> 48 <ul>
46 <li> 49 <li>
47 - <a href="/users/{{$currentUser->id}}" class="text-primary"><i class="zmdi zmdi-edit zmdi-hc-lg"></i>Edit Profile</a> 50 + <a href="{{ baseUrl("/user/{$currentUser->id}") }}" class="text-primary"><i class="zmdi zmdi-account zmdi-hc-fw zmdi-hc-lg"></i>View Profile</a>
51 + </li>
52 + <li>
53 + <a href="{{ baseUrl("/settings/users/{$currentUser->id}") }}" class="text-primary"><i class="zmdi zmdi-edit zmdi-hc-fw zmdi-hc-lg"></i>Edit Profile</a>
48 </li> 54 </li>
49 <li> 55 <li>
50 - <a href="/logout" class="text-neg"><i class="zmdi zmdi-run zmdi-hc-lg"></i>Logout</a> 56 + <a href="{{ baseUrl('/logout') }}" class="text-neg"><i class="zmdi zmdi-run zmdi-hc-fw zmdi-hc-lg"></i>Logout</a>
51 </li> 57 </li>
52 </ul> 58 </ul>
53 </div> 59 </div>
......
...@@ -4,41 +4,41 @@ ...@@ -4,41 +4,41 @@
4 4
5 <div class="container anim fadeIn" ng-non-bindable> 5 <div class="container anim fadeIn" ng-non-bindable>
6 6
7 - <h1>Search Results&nbsp;&nbsp;&nbsp; <span class="text-muted">{{$searchTerm}}</span></h1> 7 + <h1>Search Results&nbsp;&nbsp;&nbsp; <span class="text-muted">{{ $searchTerm }}</span></h1>
8 8
9 <p> 9 <p>
10 10
11 @if(count($pages) > 0) 11 @if(count($pages) > 0)
12 - <a href="/search/pages?term={{$searchTerm}}" class="text-page"><i class="zmdi zmdi-file-text"></i>View all matched pages</a> 12 + <a href="{{ baseUrl("/search/pages?term={$searchTerm}") }}" class="text-page"><i class="zmdi zmdi-file-text"></i>View all matched pages</a>
13 @endif 13 @endif
14 14
15 15
16 @if(count($chapters) > 0) 16 @if(count($chapters) > 0)
17 &nbsp; &nbsp;&nbsp; 17 &nbsp; &nbsp;&nbsp;
18 - <a href="/search/chapters?term={{$searchTerm}}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>View all matched chapters</a> 18 + <a href="{{ baseUrl("/search/chapters?term={$searchTerm}") }}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>View all matched chapters</a>
19 @endif 19 @endif
20 20
21 @if(count($books) > 0) 21 @if(count($books) > 0)
22 &nbsp; &nbsp;&nbsp; 22 &nbsp; &nbsp;&nbsp;
23 - <a href="/search/books?term={{$searchTerm}}" class="text-book"><i class="zmdi zmdi-book"></i>View all matched books</a> 23 + <a href="{{ baseUrl("/search/books?term={$searchTerm}") }}" class="text-book"><i class="zmdi zmdi-book"></i>View all matched books</a>
24 @endif 24 @endif
25 </p> 25 </p>
26 <div class="row"> 26 <div class="row">
27 27
28 <div class="col-md-6"> 28 <div class="col-md-6">
29 - <h3><a href="/search/pages?term={{$searchTerm}}" class="no-color">Matching Pages</a></h3> 29 + <h3><a href="{{ baseUrl("/search/pages?term={$searchTerm}") }}" class="no-color">Matching Pages</a></h3>
30 @include('partials/entity-list', ['entities' => $pages, 'style' => 'detailed']) 30 @include('partials/entity-list', ['entities' => $pages, 'style' => 'detailed'])
31 </div> 31 </div>
32 32
33 <div class="col-md-5 col-md-offset-1"> 33 <div class="col-md-5 col-md-offset-1">
34 34
35 @if(count($books) > 0) 35 @if(count($books) > 0)
36 - <h3><a href="/search/books?term={{$searchTerm}}" class="no-color">Matching Books</a></h3> 36 + <h3><a href="{{ baseUrl("/search/books?term={$searchTerm}") }}" class="no-color">Matching Books</a></h3>
37 @include('partials/entity-list', ['entities' => $books]) 37 @include('partials/entity-list', ['entities' => $books])
38 @endif 38 @endif
39 39
40 @if(count($chapters) > 0) 40 @if(count($chapters) > 0)
41 - <h3><a href="/search/chapters?term={{$searchTerm}}" class="no-color">Matching Chapters</a></h3> 41 + <h3><a href="{{ baseUrl("/search/chapters?term={$searchTerm}") }}" class="no-color">Matching Chapters</a></h3>
42 @include('partials/entity-list', ['entities' => $chapters]) 42 @include('partials/entity-list', ['entities' => $chapters])
43 @endif 43 @endif
44 44
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
6 <div class="row"> 6 <div class="row">
7 7
8 <div class="col-sm-7"> 8 <div class="col-sm-7">
9 - <h1>{{ $title }} <small>{{$searchTerm}}</small></h1> 9 + <h1>{{ $title }} <small>{{ $searchTerm }}</small></h1>
10 @include('partials.entity-list', ['entities' => $entities, 'style' => 'detailed']) 10 @include('partials.entity-list', ['entities' => $entities, 'style' => 'detailed'])
11 {!! $entities->links() !!} 11 {!! $entities->links() !!}
12 </div> 12 </div>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 8
9 <h1>Settings</h1> 9 <h1>Settings</h1>
10 10
11 - <form action="/settings" method="POST" ng-cloak> 11 + <form action="{{ baseUrl("/settings") }}" method="POST" ng-cloak>
12 {!! csrf_field() !!} 12 {!! csrf_field() !!}
13 13
14 <h3>App Settings</h3> 14 <h3>App Settings</h3>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
41 <div class="form-group" id="logo-control"> 41 <div class="form-group" id="logo-control">
42 <label for="setting-app-logo">Application logo</label> 42 <label for="setting-app-logo">Application logo</label>
43 <p class="small">This image should be 43px in height. <br>Large images will be scaled down.</p> 43 <p class="small">This image should be 43px in height. <br>Large images will be scaled down.</p>
44 - <image-picker resize-height="43" show-remove="true" resize-width="200" current-image="{{ setting('app-logo', '') }}" default-image="/logo.png" name="setting-app-logo" image-class="logo-image"></image-picker> 44 + <image-picker resize-height="43" show-remove="true" resize-width="200" current-image="{{ setting('app-logo', '') }}" default-image="{{ baseUrl('/logo.png') }}" name="setting-app-logo" image-class="logo-image"></image-picker>
45 </div> 45 </div>
46 <div class="form-group" id="color-control"> 46 <div class="form-group" id="color-control">
47 <label for="setting-app-color">Application primary color</label> 47 <label for="setting-app-color">Application primary color</label>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
112 @stop 112 @stop
113 113
114 @section('scripts') 114 @section('scripts')
115 - <script src="/libs/jq-color-picker/tiny-color-picker.min.js?version=1.0.0"></script> 115 + <script src="{{ baseUrl("/libs/jq-color-picker/tiny-color-picker.min.js?version=1.0.0") }}"></script>
116 <script type="text/javascript"> 116 <script type="text/javascript">
117 $('#setting-app-color').colorPicker({ 117 $('#setting-app-color').colorPicker({
118 opacity: false, 118 opacity: false,
...@@ -125,9 +125,9 @@ ...@@ -125,9 +125,9 @@
125 if (!isEmpty) $elm.val(hexVal); 125 if (!isEmpty) $elm.val(hexVal);
126 $('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal); 126 $('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal);
127 // Set page elements to provide preview 127 // Set page elements to provide preview
128 - $('#header, .image-picker .button').css('background-color', hexVal); 128 + $('#header, .image-picker .button').attr('style', 'background-color:'+ hexVal+'!important;');
129 $('.faded-small').css('background-color', rgbLightVal); 129 $('.faded-small').css('background-color', rgbLightVal);
130 - $('.setting-nav a.selected').css('border-bottom-color', hexVal); 130 + $('.setting-nav a.selected').css('border-bottom-color', hexVal + '!important');
131 } 131 }
132 }); 132 });
133 </script> 133 </script>
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
4 <div class="row"> 4 <div class="row">
5 <div class="col-md-12 setting-nav nav-tabs"> 5 <div class="col-md-12 setting-nav nav-tabs">
6 @if($currentUser->can('settings-manage')) 6 @if($currentUser->can('settings-manage'))
7 - <a href="/settings" @if($selected == 'settings') class="selected text-button" @endif><i class="zmdi zmdi-settings"></i>Settings</a> 7 + <a href="{{ baseUrl('/settings') }}" @if($selected == 'settings') class="selected text-button" @endif><i class="zmdi zmdi-settings"></i>Settings</a>
8 @endif 8 @endif
9 @if($currentUser->can('users-manage')) 9 @if($currentUser->can('users-manage'))
10 - <a href="/settings/users" @if($selected == 'users') class="selected text-button" @endif><i class="zmdi zmdi-accounts"></i>Users</a> 10 + <a href="{{ baseUrl('/settings/users') }}" @if($selected == 'users') class="selected text-button" @endif><i class="zmdi zmdi-accounts"></i>Users</a>
11 @endif 11 @endif
12 @if($currentUser->can('user-roles-manage')) 12 @if($currentUser->can('user-roles-manage'))
13 - <a href="/settings/roles" @if($selected == 'roles') class="selected text-button" @endif><i class="zmdi zmdi-lock-open"></i>Roles</a> 13 + <a href="{{ baseUrl('/settings/roles') }}" @if($selected == 'roles') class="selected text-button" @endif><i class="zmdi zmdi-lock-open"></i>Roles</a>
14 @endif 14 @endif
15 </div> 15 </div>
16 </div> 16 </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <div class="container"> 7 <div class="container">
8 <h1>Create New Role</h1> 8 <h1>Create New Role</h1>
9 9
10 - <form action="/settings/roles/new" method="POST"> 10 + <form action="{{ baseUrl("/settings/roles/new") }}" method="POST">
11 @include('settings/roles/form') 11 @include('settings/roles/form')
12 </form> 12 </form>
13 </div> 13 </div>
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
6 6
7 <div class="container small" ng-non-bindable> 7 <div class="container small" ng-non-bindable>
8 <h1>Delete Role</h1> 8 <h1>Delete Role</h1>
9 - <p>This will delete the role with the name '{{$role->display_name}}'.</p> 9 + <p>This will delete the role with the name '{{ $role->display_name }}'.</p>
10 10
11 - <form action="/settings/roles/delete/{{$role->id}}" method="POST"> 11 + <form action="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" method="POST">
12 {!! csrf_field() !!} 12 {!! csrf_field() !!}
13 <input type="hidden" name="_method" value="DELETE"> 13 <input type="hidden" name="_method" value="DELETE">
14 14
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 @endif 20 @endif
21 21
22 <p class="text-neg">Are you sure you want to delete this role?</p> 22 <p class="text-neg">Are you sure you want to delete this role?</p>
23 - <a href="/settings/roles/{{ $role->id }}" class="button">Cancel</a> 23 + <a href="{{ baseUrl("/settings/roles/{$role->id}") }}" class="button">Cancel</a>
24 <button type="submit" class="button neg">Confirm</button> 24 <button type="submit" class="button neg">Confirm</button>
25 </form> 25 </form>
26 </div> 26 </div>
......
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
11 </div> 11 </div>
12 <div class="col-sm-6"> 12 <div class="col-sm-6">
13 <p></p> 13 <p></p>
14 - <a href="/settings/roles/delete/{{ $role->id }}" class="button neg float right">Delete Role</a> 14 + <a href="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" class="button neg float right">Delete Role</a>
15 </div> 15 </div>
16 </div> 16 </div>
17 17
18 - <form action="/settings/roles/{{ $role->id }}" method="POST"> 18 + <form action="{{ baseUrl("/settings/roles/{$role->id}") }}" method="POST">
19 <input type="hidden" name="_method" value="PUT"> 19 <input type="hidden" name="_method" value="PUT">
20 @include('settings/roles/form', ['model' => $role]) 20 @include('settings/roles/form', ['model' => $role])
21 </form> 21 </form>
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
109 </table> 109 </table>
110 </div> 110 </div>
111 </div> 111 </div>
112 - <a href="/settings/roles" class="button muted">Cancel</a> 112 + <a href="{{ baseUrl("/settings/roles") }}" class="button muted">Cancel</a>
113 <button type="submit" class="button pos">Save Role</button> 113 <button type="submit" class="button pos">Save Role</button>
114 </div> 114 </div>
115 <div class="col-md-3"> 115 <div class="col-md-3">
...@@ -119,10 +119,10 @@ ...@@ -119,10 +119,10 @@
119 <table class="list-table"> 119 <table class="list-table">
120 @foreach($role->users as $user) 120 @foreach($role->users as $user)
121 <tr> 121 <tr>
122 - <td style="line-height: 0;"><img class="avatar small" src="{{$user->getAvatar(40)}}" alt="{{$user->name}}"></td> 122 + <td style="line-height: 0;"><img class="avatar small" src="{{ $user->getAvatar(40) }}" alt="{{ $user->name }}"></td>
123 <td> 123 <td>
124 @if(userCan('users-manage') || $currentUser->id == $user->id) 124 @if(userCan('users-manage') || $currentUser->id == $user->id)
125 - <a href="/settings/users/{{$user->id}}"> 125 + <a href="{{ baseUrl("/settings/users/{$user->id}") }}">
126 @endif 126 @endif
127 {{ $user->name }} 127 {{ $user->name }}
128 @if(userCan('users-manage') || $currentUser->id == $user->id) 128 @if(userCan('users-manage') || $currentUser->id == $user->id)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 </div> 12 </div>
13 <div class="col-sm-4"> 13 <div class="col-sm-4">
14 <p></p> 14 <p></p>
15 - <a href="/settings/roles/new" class="button float right pos"><i class="zmdi zmdi-lock-open"></i>Add new role</a> 15 + <a href="{{ baseUrl("/settings/roles/new") }}" class="button float right pos"><i class="zmdi zmdi-lock-open"></i>Add new role</a>
16 </div> 16 </div>
17 </div> 17 </div>
18 18
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
24 </tr> 24 </tr>
25 @foreach($roles as $role) 25 @foreach($roles as $role)
26 <tr> 26 <tr>
27 - <td><a href="/settings/roles/{{ $role->id }}">{{ $role->display_name }}</a></td> 27 + <td><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a></td>
28 <td>{{ $role->description }}</td> 28 <td>{{ $role->description }}</td>
29 <td class="text-right">{{ $role->users->count() }}</td> 29 <td class="text-right">{{ $role->users->count() }}</td>
30 </tr> 30 </tr>
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
6 <div class="container small" ng-non-bindable> 6 <div class="container small" ng-non-bindable>
7 <h1>Create User</h1> 7 <h1>Create User</h1>
8 8
9 - <form action="/settings/users/create" method="post"> 9 + <form action="{{ baseUrl("/settings/users/create") }}" method="post">
10 {!! csrf_field() !!} 10 {!! csrf_field() !!}
11 - @include('users.forms.' . $authMethod) 11 + @include('users/forms/' . $authMethod)
12 </form> 12 </form>
13 </div> 13 </div>
14 14
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 <h1>Delete User</h1> 6 <h1>Delete User</h1>
7 - <p>This will fully delete this user with the name '<span class="text-neg">{{$user->name}}</span>' from the system.</p> 7 + <p>This will fully delete this user with the name '<span class="text-neg">{{ $user->name }}</span>' from the system.</p>
8 <p class="text-neg">Are you sure you want to delete this user?</p> 8 <p class="text-neg">Are you sure you want to delete this user?</p>
9 9
10 - <form action="/settings/users/{{$user->id}}" method="POST"> 10 + <form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="POST">
11 {!! csrf_field() !!} 11 {!! csrf_field() !!}
12 <input type="hidden" name="_method" value="DELETE"> 12 <input type="hidden" name="_method" value="DELETE">
13 - <a href="/settings/users/{{$user->id}}" class="button muted">Cancel</a> 13 + <a href="{{ baseUrl("/settings/users/{$user->id}") }}" class="button muted">Cancel</a>
14 <button type="submit" class="button neg">Confirm</button> 14 <button type="submit" class="button neg">Confirm</button>
15 </form> 15 </form>
16 </div> 16 </div>
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
8 8
9 9
10 <div class="container small"> 10 <div class="container small">
11 - <form action="/settings/users/{{$user->id}}" method="post"> 11 + <form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="post">
12 <div class="row"> 12 <div class="row">
13 <div class="col-sm-8"> 13 <div class="col-sm-8">
14 <h1>Edit {{ $user->id === $currentUser->id ? 'Profile' : 'User' }}</h1> 14 <h1>Edit {{ $user->id === $currentUser->id ? 'Profile' : 'User' }}</h1>
15 </div> 15 </div>
16 <div class="col-sm-4"> 16 <div class="col-sm-4">
17 <p></p> 17 <p></p>
18 - <a href="/settings/users/{{$user->id}}/delete" class="neg button float right">Delete User</a> 18 + <a href="{{ baseUrl("/settings/users/{$user->id}/delete") }}" class="neg button float right">Delete User</a>
19 </div> 19 </div>
20 </div> 20 </div>
21 <div class="row"> 21 <div class="row">
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
29 <div class="form-group" id="logo-control"> 29 <div class="form-group" id="logo-control">
30 <label for="user-avatar">User Avatar</label> 30 <label for="user-avatar">User Avatar</label>
31 <p class="small">This image should be approx 256px square.</p> 31 <p class="small">This image should be approx 256px square.</p>
32 - <image-picker resize-height="512" resize-width="512" current-image="{{ $user->getAvatar(80) }}" current-id="{{ $user->image_id }}" default-image="/user_avatar.png" name="image_id" show-remove="false" image-class="['avatar' ,'large']"></image-picker> 32 + <image-picker resize-height="512" resize-width="512" current-image="{{ $user->getAvatar(80) }}" current-id="{{ $user->image_id }}" default-image="{{ baseUrl("/user_avatar.png") }}" name="image_id" show-remove="false" image-class="['avatar' ,'large']"></image-picker>
33 </div> 33 </div>
34 </div> 34 </div>
35 </div> 35 </div>
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
49 <div><i class="zmdi zmdi-google-plus-box zmdi-hc-4x" style="color: #DC4E41;"></i></div> 49 <div><i class="zmdi zmdi-google-plus-box zmdi-hc-4x" style="color: #DC4E41;"></i></div>
50 <div> 50 <div>
51 @if($user->hasSocialAccount('google')) 51 @if($user->hasSocialAccount('google'))
52 - <a href="/login/service/google/detach" class="button neg">Disconnect Account</a> 52 + <a href="{{ baseUrl("/login/service/google/detach") }}" class="button neg">Disconnect Account</a>
53 @else 53 @else
54 - <a href="/login/service/google" class="button pos">Attach Account</a> 54 + <a href="{{ baseUrl("/login/service/google") }}" class="button pos">Attach Account</a>
55 @endif 55 @endif
56 </div> 56 </div>
57 </div> 57 </div>
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
61 <div><i class="zmdi zmdi-github zmdi-hc-4x" style="color: #444;"></i></div> 61 <div><i class="zmdi zmdi-github zmdi-hc-4x" style="color: #444;"></i></div>
62 <div> 62 <div>
63 @if($user->hasSocialAccount('github')) 63 @if($user->hasSocialAccount('github'))
64 - <a href="/login/service/github/detach" class="button neg">Disconnect Account</a> 64 + <a href="{{ baseUrl("/login/service/github/detach") }}" class="button neg">Disconnect Account</a>
65 @else 65 @else
66 - <a href="/login/service/github" class="button pos">Attach Account</a> 66 + <a href="{{ baseUrl("/login/service/github") }}" class="button pos">Attach Account</a>
67 @endif 67 @endif
68 </div> 68 </div>
69 </div> 69 </div>
......
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
25 @endif 25 @endif
26 26
27 <div class="form-group"> 27 <div class="form-group">
28 - <a href="/settings/users" class="button muted">Cancel</a> 28 + <a href="{{ baseUrl("/settings/users") }}" class="button muted">Cancel</a>
29 <button class="button pos" type="submit">Save</button> 29 <button class="button pos" type="submit">Save</button>
30 </div> 30 </div>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
34 </div> 34 </div>
35 35
36 <div class="form-group"> 36 <div class="form-group">
37 - <a href="/settings/users" class="button muted">Cancel</a> 37 + <a href="{{ baseUrl("/settings/users") }}" class="button muted">Cancel</a>
38 <button class="button pos" type="submit">Save</button> 38 <button class="button pos" type="submit">Save</button>
39 </div> 39 </div>
40 40
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
14 <div class="col-sm-4"> 14 <div class="col-sm-4">
15 <p></p> 15 <p></p>
16 @if(userCan('users-manage')) 16 @if(userCan('users-manage'))
17 - <a href="/settings/users/create" class="pos button float right"><i class="zmdi zmdi-account-add"></i>Add new user</a> 17 + <a href="{{ baseUrl("/settings/users/create") }}" class="pos button float right"><i class="zmdi zmdi-account-add"></i>Add new user</a>
18 @endif 18 @endif
19 </div> 19 </div>
20 </div> 20 </div>
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
26 </div> 26 </div>
27 </div> 27 </div>
28 <div class="col-sm-4"> 28 <div class="col-sm-4">
29 - <form method="get" class="float right" action="/settings/users"> 29 + <form method="get" class="float right" action="{{ baseUrl("/settings/users") }}">
30 @foreach(collect($listDetails)->except('search') as $name => $val) 30 @foreach(collect($listDetails)->except('search') as $name => $val)
31 - <input type="hidden" name="{{$name}}" value="{{$val}}"> 31 + <input type="hidden" name="{{ $name }}" value="{{ $val }}">
32 @endforeach 32 @endforeach
33 <input type="text" name="search" placeholder="Search Users" @if($listDetails['search']) value="{{$listDetails['search']}}" @endif> 33 <input type="text" name="search" placeholder="Search Users" @if($listDetails['search']) value="{{$listDetails['search']}}" @endif>
34 </form> 34 </form>
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
47 </tr> 47 </tr>
48 @foreach($users as $user) 48 @foreach($users as $user)
49 <tr> 49 <tr>
50 - <td style="line-height: 0;"><img class="avatar med" src="{{$user->getAvatar(40)}}" alt="{{$user->name}}"></td> 50 + <td style="line-height: 0;"><img class="avatar med" src="{{ $user->getAvatar(40)}}" alt="{{ $user->name }}"></td>
51 <td> 51 <td>
52 @if(userCan('users-manage') || $currentUser->id == $user->id) 52 @if(userCan('users-manage') || $currentUser->id == $user->id)
53 - <a href="/settings/users/{{$user->id}}"> 53 + <a href="{{ baseUrl("/settings/users/{$user->id}") }}">
54 @endif 54 @endif
55 {{ $user->name }} 55 {{ $user->name }}
56 @if(userCan('users-manage') || $currentUser->id == $user->id) 56 @if(userCan('users-manage') || $currentUser->id == $user->id)
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
59 </td> 59 </td>
60 <td> 60 <td>
61 @if(userCan('users-manage') || $currentUser->id == $user->id) 61 @if(userCan('users-manage') || $currentUser->id == $user->id)
62 - <a href="/settings/users/{{$user->id}}"> 62 + <a href="{{ baseUrl("/settings/users/{$user->id}") }}">
63 @endif 63 @endif
64 {{ $user->email }} 64 {{ $user->email }}
65 @if(userCan('users-manage') || $currentUser->id == $user->id) 65 @if(userCan('users-manage') || $currentUser->id == $user->id)
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
68 </td> 68 </td>
69 <td> 69 <td>
70 @foreach($user->roles as $index => $role) 70 @foreach($user->roles as $index => $role)
71 - <small><a href="/settings/roles/{{$role->id}}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small> 71 + <small><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
72 @endforeach 72 @endforeach
73 </td> 73 </td>
74 </tr> 74 </tr>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <div class="col-md-7"> 12 <div class="col-md-7">
13 <div class="clearfix"> 13 <div class="clearfix">
14 <div class="padded-right float left"> 14 <div class="padded-right float left">
15 - <img class="avatar square huge" src="{{$user->getAvatar(120)}}" alt="{{ $user->name }}"> 15 + <img class="avatar square huge" src="{{ $user->getAvatar(120) }}" alt="{{ $user->name }}">
16 </div> 16 </div>
17 <div> 17 <div>
18 <h3 style="margin-top: 0;">{{ $user->name }}</h3> 18 <h3 style="margin-top: 0;">{{ $user->name }}</h3>
......