mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 20:22:18 +00:00
Merge branch 'v0.11'
This commit is contained in:
commit
92d393537c
@ -3,6 +3,10 @@ APP_ENV=production
|
|||||||
APP_DEBUG=false
|
APP_DEBUG=false
|
||||||
APP_KEY=SomeRandomString
|
APP_KEY=SomeRandomString
|
||||||
|
|
||||||
|
# The below url has to be set if using social auth options
|
||||||
|
# or if you are not using BookStack at the root path of your domain.
|
||||||
|
# APP_URL=http://bookstack.dev
|
||||||
|
|
||||||
# Database details
|
# Database details
|
||||||
DB_HOST=localhost
|
DB_HOST=localhost
|
||||||
DB_DATABASE=database_database
|
DB_DATABASE=database_database
|
||||||
@ -42,8 +46,6 @@ GITHUB_APP_ID=false
|
|||||||
GITHUB_APP_SECRET=false
|
GITHUB_APP_SECRET=false
|
||||||
GOOGLE_APP_ID=false
|
GOOGLE_APP_ID=false
|
||||||
GOOGLE_APP_SECRET=false
|
GOOGLE_APP_SECRET=false
|
||||||
# URL used for social login redirects, NO TRAILING SLASH
|
|
||||||
APP_URL=http://bookstack.dev
|
|
||||||
|
|
||||||
# External services such as Gravatar
|
# External services such as Gravatar
|
||||||
DISABLE_EXTERNAL_SERVICES=false
|
DISABLE_EXTERNAL_SERVICES=false
|
||||||
|
@ -25,6 +25,7 @@ before_script:
|
|||||||
- composer config -g github-oauth.github.com $GITHUB_ACCESS_TOKEN
|
- composer config -g github-oauth.github.com $GITHUB_ACCESS_TOKEN
|
||||||
- phpenv config-rm xdebug.ini
|
- phpenv config-rm xdebug.ini
|
||||||
- composer self-update
|
- composer self-update
|
||||||
|
- composer dump-autoload --no-interaction
|
||||||
- composer install --prefer-dist --no-interaction
|
- composer install --prefer-dist --no-interaction
|
||||||
- npm install
|
- npm install
|
||||||
- ./node_modules/.bin/gulp
|
- ./node_modules/.bin/gulp
|
||||||
|
@ -7,11 +7,15 @@ class Book extends Entity
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the url for this book.
|
* Get the url for this book.
|
||||||
|
* @param string|bool $path
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getUrl()
|
public function getUrl($path = false)
|
||||||
{
|
{
|
||||||
return '/books/' . $this->slug;
|
if ($path !== false) {
|
||||||
|
return baseUrl('/books/' . $this->slug . '/' . trim($path, '/'));
|
||||||
|
}
|
||||||
|
return baseUrl('/books/' . $this->slug);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -25,12 +25,16 @@ class Chapter extends Entity
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the url of this chapter.
|
* Get the url of this chapter.
|
||||||
|
* @param string|bool $path
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getUrl()
|
public function getUrl($path = false)
|
||||||
{
|
{
|
||||||
$bookSlug = $this->getAttribute('bookSlug') ? $this->getAttribute('bookSlug') : $this->book->slug;
|
$bookSlug = $this->getAttribute('bookSlug') ? $this->getAttribute('bookSlug') : $this->book->slug;
|
||||||
return '/books/' . $bookSlug. '/chapter/' . $this->slug;
|
if ($path !== false) {
|
||||||
|
return baseUrl('/books/' . $bookSlug. '/chapter/' . $this->slug . '/' . trim($path, '/'));
|
||||||
|
}
|
||||||
|
return baseUrl('/books/' . $bookSlug. '/chapter/' . $this->slug);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,8 +48,8 @@ class Handler extends ExceptionHandler
|
|||||||
// Handle notify exceptions which will redirect to the
|
// Handle notify exceptions which will redirect to the
|
||||||
// specified location then show a notification message.
|
// specified location then show a notification message.
|
||||||
if ($e instanceof NotifyException) {
|
if ($e instanceof NotifyException) {
|
||||||
\Session::flash('error', $e->message);
|
session()->flash('error', $e->message);
|
||||||
return response()->redirectTo($e->redirectLocation);
|
return redirect($e->redirectLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle pretty exceptions which will show a friendly application-fitting page
|
// Handle pretty exceptions which will show a friendly application-fitting page
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
<?php
|
<?php namespace BookStack\Http\Controllers\Auth;
|
||||||
|
|
||||||
namespace BookStack\Http\Controllers\Auth;
|
|
||||||
|
|
||||||
use BookStack\Exceptions\AuthException;
|
use BookStack\Exceptions\AuthException;
|
||||||
use BookStack\Exceptions\PrettyException;
|
|
||||||
use Illuminate\Contracts\Auth\Authenticatable;
|
use Illuminate\Contracts\Auth\Authenticatable;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use BookStack\Exceptions\SocialSignInException;
|
use BookStack\Exceptions\SocialSignInException;
|
||||||
@ -36,7 +33,6 @@ class AuthController extends Controller
|
|||||||
protected $redirectAfterLogout = '/login';
|
protected $redirectAfterLogout = '/login';
|
||||||
protected $username = 'email';
|
protected $username = 'email';
|
||||||
|
|
||||||
|
|
||||||
protected $socialAuthService;
|
protected $socialAuthService;
|
||||||
protected $emailConfirmationService;
|
protected $emailConfirmationService;
|
||||||
protected $userRepo;
|
protected $userRepo;
|
||||||
@ -53,6 +49,8 @@ class AuthController extends Controller
|
|||||||
$this->socialAuthService = $socialAuthService;
|
$this->socialAuthService = $socialAuthService;
|
||||||
$this->emailConfirmationService = $emailConfirmationService;
|
$this->emailConfirmationService = $emailConfirmationService;
|
||||||
$this->userRepo = $userRepo;
|
$this->userRepo = $userRepo;
|
||||||
|
$this->redirectPath = baseUrl('/');
|
||||||
|
$this->redirectAfterLogout = baseUrl('/login');
|
||||||
$this->username = config('auth.method') === 'standard' ? 'email' : 'username';
|
$this->username = config('auth.method') === 'standard' ? 'email' : 'username';
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
@ -412,7 +412,7 @@ class PageController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function showRecentlyCreated()
|
public function showRecentlyCreated()
|
||||||
{
|
{
|
||||||
$pages = $this->pageRepo->getRecentlyCreatedPaginated(20);
|
$pages = $this->pageRepo->getRecentlyCreatedPaginated(20)->setPath(baseUrl('/pages/recently-created'));
|
||||||
return view('pages/detailed-listing', [
|
return view('pages/detailed-listing', [
|
||||||
'title' => 'Recently Created Pages',
|
'title' => 'Recently Created Pages',
|
||||||
'pages' => $pages
|
'pages' => $pages
|
||||||
@ -425,7 +425,7 @@ class PageController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function showRecentlyUpdated()
|
public function showRecentlyUpdated()
|
||||||
{
|
{
|
||||||
$pages = $this->pageRepo->getRecentlyUpdatedPaginated(20);
|
$pages = $this->pageRepo->getRecentlyUpdatedPaginated(20)->setPath(baseUrl('/pages/recently-updated'));
|
||||||
return view('pages/detailed-listing', [
|
return view('pages/detailed-listing', [
|
||||||
'title' => 'Recently Updated Pages',
|
'title' => 'Recently Updated Pages',
|
||||||
'pages' => $pages
|
'pages' => $pages
|
||||||
|
@ -33,7 +33,7 @@ class Authenticate
|
|||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if ($this->auth->check() && setting('registration-confirmation') && !$this->auth->user()->email_confirmed) {
|
if ($this->auth->check() && setting('registration-confirmation') && !$this->auth->user()->email_confirmed) {
|
||||||
return redirect()->guest('/register/confirm/awaiting');
|
return redirect()->guest(baseUrl('/register/confirm/awaiting'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->auth->guest() && !setting('app-public')) {
|
if ($this->auth->guest() && !setting('app-public')) {
|
||||||
|
10
app/Page.php
10
app/Page.php
@ -56,14 +56,20 @@ class Page extends Entity
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the url for this page.
|
* Get the url for this page.
|
||||||
|
* @param string|bool $path
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getUrl()
|
public function getUrl($path = false)
|
||||||
{
|
{
|
||||||
$bookSlug = $this->getAttribute('bookSlug') ? $this->getAttribute('bookSlug') : $this->book->slug;
|
$bookSlug = $this->getAttribute('bookSlug') ? $this->getAttribute('bookSlug') : $this->book->slug;
|
||||||
$midText = $this->draft ? '/draft/' : '/page/';
|
$midText = $this->draft ? '/draft/' : '/page/';
|
||||||
$idComponent = $this->draft ? $this->id : $this->slug;
|
$idComponent = $this->draft ? $this->id : $this->slug;
|
||||||
return '/books/' . $bookSlug . $midText . $idComponent;
|
|
||||||
|
if ($path !== false) {
|
||||||
|
return baseUrl('/books/' . $bookSlug . $midText . $idComponent . '/' . trim($path, '/'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return baseUrl('/books/' . $bookSlug . $midText . $idComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
30
app/Providers/PaginationServiceProvider.php
Normal file
30
app/Providers/PaginationServiceProvider.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php namespace BookStack\Providers;
|
||||||
|
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Illuminate\Pagination\Paginator;
|
||||||
|
|
||||||
|
class PaginationServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Register the service provider.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
Paginator::currentPathResolver(function () {
|
||||||
|
return baseUrl($this->app['request']->path());
|
||||||
|
});
|
||||||
|
|
||||||
|
Paginator::currentPageResolver(function ($pageName = 'page') {
|
||||||
|
$page = $this->app['request']->input($pageName);
|
||||||
|
|
||||||
|
if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) {
|
||||||
|
return $page;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -216,12 +216,10 @@ class BookRepo extends EntityRepo
|
|||||||
*/
|
*/
|
||||||
public function findSuitableSlug($name, $currentId = false)
|
public function findSuitableSlug($name, $currentId = false)
|
||||||
{
|
{
|
||||||
$originalSlug = Str::slug($name);
|
$slug = Str::slug($name);
|
||||||
$slug = $originalSlug;
|
if ($slug === "") $slug = substr(md5(rand(1, 500)), 0, 5);
|
||||||
$count = 2;
|
|
||||||
while ($this->doesSlugExist($slug, $currentId)) {
|
while ($this->doesSlugExist($slug, $currentId)) {
|
||||||
$slug = $originalSlug . '-' . $count;
|
$slug .= '-' . substr(md5(rand(1, 500)), 0, 3);
|
||||||
$count++;
|
|
||||||
}
|
}
|
||||||
return $slug;
|
return $slug;
|
||||||
}
|
}
|
||||||
|
@ -151,6 +151,7 @@ class ChapterRepo extends EntityRepo
|
|||||||
public function findSuitableSlug($name, $bookId, $currentId = false)
|
public function findSuitableSlug($name, $bookId, $currentId = false)
|
||||||
{
|
{
|
||||||
$slug = Str::slug($name);
|
$slug = Str::slug($name);
|
||||||
|
if ($slug === "") $slug = substr(md5(rand(1, 500)), 0, 5);
|
||||||
while ($this->doesSlugExist($slug, $bookId, $currentId)) {
|
while ($this->doesSlugExist($slug, $bookId, $currentId)) {
|
||||||
$slug .= '-' . substr(md5(rand(1, 500)), 0, 3);
|
$slug .= '-' . substr(md5(rand(1, 500)), 0, 3);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ class ImageRepo
|
|||||||
|
|
||||||
protected $image;
|
protected $image;
|
||||||
protected $imageService;
|
protected $imageService;
|
||||||
protected $restictionService;
|
protected $restrictionService;
|
||||||
protected $page;
|
protected $page;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,7 +27,7 @@ class ImageRepo
|
|||||||
{
|
{
|
||||||
$this->image = $image;
|
$this->image = $image;
|
||||||
$this->imageService = $imageService;
|
$this->imageService = $imageService;
|
||||||
$this->restictionService = $permissionService;
|
$this->restrictionService = $permissionService;
|
||||||
$this->page = $page;
|
$this->page = $page;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ class ImageRepo
|
|||||||
*/
|
*/
|
||||||
private function returnPaginated($query, $page = 0, $pageSize = 24)
|
private function returnPaginated($query, $page = 0, $pageSize = 24)
|
||||||
{
|
{
|
||||||
$images = $this->restictionService->filterRelatedPages($query, 'images', 'uploaded_to');
|
$images = $this->restrictionService->filterRelatedPages($query, 'images', 'uploaded_to');
|
||||||
$images = $images->orderBy('created_at', 'desc')->skip($pageSize * $page)->take($pageSize + 1)->get();
|
$images = $images->orderBy('created_at', 'desc')->skip($pageSize * $page)->take($pageSize + 1)->get();
|
||||||
$hasMore = count($images) > $pageSize;
|
$hasMore = count($images) > $pageSize;
|
||||||
|
|
||||||
|
@ -599,14 +599,15 @@ class PageRepo extends EntityRepo
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a suitable slug for the resource
|
* Gets a suitable slug for the resource
|
||||||
* @param $name
|
* @param string $name
|
||||||
* @param $bookId
|
* @param int $bookId
|
||||||
* @param bool|false $currentId
|
* @param bool|false $currentId
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function findSuitableSlug($name, $bookId, $currentId = false)
|
public function findSuitableSlug($name, $bookId, $currentId = false)
|
||||||
{
|
{
|
||||||
$slug = Str::slug($name);
|
$slug = Str::slug($name);
|
||||||
|
if ($slug === "") $slug = substr(md5(rand(1, 500)), 0, 5);
|
||||||
while ($this->doesSlugExist($slug, $bookId, $currentId)) {
|
while ($this->doesSlugExist($slug, $bookId, $currentId)) {
|
||||||
$slug .= '-' . substr(md5(rand(1, 500)), 0, 3);
|
$slug .= '-' . substr(md5(rand(1, 500)), 0, 3);
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ class ImageService
|
|||||||
$this->storageUrl = $storageUrl;
|
$this->storageUrl = $storageUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($this->storageUrl == false ? '' : rtrim($this->storageUrl, '/')) . $filePath;
|
return ($this->storageUrl == false ? rtrim(baseUrl(''), '/') : rtrim($this->storageUrl, '/')) . $filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,20 +113,20 @@ class SocialAuthService
|
|||||||
if ($isLoggedIn && $socialAccount === null) {
|
if ($isLoggedIn && $socialAccount === null) {
|
||||||
$this->fillSocialAccount($socialDriver, $socialUser);
|
$this->fillSocialAccount($socialDriver, $socialUser);
|
||||||
$currentUser->socialAccounts()->save($this->socialAccount);
|
$currentUser->socialAccounts()->save($this->socialAccount);
|
||||||
\Session::flash('success', title_case($socialDriver) . ' account was successfully attached to your profile.');
|
session()->flash('success', title_case($socialDriver) . ' account was successfully attached to your profile.');
|
||||||
return redirect($currentUser->getEditUrl());
|
return redirect($currentUser->getEditUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
// When a user is logged in and the social account exists and is already linked to the current user.
|
// When a user is logged in and the social account exists and is already linked to the current user.
|
||||||
if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id === $currentUser->id) {
|
if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id === $currentUser->id) {
|
||||||
\Session::flash('error', 'This ' . title_case($socialDriver) . ' account is already attached to your profile.');
|
session()->flash('error', 'This ' . title_case($socialDriver) . ' account is already attached to your profile.');
|
||||||
return redirect($currentUser->getEditUrl());
|
return redirect($currentUser->getEditUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
// When a user is logged in, A social account exists but the users do not match.
|
// When a user is logged in, A social account exists but the users do not match.
|
||||||
// Change the user that the social account is assigned to.
|
// Change the user that the social account is assigned to.
|
||||||
if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id != $currentUser->id) {
|
if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id != $currentUser->id) {
|
||||||
\Session::flash('success', 'This ' . title_case($socialDriver) . ' account is already used by another user.');
|
session()->flash('success', 'This ' . title_case($socialDriver) . ' account is already used by another user.');
|
||||||
return redirect($currentUser->getEditUrl());
|
return redirect($currentUser->getEditUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,6 +135,7 @@ class SocialAuthService
|
|||||||
if (setting('registration-enabled')) {
|
if (setting('registration-enabled')) {
|
||||||
$message .= ' or, If you do not yet have an account, You can register an account using the ' . $socialDriver . ' option';
|
$message .= ' or, If you do not yet have an account, You can register an account using the ' . $socialDriver . ' option';
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new SocialSignInException($message . '.', '/login');
|
throw new SocialSignInException($message . '.', '/login');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
app/User.php
15
app/User.php
@ -138,8 +138,8 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||||||
*/
|
*/
|
||||||
public function getAvatar($size = 50)
|
public function getAvatar($size = 50)
|
||||||
{
|
{
|
||||||
if ($this->image_id === 0 || $this->image_id === '0' || $this->image_id === null) return '/user_avatar.png';
|
if ($this->image_id === 0 || $this->image_id === '0' || $this->image_id === null) return baseUrl('/user_avatar.png');
|
||||||
return $this->avatar->getThumb($size, $size, false);
|
return baseUrl($this->avatar->getThumb($size, $size, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -157,7 +157,16 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||||||
*/
|
*/
|
||||||
public function getEditUrl()
|
public function getEditUrl()
|
||||||
{
|
{
|
||||||
return '/settings/users/' . $this->id;
|
return baseUrl('/settings/users/' . $this->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the url that links to this user's profile.
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getProfileUrl()
|
||||||
|
{
|
||||||
|
return baseUrl('/user/' . $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,11 +20,11 @@ if (!function_exists('versioned_asset')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($manifest[$file])) {
|
if (isset($manifest[$file])) {
|
||||||
return '/' . $manifest[$file];
|
return baseUrl($manifest[$file]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(public_path($file))) {
|
if (file_exists(public_path($file))) {
|
||||||
return '/' . $file;
|
return baseUrl($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
|
throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
|
||||||
@ -62,6 +62,40 @@ function setting($key, $default = false)
|
|||||||
return $settingService->get($key, $default);
|
return $settingService->get($key, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper to create url's relative to the applications root path.
|
||||||
|
* @param $path
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function baseUrl($path)
|
||||||
|
{
|
||||||
|
if (strpos($path, 'http') === 0) return $path;
|
||||||
|
$path = trim($path, '/');
|
||||||
|
return rtrim(config('app.url'), '/') . '/' . $path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get an instance of the redirector.
|
||||||
|
* Overrides the default laravel redirect helper.
|
||||||
|
* Ensures it redirects even when the app is in a subdirectory.
|
||||||
|
*
|
||||||
|
* @param string|null $to
|
||||||
|
* @param int $status
|
||||||
|
* @param array $headers
|
||||||
|
* @param bool $secure
|
||||||
|
* @return \Illuminate\Routing\Redirector|\Illuminate\Http\RedirectResponse
|
||||||
|
*/
|
||||||
|
function redirect($to = null, $status = 302, $headers = [], $secure = null)
|
||||||
|
{
|
||||||
|
if (is_null($to)) {
|
||||||
|
return app('redirect');
|
||||||
|
}
|
||||||
|
|
||||||
|
$to = baseUrl($to);
|
||||||
|
|
||||||
|
return app('redirect')->to($to, $status, $headers, $secure);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a url with multiple parameters for sorting purposes.
|
* Generate a url with multiple parameters for sorting purposes.
|
||||||
* Works out the logic to set the correct sorting direction
|
* Works out the logic to set the correct sorting direction
|
||||||
@ -91,5 +125,5 @@ function sortUrl($path, $data, $overrideData = [])
|
|||||||
|
|
||||||
if (count($queryStringSections) === 0) return $path;
|
if (count($queryStringSections) === 0) return $path;
|
||||||
|
|
||||||
return $path . '?' . implode('&', $queryStringSections);
|
return baseUrl($path . '?' . implode('&', $queryStringSections));
|
||||||
}
|
}
|
@ -14,6 +14,7 @@ define('LARAVEL_START', microtime(true));
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/../app/helpers.php';
|
||||||
require __DIR__.'/../vendor/autoload.php';
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -29,10 +29,7 @@
|
|||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"BookStack\\": "app/"
|
"BookStack\\": "app/"
|
||||||
},
|
}
|
||||||
"files": [
|
|
||||||
"app/helpers.php"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
|
@ -31,7 +31,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', '') === 'http://bookstack.dev' ? '' : env('APP_URL', ''),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -130,7 +130,6 @@ return [
|
|||||||
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||||
Illuminate\Hashing\HashServiceProvider::class,
|
Illuminate\Hashing\HashServiceProvider::class,
|
||||||
Illuminate\Mail\MailServiceProvider::class,
|
Illuminate\Mail\MailServiceProvider::class,
|
||||||
Illuminate\Pagination\PaginationServiceProvider::class,
|
|
||||||
Illuminate\Pipeline\PipelineServiceProvider::class,
|
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||||
Illuminate\Queue\QueueServiceProvider::class,
|
Illuminate\Queue\QueueServiceProvider::class,
|
||||||
Illuminate\Redis\RedisServiceProvider::class,
|
Illuminate\Redis\RedisServiceProvider::class,
|
||||||
@ -153,6 +152,8 @@ return [
|
|||||||
/*
|
/*
|
||||||
* Application Service Providers...
|
* Application Service Providers...
|
||||||
*/
|
*/
|
||||||
|
BookStack\Providers\PaginationServiceProvider::class,
|
||||||
|
|
||||||
BookStack\Providers\AuthServiceProvider::class,
|
BookStack\Providers\AuthServiceProvider::class,
|
||||||
BookStack\Providers\AppServiceProvider::class,
|
BookStack\Providers\AppServiceProvider::class,
|
||||||
BookStack\Providers\EventServiceProvider::class,
|
BookStack\Providers\EventServiceProvider::class,
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
'app-name' => 'BookStack',
|
||||||
'app-editor' => 'wysiwyg',
|
'app-editor' => 'wysiwyg',
|
||||||
'app-color' => '#0288D1',
|
'app-color' => '#0288D1',
|
||||||
'app-color-light' => 'rgba(21, 101, 192, 0.15)'
|
'app-color-light' => 'rgba(21, 101, 192, 0.15)'
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
"babel-runtime": "^5.8.29",
|
"babel-runtime": "^5.8.29",
|
||||||
"bootstrap-sass": "^3.0.0",
|
"bootstrap-sass": "^3.0.0",
|
||||||
"dropzone": "^4.0.1",
|
"dropzone": "^4.0.1",
|
||||||
"laravel-elixir": "^3.4.0",
|
"laravel-elixir": "^5.0.0",
|
||||||
"marked": "^0.3.5",
|
"marked": "^0.3.5",
|
||||||
"moment": "^2.12.0",
|
"moment": "^2.12.0",
|
||||||
"zeroclipboard": "^2.2.0"
|
"zeroclipboard": "^2.2.0"
|
||||||
|
@ -50,3 +50,4 @@ These are the great projects used to help build BookStack:
|
|||||||
* [ZeroClipboard](http://zeroclipboard.org/)
|
* [ZeroClipboard](http://zeroclipboard.org/)
|
||||||
* [TinyColorPicker](http://www.dematte.at/tinyColorPicker/index.html)
|
* [TinyColorPicker](http://www.dematte.at/tinyColorPicker/index.html)
|
||||||
* [Marked](https://github.com/chjj/marked)
|
* [Marked](https://github.com/chjj/marked)
|
||||||
|
* [Moment.js](http://momentjs.com/)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var moment = require('moment');
|
const moment = require('moment');
|
||||||
|
|
||||||
module.exports = function (ngApp, events) {
|
module.exports = function (ngApp, events) {
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ module.exports = function (ngApp, events) {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
$scope.getUploadUrl = function () {
|
$scope.getUploadUrl = function () {
|
||||||
return '/images/' + $scope.imageType + '/upload';
|
return window.baseUrl('/images/' + $scope.imageType + '/upload');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -133,7 +133,7 @@ module.exports = function (ngApp, events) {
|
|||||||
$scope.showing = false;
|
$scope.showing = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
var baseUrl = '/images/' + $scope.imageType + '/all/'
|
var baseUrl = window.baseUrl('/images/' + $scope.imageType + '/all/');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the list image data from the server.
|
* Fetch the list image data from the server.
|
||||||
@ -178,7 +178,7 @@ module.exports = function (ngApp, events) {
|
|||||||
$scope.images = [];
|
$scope.images = [];
|
||||||
$scope.hasMore = false;
|
$scope.hasMore = false;
|
||||||
page = 0;
|
page = 0;
|
||||||
baseUrl = '/images/' + $scope.imageType + '/search/';
|
baseUrl = window.baseUrl('/images/' + $scope.imageType + '/search/');
|
||||||
fetchData();
|
fetchData();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ module.exports = function (ngApp, events) {
|
|||||||
$scope.hasMore = false;
|
$scope.hasMore = false;
|
||||||
page = 0;
|
page = 0;
|
||||||
$scope.view = viewName;
|
$scope.view = viewName;
|
||||||
baseUrl = '/images/' + $scope.imageType + '/' + viewName + '/';
|
baseUrl = window.baseUrl('/images/' + $scope.imageType + '/' + viewName + '/');
|
||||||
fetchData();
|
fetchData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ module.exports = function (ngApp, events) {
|
|||||||
*/
|
*/
|
||||||
$scope.saveImageDetails = function (event) {
|
$scope.saveImageDetails = function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var url = '/images/update/' + $scope.selectedImage.id;
|
var url = window.baseUrl('/images/update/' + $scope.selectedImage.id);
|
||||||
$http.put(url, this.selectedImage).then((response) => {
|
$http.put(url, this.selectedImage).then((response) => {
|
||||||
events.emit('success', 'Image details updated');
|
events.emit('success', 'Image details updated');
|
||||||
}, (response) => {
|
}, (response) => {
|
||||||
@ -228,7 +228,7 @@ module.exports = function (ngApp, events) {
|
|||||||
$scope.deleteImage = function (event) {
|
$scope.deleteImage = function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var force = $scope.dependantPages !== false;
|
var force = $scope.dependantPages !== false;
|
||||||
var url = '/images/' + $scope.selectedImage.id;
|
var url = window.baseUrl('/images/' + $scope.selectedImage.id);
|
||||||
if (force) url += '?force=true';
|
if (force) url += '?force=true';
|
||||||
$http.delete(url).then((response) => {
|
$http.delete(url).then((response) => {
|
||||||
$scope.images.splice($scope.images.indexOf($scope.selectedImage), 1);
|
$scope.images.splice($scope.images.indexOf($scope.selectedImage), 1);
|
||||||
@ -267,7 +267,7 @@ module.exports = function (ngApp, events) {
|
|||||||
if (term.length == 0) return;
|
if (term.length == 0) return;
|
||||||
$scope.searching = true;
|
$scope.searching = true;
|
||||||
$scope.searchResults = '';
|
$scope.searchResults = '';
|
||||||
var searchUrl = '/search/book/' + $attrs.bookId;
|
var searchUrl = window.baseUrl('/search/book/' + $attrs.bookId);
|
||||||
searchUrl += '?term=' + encodeURIComponent(term);
|
searchUrl += '?term=' + encodeURIComponent(term);
|
||||||
$http.get(searchUrl).then((response) => {
|
$http.get(searchUrl).then((response) => {
|
||||||
$scope.searchResults = $sce.trustAsHtml(response.data);
|
$scope.searchResults = $sce.trustAsHtml(response.data);
|
||||||
@ -368,7 +368,8 @@ module.exports = function (ngApp, events) {
|
|||||||
|
|
||||||
if (isMarkdown) data.markdown = $scope.editContent;
|
if (isMarkdown) data.markdown = $scope.editContent;
|
||||||
|
|
||||||
$http.put('/ajax/page/' + pageId + '/save-draft', data).then((responseData) => {
|
let url = window.baseUrl('/ajax/page/' + pageId + '/save-draft');
|
||||||
|
$http.put(url, data).then((responseData) => {
|
||||||
var updateTime = moment.utc(moment.unix(responseData.data.timestamp)).toDate();
|
var updateTime = moment.utc(moment.unix(responseData.data.timestamp)).toDate();
|
||||||
$scope.draftText = responseData.data.message + moment(updateTime).format('HH:mm');
|
$scope.draftText = responseData.data.message + moment(updateTime).format('HH:mm');
|
||||||
if (!$scope.isNewPageDraft) $scope.isUpdateDraft = true;
|
if (!$scope.isNewPageDraft) $scope.isUpdateDraft = true;
|
||||||
@ -393,7 +394,8 @@ module.exports = function (ngApp, events) {
|
|||||||
* content from the system via an AJAX request.
|
* content from the system via an AJAX request.
|
||||||
*/
|
*/
|
||||||
$scope.discardDraft = function () {
|
$scope.discardDraft = function () {
|
||||||
$http.get('/ajax/page/' + pageId).then((responseData) => {
|
let url = window.baseUrl('/ajax/page/' + pageId);
|
||||||
|
$http.get(url).then((responseData) => {
|
||||||
if (autoSave) $interval.cancel(autoSave);
|
if (autoSave) $interval.cancel(autoSave);
|
||||||
$scope.draftText = 'Editing Page';
|
$scope.draftText = 'Editing Page';
|
||||||
$scope.isUpdateDraft = false;
|
$scope.isUpdateDraft = false;
|
||||||
@ -437,7 +439,8 @@ module.exports = function (ngApp, events) {
|
|||||||
* Get all tags for the current book and add into scope.
|
* Get all tags for the current book and add into scope.
|
||||||
*/
|
*/
|
||||||
function getTags() {
|
function getTags() {
|
||||||
$http.get('/ajax/tags/get/page/' + pageId).then((responseData) => {
|
let url = window.baseUrl('/ajax/tags/get/page/' + pageId);
|
||||||
|
$http.get(url).then((responseData) => {
|
||||||
$scope.tags = responseData.data;
|
$scope.tags = responseData.data;
|
||||||
addEmptyTag();
|
addEmptyTag();
|
||||||
});
|
});
|
||||||
@ -486,7 +489,8 @@ module.exports = function (ngApp, events) {
|
|||||||
$scope.saveTags = function() {
|
$scope.saveTags = function() {
|
||||||
setTagOrder();
|
setTagOrder();
|
||||||
let postData = {tags: $scope.tags};
|
let postData = {tags: $scope.tags};
|
||||||
$http.post('/ajax/tags/update/page/' + pageId, postData).then((responseData) => {
|
let url = window.baseUrl('/ajax/tags/update/page/' + pageId);
|
||||||
|
$http.post(url, postData).then((responseData) => {
|
||||||
$scope.tags = responseData.data.tags;
|
$scope.tags = responseData.data.tags;
|
||||||
addEmptyTag();
|
addEmptyTag();
|
||||||
events.emit('success', responseData.data.message);
|
events.emit('success', responseData.data.message);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
var DropZone = require('dropzone');
|
const DropZone = require('dropzone');
|
||||||
var markdown = require('marked');
|
const markdown = require('marked');
|
||||||
|
|
||||||
var toggleSwitchTemplate = require('./components/toggle-switch.html');
|
const toggleSwitchTemplate = require('./components/toggle-switch.html');
|
||||||
var imagePickerTemplate = require('./components/image-picker.html');
|
const imagePickerTemplate = require('./components/image-picker.html');
|
||||||
var dropZoneTemplate = require('./components/drop-zone.html');
|
const dropZoneTemplate = require('./components/drop-zone.html');
|
||||||
|
|
||||||
module.exports = function (ngApp, events) {
|
module.exports = function (ngApp, events) {
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ module.exports = function (ngApp, events) {
|
|||||||
imageClass: '@'
|
imageClass: '@'
|
||||||
},
|
},
|
||||||
link: function (scope, element, attrs) {
|
link: function (scope, element, attrs) {
|
||||||
var usingIds = typeof scope.currentId !== 'undefined' || scope.currentId === 'false';
|
let usingIds = typeof scope.currentId !== 'undefined' || scope.currentId === 'false';
|
||||||
scope.image = scope.currentImage;
|
scope.image = scope.currentImage;
|
||||||
scope.value = scope.currentImage || '';
|
scope.value = scope.currentImage || '';
|
||||||
if (usingIds) scope.value = scope.currentId;
|
if (usingIds) scope.value = scope.currentId;
|
||||||
@ -80,7 +80,7 @@ module.exports = function (ngApp, events) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
scope.updateImageFromModel = function (model) {
|
scope.updateImageFromModel = function (model) {
|
||||||
var isResized = scope.resizeWidth && scope.resizeHeight;
|
let isResized = scope.resizeWidth && scope.resizeHeight;
|
||||||
|
|
||||||
if (!isResized) {
|
if (!isResized) {
|
||||||
scope.$apply(() => {
|
scope.$apply(() => {
|
||||||
@ -89,8 +89,9 @@ module.exports = function (ngApp, events) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var cropped = scope.resizeCrop ? 'true' : 'false';
|
let cropped = scope.resizeCrop ? 'true' : 'false';
|
||||||
var requestString = '/images/thumb/' + model.id + '/' + scope.resizeWidth + '/' + scope.resizeHeight + '/' + cropped;
|
let requestString = '/images/thumb/' + model.id + '/' + scope.resizeWidth + '/' + scope.resizeHeight + '/' + cropped;
|
||||||
|
requestString = window.baseUrl(requestString);
|
||||||
$http.get(requestString).then((response) => {
|
$http.get(requestString).then((response) => {
|
||||||
setImage(model, response.data.url);
|
setImage(model, response.data.url);
|
||||||
});
|
});
|
||||||
@ -265,11 +266,14 @@ module.exports = function (ngApp, events) {
|
|||||||
link: function (scope, element, attrs) {
|
link: function (scope, element, attrs) {
|
||||||
|
|
||||||
// Set initial model content
|
// Set initial model content
|
||||||
var content = element.val();
|
element = element.find('textarea').first();
|
||||||
|
let content = element.val();
|
||||||
scope.mdModel = content;
|
scope.mdModel = content;
|
||||||
scope.mdChange(markdown(content));
|
scope.mdChange(markdown(content));
|
||||||
|
|
||||||
element.on('change input', (e) => {
|
console.log('test');
|
||||||
|
|
||||||
|
element.on('change input', (event) => {
|
||||||
content = element.val();
|
content = element.val();
|
||||||
$timeout(() => {
|
$timeout(() => {
|
||||||
scope.mdModel = content;
|
scope.mdModel = content;
|
||||||
@ -297,7 +301,7 @@ module.exports = function (ngApp, events) {
|
|||||||
link: function (scope, element, attrs) {
|
link: function (scope, element, attrs) {
|
||||||
|
|
||||||
// Elements
|
// Elements
|
||||||
const input = element.find('textarea[markdown-input]');
|
const input = element.find('[markdown-input] textarea').first();
|
||||||
const display = element.find('.markdown-display').first();
|
const display = element.find('.markdown-display').first();
|
||||||
const insertImage = element.find('button[data-action="insertImage"]');
|
const insertImage = element.find('button[data-action="insertImage"]');
|
||||||
|
|
||||||
@ -342,9 +346,9 @@ module.exports = function (ngApp, events) {
|
|||||||
// Insert image shortcut
|
// Insert image shortcut
|
||||||
if (event.which === 73 && event.ctrlKey && event.shiftKey) {
|
if (event.which === 73 && event.ctrlKey && event.shiftKey) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var caretPos = input[0].selectionStart;
|
let caretPos = input[0].selectionStart;
|
||||||
var currentContent = input.val();
|
let currentContent = input.val();
|
||||||
var mdImageText = "![](http://)";
|
const mdImageText = "![](http://)";
|
||||||
input.val(currentContent.substring(0, caretPos) + mdImageText + currentContent.substring(caretPos));
|
input.val(currentContent.substring(0, caretPos) + mdImageText + currentContent.substring(caretPos));
|
||||||
input.focus();
|
input.focus();
|
||||||
input[0].selectionStart = caretPos + ("![](".length);
|
input[0].selectionStart = caretPos + ("![](".length);
|
||||||
@ -358,9 +362,9 @@ module.exports = function (ngApp, events) {
|
|||||||
// Insert image from image manager
|
// Insert image from image manager
|
||||||
insertImage.click(event => {
|
insertImage.click(event => {
|
||||||
window.ImageManager.showExternal(image => {
|
window.ImageManager.showExternal(image => {
|
||||||
var caretPos = currentCaretPos;
|
let caretPos = currentCaretPos;
|
||||||
var currentContent = input.val();
|
let currentContent = input.val();
|
||||||
var mdImageText = "![" + image.name + "](" + image.url + ")";
|
let mdImageText = "![" + image.name + "](" + image.url + ")";
|
||||||
input.val(currentContent.substring(0, caretPos) + mdImageText + currentContent.substring(caretPos));
|
input.val(currentContent.substring(0, caretPos) + mdImageText + currentContent.substring(caretPos));
|
||||||
input.change();
|
input.change();
|
||||||
});
|
});
|
||||||
@ -634,7 +638,7 @@ module.exports = function (ngApp, events) {
|
|||||||
// Get search url with correct types
|
// Get search url with correct types
|
||||||
function getSearchUrl() {
|
function getSearchUrl() {
|
||||||
let types = (attrs.entityTypes) ? encodeURIComponent(attrs.entityTypes) : encodeURIComponent('page,book,chapter');
|
let types = (attrs.entityTypes) ? encodeURIComponent(attrs.entityTypes) : encodeURIComponent('page,book,chapter');
|
||||||
return `/ajax/search/entities?types=${types}`;
|
return window.baseUrl(`/ajax/search/entities?types=${types}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get initial contents
|
// Get initial contents
|
||||||
|
@ -7,6 +7,14 @@ var ngAnimate = require('angular-animate');
|
|||||||
var ngSanitize = require('angular-sanitize');
|
var ngSanitize = require('angular-sanitize');
|
||||||
require('angular-ui-sortable');
|
require('angular-ui-sortable');
|
||||||
|
|
||||||
|
// Url retrieval function
|
||||||
|
window.baseUrl = function(path) {
|
||||||
|
let basePath = document.querySelector('meta[name="base-url"]').getAttribute('content');
|
||||||
|
if (basePath[basePath.length-1] === '/') basePath = basePath.slice(0, basePath.length-1);
|
||||||
|
if (path[0] === '/') path = path.slice(1);
|
||||||
|
return basePath + '/' + path;
|
||||||
|
};
|
||||||
|
|
||||||
var ngApp = angular.module('bookStack', ['ngResource', 'ngAnimate', 'ngSanitize', 'ui.sortable']);
|
var ngApp = angular.module('bookStack', ['ngResource', 'ngAnimate', 'ngSanitize', 'ui.sortable']);
|
||||||
|
|
||||||
// Global Event System
|
// Global Event System
|
||||||
@ -33,6 +41,7 @@ class Events {
|
|||||||
};
|
};
|
||||||
window.Events = new Events();
|
window.Events = new Events();
|
||||||
|
|
||||||
|
|
||||||
var services = require('./services')(ngApp, Events);
|
var services = require('./services')(ngApp, Events);
|
||||||
var directives = require('./directives')(ngApp, Events);
|
var directives = require('./directives')(ngApp, Events);
|
||||||
var controllers = require('./controllers')(ngApp, Events);
|
var controllers = require('./controllers')(ngApp, Events);
|
||||||
|
@ -26,7 +26,7 @@ function editorPaste(e) {
|
|||||||
formData.append('file', file, remoteFilename);
|
formData.append('file', file, remoteFilename);
|
||||||
formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content'));
|
formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content'));
|
||||||
|
|
||||||
xhr.open('POST', '/images/gallery/upload');
|
xhr.open('POST', window.baseUrl('/images/gallery/upload'));
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
if (xhr.status === 200 || xhr.status === 201) {
|
if (xhr.status === 200 || xhr.status === 201) {
|
||||||
var result = JSON.parse(xhr.responseText);
|
var result = JSON.parse(xhr.responseText);
|
||||||
@ -58,8 +58,8 @@ function registerEditorShortcuts(editor) {
|
|||||||
var mceOptions = module.exports = {
|
var mceOptions = module.exports = {
|
||||||
selector: '#html-editor',
|
selector: '#html-editor',
|
||||||
content_css: [
|
content_css: [
|
||||||
'/css/styles.css',
|
window.baseUrl('/css/styles.css'),
|
||||||
'/libs/material-design-iconic-font/css/material-design-iconic-font.min.css'
|
window.baseUrl('/libs/material-design-iconic-font/css/material-design-iconic-font.min.css')
|
||||||
],
|
],
|
||||||
body_class: 'page-content',
|
body_class: 'page-content',
|
||||||
relative_urls: false,
|
relative_urls: false,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Configure ZeroClipboard
|
// Configure ZeroClipboard
|
||||||
var zeroClipBoard = require('zeroclipboard');
|
var zeroClipBoard = require('zeroclipboard');
|
||||||
zeroClipBoard.config({
|
zeroClipBoard.config({
|
||||||
swfPath: '/ZeroClipboard.swf'
|
swfPath: window.baseUrl('/ZeroClipboard.swf')
|
||||||
});
|
});
|
||||||
|
|
||||||
window.setupPageShow = module.exports = function (pageId) {
|
window.setupPageShow = module.exports = function (pageId) {
|
||||||
@ -36,7 +36,8 @@ window.setupPageShow = module.exports = function (pageId) {
|
|||||||
|
|
||||||
// Show pointer and set link
|
// Show pointer and set link
|
||||||
var $elem = $(this);
|
var $elem = $(this);
|
||||||
var link = window.location.protocol + "//" + window.location.host + '/link/' + pageId + '#' + $elem.attr('id');
|
let link = window.baseUrl('/link/' + pageId + '#' + $elem.attr('id'));
|
||||||
|
if (link.indexOf('http') !== 0) link = window.location.protocol + "//" + window.location.host + link;
|
||||||
$pointer.find('input').val(link);
|
$pointer.find('input').val(link);
|
||||||
$pointer.find('button').first().attr('data-clipboard-text', link);
|
$pointer.find('button').first().attr('data-clipboard-text', link);
|
||||||
$elem.before($pointer);
|
$elem.before($pointer);
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
src: local('Roboto Thin'), local('Roboto-Thin'),
|
src: local('Roboto Thin'), local('Roboto-Thin'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-100.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-100.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-100.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-100.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-100italic - cyrillic_latin */
|
/* roboto-100italic - cyrillic_latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -15,8 +15,8 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
src: local('Roboto Thin Italic'), local('Roboto-ThinItalic'),
|
src: local('Roboto Thin Italic'), local('Roboto-ThinItalic'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-100italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-100italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-100italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-100italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-300 - cyrillic_latin */
|
/* roboto-300 - cyrillic_latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -24,8 +24,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
src: local('Roboto Light'), local('Roboto-Light'),
|
src: local('Roboto Light'), local('Roboto-Light'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-300italic - cyrillic_latin */
|
/* roboto-300italic - cyrillic_latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -33,8 +33,8 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
src: local('Roboto Light Italic'), local('Roboto-LightItalic'),
|
src: local('Roboto Light Italic'), local('Roboto-LightItalic'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-300italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-300italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-300italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-300italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-regular - cyrillic_latin */
|
/* roboto-regular - cyrillic_latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -42,8 +42,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: local('Roboto'), local('Roboto-Regular'),
|
src: local('Roboto'), local('Roboto-Regular'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-italic - cyrillic_latin */
|
/* roboto-italic - cyrillic_latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -51,8 +51,8 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: local('Roboto Italic'), local('Roboto-Italic'),
|
src: local('Roboto Italic'), local('Roboto-Italic'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-500 - cyrillic_latin */
|
/* roboto-500 - cyrillic_latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -60,8 +60,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
src: local('Roboto Medium'), local('Roboto-Medium'),
|
src: local('Roboto Medium'), local('Roboto-Medium'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-500italic - cyrillic_latin */
|
/* roboto-500italic - cyrillic_latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -69,8 +69,8 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'),
|
src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-500italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-500italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-500italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-500italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-700 - cyrillic_latin */
|
/* roboto-700 - cyrillic_latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -78,8 +78,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: local('Roboto Bold'), local('Roboto-Bold'),
|
src: local('Roboto Bold'), local('Roboto-Bold'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-700italic - cyrillic_latin */
|
/* roboto-700italic - cyrillic_latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -87,8 +87,8 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: local('Roboto Bold Italic'), local('Roboto-BoldItalic'),
|
src: local('Roboto Bold Italic'), local('Roboto-BoldItalic'),
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-v15-cyrillic_latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-v15-cyrillic_latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-v15-cyrillic_latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* roboto-mono-regular - latin */
|
/* roboto-mono-regular - latin */
|
||||||
@ -97,6 +97,6 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: local('Roboto Mono'), local('RobotoMono-Regular'),
|
src: local('Roboto Mono'), local('RobotoMono-Regular'),
|
||||||
url('/fonts/roboto-mono-v4-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
url('../fonts/roboto-mono-v4-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
|
||||||
url('/fonts/roboto-mono-v4-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('../fonts/roboto-mono-v4-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
@ -23,7 +23,7 @@ button {
|
|||||||
|
|
||||||
table {
|
table {
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
td {
|
td, th {
|
||||||
min-width: 10px;
|
min-width: 10px;
|
||||||
padding: 4px 6px;
|
padding: 4px 6px;
|
||||||
border: 1px solid #DDD;
|
border: 1px solid #DDD;
|
||||||
|
@ -158,8 +158,8 @@
|
|||||||
.tabs {
|
.tabs {
|
||||||
display: block;
|
display: block;
|
||||||
border-right: 1px solid #DDD;
|
border-right: 1px solid #DDD;
|
||||||
width: 54px;
|
width: 48px;
|
||||||
flex: 0;
|
flex: 0 1 auto;
|
||||||
}
|
}
|
||||||
.tabs i {
|
.tabs i {
|
||||||
color: rgba(0, 0, 0, 0.5);
|
color: rgba(0, 0, 0, 0.5);
|
||||||
|
@ -24,21 +24,22 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-area.flex > .mce-tinymce.mce-container.mce-panel {
|
.edit-area.flex > div > .mce-tinymce.mce-container.mce-panel {
|
||||||
height: 100%;
|
flex: 1 1 auto;
|
||||||
max-height: 100%;
|
|
||||||
flex: 1;
|
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
margin: 0 -1px;
|
margin: 0 -1px;
|
||||||
> .mce-container-body {
|
> .mce-container-body {
|
||||||
flex: 1;
|
flex: 1 1 auto;
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
|
> .mce-toolbar-grp {
|
||||||
|
flex: 0 1 auto;
|
||||||
|
}
|
||||||
> .mce-edit-area {
|
> .mce-edit-area {
|
||||||
flex: 1;
|
flex: 1 1 auto;
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">Password</label>
|
<label for="password">Password</label>
|
||||||
@include('form/password', ['name' => 'password', 'tabindex' => 2])
|
@include('form/password', ['name' => 'password', 'tabindex' => 2])
|
||||||
<span class="block small"><a href="/password/email">Forgot Password?</a></span>
|
<span class="block small"><a href="{{ baseUrl('/password/email') }}">Forgot Password?</a></span>
|
||||||
</div>
|
</div>
|
@ -1,8 +1,8 @@
|
|||||||
@extends('public')
|
@extends('public')
|
||||||
|
|
||||||
@section('header-buttons')
|
@section('header-buttons')
|
||||||
@if(Setting::get('registration-enabled'))
|
@if(setting('registration-enabled', false))
|
||||||
<a href="/register"><i class="zmdi zmdi-account-add"></i>Sign up</a>
|
<a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>Sign up</a>
|
||||||
@endif
|
@endif
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<div class="center-box">
|
<div class="center-box">
|
||||||
<h1>Log In</h1>
|
<h1>Log In</h1>
|
||||||
|
|
||||||
<form action="/login" method="POST" id="login-form">
|
<form action="{{ baseUrl("/login") }}" method="POST" id="login-form">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
|
|
||||||
|
|
||||||
@ -34,10 +34,10 @@
|
|||||||
<hr class="margin-top">
|
<hr class="margin-top">
|
||||||
<h3 class="text-muted">Social Login</h3>
|
<h3 class="text-muted">Social Login</h3>
|
||||||
@if(isset($socialDrivers['google']))
|
@if(isset($socialDrivers['google']))
|
||||||
<a href="/login/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
|
<a href="{{ baseUrl("/login/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
|
||||||
@endif
|
@endif
|
||||||
@if(isset($socialDrivers['github']))
|
@if(isset($socialDrivers['github']))
|
||||||
<a href="/login/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a>
|
<a href="{{ baseUrl("/login/service/github") }}" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
@extends('public')
|
@extends('public')
|
||||||
|
|
||||||
@section('body-class', 'image-cover login')
|
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +9,7 @@
|
|||||||
|
|
||||||
<p class="muted small">Enter your email below and you will be sent an email with a password reset link.</p>
|
<p class="muted small">Enter your email below and you will be sent an email with a password reset link.</p>
|
||||||
|
|
||||||
<form action="/password/email" method="POST">
|
<form action="{{ baseUrl("/password/email") }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
@section('header-buttons')
|
@section('header-buttons')
|
||||||
@if(!$signedIn)
|
@if(!$signedIn)
|
||||||
<a href="/login"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
|
<a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
|
||||||
@endif
|
@endif
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="center-box">
|
<div class="center-box">
|
||||||
<h2>Thanks for registering!</h2>
|
<h2>Thanks for registering!</h2>
|
||||||
<p>Please check your email and click the confirmation button to access {{ \Setting::get('app-name') }}.</p>
|
<p>Please check your email and click the confirmation button to access {{ setting('app-name', 'BookStack') }}.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@extends('public')
|
@extends('public')
|
||||||
|
|
||||||
@section('header-buttons')
|
@section('header-buttons')
|
||||||
<a href="/login"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
|
<a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<div class="center-box">
|
<div class="center-box">
|
||||||
<h1>Sign Up</h1>
|
<h1>Sign Up</h1>
|
||||||
|
|
||||||
<form action="/register" method="POST">
|
<form action="{{ baseUrl("/register") }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -38,10 +38,10 @@
|
|||||||
<h3 class="text-muted">Social Registration</h3>
|
<h3 class="text-muted">Social Registration</h3>
|
||||||
<p class="text-small">Register and sign in using another service.</p>
|
<p class="text-small">Register and sign in using another service.</p>
|
||||||
@if(isset($socialDrivers['google']))
|
@if(isset($socialDrivers['google']))
|
||||||
<a href="/register/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
|
<a href="{{ baseUrl("/register/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
|
||||||
@endif
|
@endif
|
||||||
@if(isset($socialDrivers['github']))
|
@if(isset($socialDrivers['github']))
|
||||||
<a href="/register/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a>
|
<a href="{{ baseUrl("/register/service/github") }}" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<div class="center-box text-left">
|
<div class="center-box text-left">
|
||||||
<h1>Reset Password</h1>
|
<h1>Reset Password</h1>
|
||||||
|
|
||||||
<form action="/password/reset" method="POST">
|
<form action="{{ baseUrl("/password/reset") }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="token" value="{{ $token }}">
|
<input type="hidden" name="token" value="{{ $token }}">
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
If you cannot find the email you can re-send the confirmation email by submitting the form below.
|
If you cannot find the email you can re-send the confirmation email by submitting the form below.
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<form action="/register/confirm/resend" method="POST">
|
<form action="{{ baseUrl("/register/confirm/resend") }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email">Email Address</label>
|
<label for="email">Email Address</label>
|
||||||
|
@ -1,21 +1,22 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="@yield('body-class')">
|
<html class="@yield('body-class')">
|
||||||
<head>
|
<head>
|
||||||
<title>{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name', 'BookStack') }}</title>
|
<title>{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name') }}</title>
|
||||||
|
|
||||||
<!-- Meta -->
|
<!-- Meta -->
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<meta name="token" content="{{ csrf_token() }}">
|
<meta name="token" content="{{ csrf_token() }}">
|
||||||
|
<meta name="base-url" content="{{ baseUrl('/') }}">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<!-- Styles and Fonts -->
|
<!-- Styles and Fonts -->
|
||||||
<link rel="stylesheet" href="{{ versioned_asset('css/styles.css') }}">
|
<link rel="stylesheet" href="{{ versioned_asset('css/styles.css') }}">
|
||||||
<link rel="stylesheet" media="print" href="{{ versioned_asset('css/print-styles.css') }}">
|
<link rel="stylesheet" media="print" href="{{ versioned_asset('css/print-styles.css') }}">
|
||||||
<link rel="stylesheet" href="/libs/material-design-iconic-font/css/material-design-iconic-font.min.css">
|
<link rel="stylesheet" href="{{ baseUrl('/libs/material-design-iconic-font/css/material-design-iconic-font.min.css') }}">
|
||||||
|
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
<script src="/libs/jquery/jquery.min.js?version=2.1.4"></script>
|
<script src="{{ baseUrl('/libs/jquery/jquery.min.js?version=2.1.4') }}"></script>
|
||||||
<script src="/libs/jquery/jquery-ui.min.js?version=1.11.4"></script>
|
<script src="{{ baseUrl('/libs/jquery/jquery-ui.min.js?version=1.11.4') }}"></script>
|
||||||
|
|
||||||
@yield('head')
|
@yield('head')
|
||||||
|
|
||||||
@ -34,15 +35,15 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-4 col-sm-4" ng-non-bindable>
|
<div class="col-lg-4 col-sm-4" ng-non-bindable>
|
||||||
<a href="/" class="logo">
|
<a href="{{ baseUrl('/') }}" class="logo">
|
||||||
@if(setting('app-logo', '') !== 'none')
|
@if(setting('app-logo', '') !== 'none')
|
||||||
<img class="logo-image" src="{{ setting('app-logo', '') === '' ? '/logo.png' : setting('app-logo', '') }}" alt="Logo">
|
<img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo">
|
||||||
@endif
|
@endif
|
||||||
<span class="logo-text">{{ setting('app-name', 'BookStack') }}</span>
|
<span class="logo-text">{{ setting('app-name') }}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4 col-sm-3 text-center">
|
<div class="col-lg-4 col-sm-3 text-center">
|
||||||
<form action="/search/all" method="GET" class="search-box">
|
<form action="{{ baseUrl('/search/all') }}" method="GET" class="search-box">
|
||||||
<input id="header-search-box-input" type="text" name="term" tabindex="2" value="{{ isset($searchTerm) ? $searchTerm : '' }}">
|
<input id="header-search-box-input" type="text" name="term" tabindex="2" value="{{ isset($searchTerm) ? $searchTerm : '' }}">
|
||||||
<button id="header-search-box-button" type="submit" class="text-button"><i class="zmdi zmdi-search"></i></button>
|
<button id="header-search-box-button" type="submit" class="text-button"><i class="zmdi zmdi-search"></i></button>
|
||||||
</form>
|
</form>
|
||||||
@ -50,12 +51,12 @@
|
|||||||
<div class="col-lg-4 col-sm-5">
|
<div class="col-lg-4 col-sm-5">
|
||||||
<div class="float right">
|
<div class="float right">
|
||||||
<div class="links text-center">
|
<div class="links text-center">
|
||||||
<a href="/books"><i class="zmdi zmdi-book"></i>Books</a>
|
<a href="{{ baseUrl('/books') }}"><i class="zmdi zmdi-book"></i>Books</a>
|
||||||
@if(isset($currentUser) && userCan('settings-manage'))
|
@if(isset($currentUser) && userCan('settings-manage'))
|
||||||
<a href="/settings"><i class="zmdi zmdi-settings"></i>Settings</a>
|
<a href="{{ baseUrl('/settings') }}"><i class="zmdi zmdi-settings"></i>Settings</a>
|
||||||
@endif
|
@endif
|
||||||
@if(!isset($signedIn) || !$signedIn)
|
@if(!isset($signedIn) || !$signedIn)
|
||||||
<a href="/login"><i class="zmdi zmdi-sign-in"></i>Sign In</a>
|
<a href="{{ baseUrl('/login') }}"><i class="zmdi zmdi-sign-in"></i>Sign In</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@if(isset($signedIn) && $signedIn)
|
@if(isset($signedIn) && $signedIn)
|
||||||
@ -66,13 +67,13 @@
|
|||||||
</span>
|
</span>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="/user/{{$currentUser->id}}" class="text-primary"><i class="zmdi zmdi-account zmdi-hc-fw zmdi-hc-lg"></i>View Profile</a>
|
<a href="{{ baseUrl("/user/{$currentUser->id}") }}" class="text-primary"><i class="zmdi zmdi-account zmdi-hc-fw zmdi-hc-lg"></i>View Profile</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/settings/users/{{$currentUser->id}}" class="text-primary"><i class="zmdi zmdi-edit zmdi-hc-fw zmdi-hc-lg"></i>Edit Profile</a>
|
<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>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/logout" class="text-neg"><i class="zmdi zmdi-run zmdi-hc-fw zmdi-hc-lg"></i>Logout</a>
|
<a href="{{ baseUrl('/logout') }}" class="text-neg"><i class="zmdi zmdi-run zmdi-hc-fw zmdi-hc-lg"></i>Logout</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div class="container small" ng-non-bindable>
|
<div class="container small" ng-non-bindable>
|
||||||
<h1>Create New Book</h1>
|
<h1>Create New Book</h1>
|
||||||
<form action="/books" method="POST">
|
<form action="{{ baseUrl("/books") }}" method="POST">
|
||||||
@include('books/form')
|
@include('books/form')
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div class="container small" ng-non-bindable>
|
<div class="container small" ng-non-bindable>
|
||||||
<h1>Edit Book</h1>
|
<h1>Edit Book</h1>
|
||||||
<form action="/books/{{$book->slug}}" method="POST">
|
<form action="{{ $book->getUrl() }}" method="POST">
|
||||||
<input type="hidden" name="_method" value="PUT">
|
<input type="hidden" name="_method" value="PUT">
|
||||||
@include('books/form', ['model' => $book])
|
@include('books/form', ['model' => $book])
|
||||||
</form>
|
</form>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<div class="col-xs-11 faded">
|
<div class="col-xs-11 faded">
|
||||||
<div class="action-buttons">
|
<div class="action-buttons">
|
||||||
@if($currentUser->can('book-create-all'))
|
@if($currentUser->can('book-create-all'))
|
||||||
<a href="/books/create" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>Add new book</a>
|
<a href="{{ baseUrl("/books/create") }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>Add new book</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
@else
|
@else
|
||||||
<p class="text-muted">No books have been created.</p>
|
<p class="text-muted">No books have been created.</p>
|
||||||
@if(userCan('books-create-all'))
|
@if(userCan('books-create-all'))
|
||||||
<a href="/books/create" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a>
|
<a href="{{ baseUrl("/books/create") }}" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="action-buttons faded">
|
<div class="action-buttons faded">
|
||||||
@if(userCan('page-create', $book))
|
@if(userCan('page-create', $book))
|
||||||
<a href="{{$book->getUrl() . '/page/create'}}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Page</a>
|
<a href="{{ $book->getUrl('/page/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Page</a>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('chapter-create', $book))
|
@if(userCan('chapter-create', $book))
|
||||||
<a href="{{$book->getUrl() . '/chapter/create'}}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Chapter</a>
|
<a href="{{ $book->getUrl('/chapter/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Chapter</a>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('book-update', $book))
|
@if(userCan('book-update', $book))
|
||||||
<a href="{{$book->getEditUrl()}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a>
|
<a href="{{$book->getEditUrl()}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a>
|
||||||
@ -21,13 +21,13 @@
|
|||||||
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
|
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
|
||||||
<ul>
|
<ul>
|
||||||
@if(userCan('book-update', $book))
|
@if(userCan('book-update', $book))
|
||||||
<li><a href="{{ $book->getUrl() }}/sort" class="text-primary"><i class="zmdi zmdi-sort"></i>Sort</a></li>
|
<li><a href="{{ $book->getUrl('/sort') }}" class="text-primary"><i class="zmdi zmdi-sort"></i>Sort</a></li>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('restrictions-manage', $book))
|
@if(userCan('restrictions-manage', $book))
|
||||||
<li><a href="{{$book->getUrl()}}/permissions" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li>
|
<li><a href="{{ $book->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('book-delete', $book))
|
@if(userCan('book-delete', $book))
|
||||||
<li><a href="{{ $book->getUrl() }}/delete" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li>
|
<li><a href="{{ $book->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li>
|
||||||
@endif
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -61,16 +61,16 @@
|
|||||||
@else
|
@else
|
||||||
<p class="text-muted">No pages or chapters have been created for this book.</p>
|
<p class="text-muted">No pages or chapters have been created for this book.</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="{{$book->getUrl() . '/page/create'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
|
<a href="{{ $book->getUrl('/page/create') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
|
||||||
<em class="text-muted">-or-</em>
|
<em class="text-muted">-or-</em>
|
||||||
<a href="{{$book->getUrl() . '/chapter/create'}}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>Add a chapter</a>
|
<a href="{{ $book->getUrl('/chapter/create') }}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>Add a chapter</a>
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
@endif
|
@endif
|
||||||
<p class="text-muted small">
|
<p class="text-muted small">
|
||||||
Created {{$book->created_at->diffForHumans()}} @if($book->createdBy) by <a href="/user/{{ $book->createdBy->id }}">{{$book->createdBy->name}}</a> @endif
|
Created {{$book->created_at->diffForHumans()}} @if($book->createdBy) by <a href="{{ $book->createdBy->getProfileUrl() }}">{{$book->createdBy->name}}</a> @endif
|
||||||
<br>
|
<br>
|
||||||
Last Updated {{$book->updated_at->diffForHumans()}} @if($book->updatedBy) by <a href="/user/{{ $book->updatedBy->id }}">{{$book->updatedBy->name}}</a> @endif
|
Last Updated {{$book->updated_at->diffForHumans()}} @if($book->updatedBy) by <a href="{{ $book->updatedBy->getProfileUrl() }}">{{$book->updatedBy->name}}</a> @endif
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -90,7 +90,7 @@
|
|||||||
@if($book->restricted)
|
@if($book->restricted)
|
||||||
<p class="text-muted">
|
<p class="text-muted">
|
||||||
@if(userCan('restrictions-manage', $book))
|
@if(userCan('restrictions-manage', $book))
|
||||||
<a href="{{ $book->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a>
|
<a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a>
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>Book Permissions Active
|
<i class="zmdi zmdi-lock-outline"></i>Book Permissions Active
|
||||||
@endif
|
@endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@extends('base')
|
@extends('base')
|
||||||
|
|
||||||
@section('head')
|
@section('head')
|
||||||
<script src="/libs/jquery-sortable/jquery-sortable.min.js"></script>
|
<script src="{{ baseUrl("/libs/jquery-sortable/jquery-sortable.min.js") }}"></script>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@ -22,7 +22,7 @@
|
|||||||
@foreach($books as $otherBook)
|
@foreach($books as $otherBook)
|
||||||
@if($otherBook->id !== $book->id)
|
@if($otherBook->id !== $book->id)
|
||||||
<div>
|
<div>
|
||||||
<a href="/books/{{ $otherBook->slug }}/sort-item" class="text-book"><i class="zmdi zmdi-book"></i>{{ $otherBook->name }}</a>
|
<a href="{{ $otherBook->getUrl('/sort-item') }}" class="text-book"><i class="zmdi zmdi-book"></i>{{ $otherBook->name }}</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="{{$book->getUrl()}}/sort" method="POST">
|
<form action="{{ $book->getUrl('/sort') }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="_method" value="PUT">
|
<input type="hidden" name="_method" value="PUT">
|
||||||
<input type="hidden" id="sort-tree-input" name="sort-tree">
|
<input type="hidden" id="sort-tree-input" name="sort-tree">
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div class="container small" ng-non-bindable>
|
<div class="container small" ng-non-bindable>
|
||||||
<h1>Create New Chapter</h1>
|
<h1>Create New Chapter</h1>
|
||||||
<form action="{{$book->getUrl()}}/chapter/create" method="POST">
|
<form action="{{ $book->getUrl('/chapter/create') }}" method="POST">
|
||||||
@include('chapters/form')
|
@include('chapters/form')
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Move Chapter <small class="subheader">{{$chapter->name}}</small></h1>
|
<h1>Move Chapter <small class="subheader">{{$chapter->name}}</small></h1>
|
||||||
|
|
||||||
<form action="{{ $chapter->getUrl() }}/move" method="POST">
|
<form action="{{ $chapter->getUrl('/move') }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="_method" value="PUT">
|
<input type="hidden" name="_method" value="PUT">
|
||||||
|
|
||||||
|
@ -13,23 +13,23 @@
|
|||||||
<div class="col-sm-4 faded">
|
<div class="col-sm-4 faded">
|
||||||
<div class="action-buttons">
|
<div class="action-buttons">
|
||||||
@if(userCan('page-create', $chapter))
|
@if(userCan('page-create', $chapter))
|
||||||
<a href="{{$chapter->getUrl() . '/create-page'}}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>New Page</a>
|
<a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>New Page</a>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('chapter-update', $chapter))
|
@if(userCan('chapter-update', $chapter))
|
||||||
<a href="{{$chapter->getUrl() . '/edit'}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a>
|
<a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
|
@if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
|
||||||
<div dropdown class="dropdown-container">
|
<div dropdown class="dropdown-container">
|
||||||
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
|
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
|
||||||
<ul>
|
<ul>
|
||||||
@if(userCan('chapter-update', $chapter))
|
@if(userCan('chapter-update', $chapter))
|
||||||
<li><a href="{{$chapter->getUrl() . '/move'}}" class="text-primary"><i class="zmdi zmdi-folder"></i>Move</a></li>
|
<li><a href="{{ $chapter->getUrl('/move') }}" class="text-primary"><i class="zmdi zmdi-folder"></i>Move</a></li>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('restrictions-manage', $chapter))
|
@if(userCan('restrictions-manage', $chapter))
|
||||||
<li><a href="{{$chapter->getUrl()}}/permissions" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li>
|
<li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('chapter-delete', $chapter))
|
@if(userCan('chapter-delete', $chapter))
|
||||||
<li><a href="{{$chapter->getUrl() . '/delete'}}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li>
|
<li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li>
|
||||||
@endif
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -60,22 +60,22 @@
|
|||||||
<p class="text-muted">No pages are currently in this chapter.</p>
|
<p class="text-muted">No pages are currently in this chapter.</p>
|
||||||
<p>
|
<p>
|
||||||
@if(userCan('page-create', $chapter))
|
@if(userCan('page-create', $chapter))
|
||||||
<a href="{{$chapter->getUrl() . '/create-page'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
|
<a href="{{ $chapter->getUrl('/create-page') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('page-create', $chapter) && userCan('book-update', $book))
|
@if(userCan('page-create', $chapter) && userCan('book-update', $book))
|
||||||
<em class="text-muted">-or-</em>
|
<em class="text-muted">-or-</em>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('book-update', $book))
|
@if(userCan('book-update', $book))
|
||||||
<a href="{{$book->getUrl() . '/sort'}}" class="text-book"><i class="zmdi zmdi-book"></i>Sort the current book</a>
|
<a href="{{ $book->getUrl('/sort') }}" class="text-book"><i class="zmdi zmdi-book"></i>Sort the current book</a>
|
||||||
@endif
|
@endif
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<p class="text-muted small">
|
<p class="text-muted small">
|
||||||
Created {{$chapter->created_at->diffForHumans()}} @if($chapter->createdBy) by <a href="/user/{{ $chapter->createdBy->id }}">{{ $chapter->createdBy->name}}</a> @endif
|
Created {{ $chapter->created_at->diffForHumans() }} @if($chapter->createdBy) by <a href="{{ $chapter->createdBy->getProfileUrl() }}">{{ $chapter->createdBy->name}}</a> @endif
|
||||||
<br>
|
<br>
|
||||||
Last Updated {{$chapter->updated_at->diffForHumans()}} @if($chapter->updatedBy) by <a href="/user/{{ $chapter->updatedBy->id }}">{{ $chapter->updatedBy->name}}</a> @endif
|
Last Updated {{ $chapter->updated_at->diffForHumans() }} @if($chapter->updatedBy) by <a href="{{ $chapter->updatedBy->getProfileUrl() }}">{{ $chapter->updatedBy->name}}</a> @endif
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 col-md-offset-1">
|
<div class="col-md-3 col-md-offset-1">
|
||||||
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
@if($book->restricted)
|
@if($book->restricted)
|
||||||
@if(userCan('restrictions-manage', $book))
|
@if(userCan('restrictions-manage', $book))
|
||||||
<a href="{{ $book->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a>
|
<a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a>
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>Book Permissions Active
|
<i class="zmdi zmdi-lock-outline"></i>Book Permissions Active
|
||||||
@endif
|
@endif
|
||||||
@ -94,7 +94,7 @@
|
|||||||
|
|
||||||
@if($chapter->restricted)
|
@if($chapter->restricted)
|
||||||
@if(userCan('restrictions-manage', $chapter))
|
@if(userCan('restrictions-manage', $chapter))
|
||||||
<a href="{{ $chapter->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active</a>
|
<a href="{{ $chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active</a>
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active
|
<i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active
|
||||||
@endif
|
@endif
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
<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;">
|
"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;">
|
<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 name="viewport" content="width=device-width"
|
||||||
<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;" />
|
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>Confirm Your Email At {{ Setting::get('app-name')}}</title>
|
<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>Confirm Your Email At {{ 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;">
|
<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;
|
margin: 0;
|
||||||
@ -140,24 +144,34 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</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 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 -->
|
<!-- 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;">
|
<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;">
|
<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 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;">
|
<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 -->
|
<!-- 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;">
|
<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%;">
|
<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;">
|
<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 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;">Email Confirmation</h1>
|
<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;">
|
||||||
<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 />
|
Email Confirmation</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;">
|
||||||
|
Thanks for joining <a href="{{ baseUrl('/') }}">{{ setting('app-name')}}</a>. <br/>
|
||||||
Please confirm your email address by clicking the button below.</p>
|
Please confirm your email address by clicking the button below.</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%;">
|
<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;">
|
<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;">
|
<td class="padding"
|
||||||
<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>
|
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('/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>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -6,7 +6,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="text-muted">{{ $message or 'Page Not Found' }}</h1>
|
<h1 class="text-muted">{{ $message or 'Page Not Found' }}</h1>
|
||||||
<p>Sorry, The page you were looking for could not be found.</p>
|
<p>Sorry, The page you were looking for could not be found.</p>
|
||||||
<a href="/" class="button">Return To Home</a>
|
<a href="{{ baseUrl('/') }}" class="button">Return To Home</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@stop
|
@stop
|
@ -1,47 +1,10 @@
|
|||||||
<!DOCTYPE html>
|
@extends('public')
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Be right back.</title>
|
|
||||||
|
|
||||||
<link href="//fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
|
@section('content')
|
||||||
|
|
||||||
<style>
|
|
||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
width: 100%;
|
|
||||||
color: #B0BEC5;
|
|
||||||
display: table;
|
|
||||||
font-weight: 100;
|
|
||||||
font-family: 'Lato';
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
text-align: center;
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
text-align: center;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 72px;
|
|
||||||
margin-bottom: 40px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="content">
|
<h1 class="text-muted">{{ setting('app-name') }} is down right now</h1>
|
||||||
<div class="title">Be right back.</div>
|
<p>It will be back up soon.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</body>
|
@stop
|
||||||
</html>
|
|
@ -1,4 +1,4 @@
|
|||||||
<form action="{{ $model->getUrl() }}/permissions" method="POST">
|
<form action="{{ $model->getUrl('/permissions') }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="_method" value="PUT">
|
<input type="hidden" name="_method" value="PUT">
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<h3><a class="no-color" href="/pages/recently-created">Recently Created Pages</a></h3>
|
<h3><a class="no-color" href="{{ baseUrl("/pages/recently-created") }}">Recently Created Pages</a></h3>
|
||||||
<div id="recently-created-pages">
|
<div id="recently-created-pages">
|
||||||
@include('partials/entity-list', [
|
@include('partials/entity-list', [
|
||||||
'entities' => $recentlyCreatedPages,
|
'entities' => $recentlyCreatedPages,
|
||||||
@ -51,7 +51,7 @@
|
|||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3><a class="no-color" href="/pages/recently-updated">Recently Updated Pages</a></h3>
|
<h3><a class="no-color" href="{{ baseUrl("/pages/recently-updated") }}">Recently Updated Pages</a></h3>
|
||||||
<div id="recently-updated-pages">
|
<div id="recently-updated-pages">
|
||||||
@include('partials/entity-list', [
|
@include('partials/entity-list', [
|
||||||
'entities' => $recentlyUpdatedPages,
|
'entities' => $recentlyUpdatedPages,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@extends('base')
|
@extends('base')
|
||||||
|
|
||||||
@section('head')
|
@section('head')
|
||||||
<script src="/libs/tinymce/tinymce.min.js?ver=4.3.7"></script>
|
<script src="{{ baseUrl('/libs/tinymce/tinymce.min.js?ver=4.3.7') }}"></script>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('body-class', 'flexbox')
|
@section('body-class', 'flexbox')
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
<tbody ui-sortable="sortOptions" ng-model="tags" >
|
<tbody ui-sortable="sortOptions" ng-model="tags" >
|
||||||
<tr ng-repeat="tag in tags track by $index">
|
<tr ng-repeat="tag in tags track by $index">
|
||||||
<td width="20" ><i class="handle zmdi zmdi-menu"></i></td>
|
<td width="20" ><i class="handle zmdi zmdi-menu"></i></td>
|
||||||
<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>
|
<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>
|
||||||
<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>
|
<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>
|
||||||
<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>
|
<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>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<a ng-click="forceDraftSave()" class="text-pos"><i class="zmdi zmdi-save"></i>Save Draft</a>
|
<a ng-click="forceDraftSave()" class="text-pos"><i class="zmdi zmdi-save"></i>Save Draft</a>
|
||||||
</li>
|
</li>
|
||||||
<li ng-if="isNewPageDraft">
|
<li ng-if="isNewPageDraft">
|
||||||
<a href="{{$model->getUrl()}}/delete" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete Draft</a>
|
<a href="{{ $model->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete Draft</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a type="button" ng-if="isUpdateDraft" ng-click="discardDraft()" class="text-neg"><i class="zmdi zmdi-close-circle"></i>Discard Draft</a>
|
<a type="button" ng-if="isUpdateDraft" ng-click="discardDraft()" class="text-neg"><i class="zmdi zmdi-close-circle"></i>Discard Draft</a>
|
||||||
@ -55,8 +55,11 @@
|
|||||||
|
|
||||||
<div class="edit-area flex-fill flex">
|
<div class="edit-area flex-fill flex">
|
||||||
@if(setting('app-editor') === 'wysiwyg')
|
@if(setting('app-editor') === 'wysiwyg')
|
||||||
<textarea id="html-editor" tinymce="editorOptions" mce-change="editorChange" mce-model="editContent" name="html" rows="5"
|
<div tinymce="editorOptions" mce-change="editorChange" mce-model="editContent" class="flex-fill flex">
|
||||||
|
<textarea id="html-editor" name="html" rows="5" ng-non-bindable
|
||||||
@if($errors->has('html')) class="neg" @endif>@if(isset($model) || old('html')){{htmlspecialchars( old('html') ? old('html') : $model->html)}}@endif</textarea>
|
@if($errors->has('html')) class="neg" @endif>@if(isset($model) || old('html')){{htmlspecialchars( old('html') ? old('html') : $model->html)}}@endif</textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
@if($errors->has('html'))
|
@if($errors->has('html'))
|
||||||
<div class="text-neg text-small">{{ $errors->first('html') }}</div>
|
<div class="text-neg text-small">{{ $errors->first('html') }}</div>
|
||||||
@endif
|
@endif
|
||||||
@ -72,10 +75,14 @@
|
|||||||
<button class="text-button" type="button" data-action="insertImage"><i class="zmdi zmdi-image"></i>Insert Image</button>
|
<button class="text-button" type="button" data-action="insertImage"><i class="zmdi zmdi-image"></i>Insert Image</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<textarea markdown-input md-change="editorChange" id="markdown-editor-input" md-model="editContent" name="markdown" rows="5"
|
|
||||||
|
<div markdown-input md-change="editorChange" md-model="editContent" class="flex flex-fill">
|
||||||
|
<textarea ng-non-bindable id="markdown-editor-input" name="markdown" rows="5"
|
||||||
@if($errors->has('markdown')) class="neg" @endif>@if(isset($model) || old('markdown')){{htmlspecialchars( old('markdown') ? old('markdown') : ($model->markdown === '' ? $model->html : $model->markdown))}}@endif</textarea>
|
@if($errors->has('markdown')) class="neg" @endif>@if(isset($model) || old('markdown')){{htmlspecialchars( old('markdown') ? old('markdown') : ($model->markdown === '' ? $model->html : $model->markdown))}}@endif</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="markdown-editor-wrap">
|
<div class="markdown-editor-wrap">
|
||||||
<div class="editor-toolbar">
|
<div class="editor-toolbar">
|
||||||
<div class="">Preview</div>
|
<div class="">Preview</div>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Move Page <small class="subheader">{{$page->name}}</small></h1>
|
<h1>Move Page <small class="subheader">{{$page->name}}</small></h1>
|
||||||
|
|
||||||
<form action="{{ $page->getUrl() }}/move" method="POST">
|
<form action="{{ $page->getUrl('/move') }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="_method" value="PUT">
|
<input type="hidden" name="_method" value="PUT">
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<table>
|
<table>
|
||||||
@foreach($page->tags as $tag)
|
@foreach($page->tags as $tag)
|
||||||
<tr class="tag">
|
<tr class="tag">
|
||||||
<td @if(!$tag->value) colspan="2" @endif><a href="/search/all?term=%5B{{ urlencode($tag->name) }}%5D">{{ $tag->name }}</a></td>
|
<td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td>
|
||||||
@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
|
@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
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
@ -22,27 +22,27 @@
|
|||||||
<span dropdown class="dropdown-container">
|
<span dropdown class="dropdown-container">
|
||||||
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>Export</div>
|
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>Export</div>
|
||||||
<ul class="wide">
|
<ul class="wide">
|
||||||
<li><a href="{{$page->getUrl()}}/export/html" target="_blank">Contained Web File <span class="text-muted float right">.html</span></a></li>
|
<li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">Contained Web File <span class="text-muted float right">.html</span></a></li>
|
||||||
<li><a href="{{$page->getUrl()}}/export/pdf" target="_blank">PDF File <span class="text-muted float right">.pdf</span></a></li>
|
<li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">PDF File <span class="text-muted float right">.pdf</span></a></li>
|
||||||
<li><a href="{{$page->getUrl()}}/export/plaintext" target="_blank">Plain Text File <span class="text-muted float right">.txt</span></a></li>
|
<li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">Plain Text File <span class="text-muted float right">.txt</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
@if(userCan('page-update', $page))
|
@if(userCan('page-update', $page))
|
||||||
<a href="{{$page->getUrl()}}/edit" class="text-primary text-button" ><i class="zmdi zmdi-edit"></i>Edit</a>
|
<a href="{{ $page->getUrl('/edit') }}" class="text-primary text-button" ><i class="zmdi zmdi-edit"></i>Edit</a>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('page-update', $page) || userCan('restrictions-manage', $page) || userCan('page-delete', $page))
|
@if(userCan('page-update', $page) || userCan('restrictions-manage', $page) || userCan('page-delete', $page))
|
||||||
<div dropdown class="dropdown-container">
|
<div dropdown class="dropdown-container">
|
||||||
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
|
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
|
||||||
<ul>
|
<ul>
|
||||||
@if(userCan('page-update', $page))
|
@if(userCan('page-update', $page))
|
||||||
<li><a href="{{$page->getUrl()}}/move" class="text-primary" ><i class="zmdi zmdi-folder"></i>Move</a></li>
|
<li><a href="{{ $page->getUrl('/move') }}" class="text-primary" ><i class="zmdi zmdi-folder"></i>Move</a></li>
|
||||||
<li><a href="{{$page->getUrl()}}/revisions" class="text-primary"><i class="zmdi zmdi-replay"></i>Revisions</a></li>
|
<li><a href="{{ $page->getUrl('/revisions') }}" class="text-primary"><i class="zmdi zmdi-replay"></i>Revisions</a></li>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('restrictions-manage', $page))
|
@if(userCan('restrictions-manage', $page))
|
||||||
<li><a href="{{$page->getUrl()}}/permissions" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li>
|
<li><a href="{{ $page->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('page-delete', $page))
|
@if(userCan('page-delete', $page))
|
||||||
<li><a href="{{$page->getUrl()}}/delete" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li>
|
<li><a href="{{ $page->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li>
|
||||||
@endif
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -73,13 +73,14 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p class="text-muted small">
|
<p class="text-muted small">
|
||||||
Created {{$page->created_at->diffForHumans()}} @if($page->createdBy) by <a href="/user/{{ $page->createdBy->id }}">{{$page->createdBy->name}}</a> @endif
|
Created {{ $page->created_at->diffForHumans() }} @if($page->createdBy) by <a href="{{ $page->createdBy->getProfileUrl() }}">{{$page->createdBy->name}}</a> @endif
|
||||||
<br>
|
<br>
|
||||||
Last Updated {{$page->updated_at->diffForHumans()}} @if($page->updatedBy) by <a href="/user/{{ $page->updatedBy->id }}">{{$page->updatedBy->name}}</a> @endif
|
Last Updated {{ $page->updated_at->diffForHumans() }} @if($page->updatedBy) by <a href="{{ $page->updatedBy->getProfileUrl() }}">{{$page->updatedBy->name}}</a> @endif
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 print-hidden">
|
<div class="col-md-3 print-hidden">
|
||||||
<div class="margin-top large"></div>
|
<div class="margin-top large"></div>
|
||||||
@if($book->restricted || ($page->chapter && $page->chapter->restricted) || $page->restricted)
|
@if($book->restricted || ($page->chapter && $page->chapter->restricted) || $page->restricted)
|
||||||
@ -87,7 +88,7 @@
|
|||||||
|
|
||||||
@if($book->restricted)
|
@if($book->restricted)
|
||||||
@if(userCan('restrictions-manage', $book))
|
@if(userCan('restrictions-manage', $book))
|
||||||
<a href="{{ $book->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a>
|
<a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a>
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>Book Permissions Active
|
<i class="zmdi zmdi-lock-outline"></i>Book Permissions Active
|
||||||
@endif
|
@endif
|
||||||
@ -96,7 +97,7 @@
|
|||||||
|
|
||||||
@if($page->chapter && $page->chapter->restricted)
|
@if($page->chapter && $page->chapter->restricted)
|
||||||
@if(userCan('restrictions-manage', $page->chapter))
|
@if(userCan('restrictions-manage', $page->chapter))
|
||||||
<a href="{{ $page->chapter->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active</a>
|
<a href="{{ $page->chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active</a>
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active
|
<i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active
|
||||||
@endif
|
@endif
|
||||||
@ -105,7 +106,7 @@
|
|||||||
|
|
||||||
@if($page->restricted)
|
@if($page->restricted)
|
||||||
@if(userCan('restrictions-manage', $page))
|
@if(userCan('restrictions-manage', $page))
|
||||||
<a href="{{ $page->getUrl() }}/permissions"><i class="zmdi zmdi-lock-outline"></i>Page Permissions Active</a>
|
<a href="{{ $page->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Page Permissions Active</a>
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>Page Permissions Active
|
<i class="zmdi zmdi-lock-outline"></i>Page Permissions Active
|
||||||
@endif
|
@endif
|
||||||
@ -114,8 +115,8 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
@include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="right" ng-non-bindable>
|
<div class="right" ng-non-bindable>
|
||||||
@if($activity->user)
|
@if($activity->user)
|
||||||
<a href="/user/{{ $activity->user->id }}">{{$activity->user->name}}</a>
|
<a href="{{ $activity->user->getProfileUrl() }}">{{ $activity->user->name }}</a>
|
||||||
@else
|
@else
|
||||||
A deleted user
|
A deleted user
|
||||||
@endif
|
@endif
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<style>
|
<style>
|
||||||
header, #back-to-top, .primary-background {
|
header, #back-to-top, .primary-background {
|
||||||
background-color: {{ Setting::get('app-color') }} !important;
|
background-color: {{ setting('app-color') }} !important;
|
||||||
}
|
}
|
||||||
.faded-small, .primary-background-light {
|
.faded-small, .primary-background-light {
|
||||||
background-color: {{ Setting::get('app-color-light') }};
|
background-color: {{ setting('app-color-light') }};
|
||||||
}
|
}
|
||||||
.button-base, .button, input[type="button"], input[type="submit"] {
|
.button-base, .button, input[type="button"], input[type="submit"] {
|
||||||
background-color: {{ Setting::get('app-color') }};
|
background-color: {{ setting('app-color') }};
|
||||||
}
|
}
|
||||||
.button-base:hover, .button:hover, input[type="button"]:hover, input[type="submit"]:hover, .button:focus {
|
.button-base:hover, .button:hover, input[type="button"]:hover, input[type="submit"]:hover, .button:focus {
|
||||||
background-color: {{ Setting::get('app-color') }};
|
background-color: {{ setting('app-color') }};
|
||||||
}
|
}
|
||||||
.nav-tabs a.selected, .nav-tabs .tab-item.selected {
|
.nav-tabs a.selected, .nav-tabs .tab-item.selected {
|
||||||
border-bottom-color: {{ Setting::get('app-color') }};
|
border-bottom-color: {{ setting('app-color') }};
|
||||||
}
|
}
|
||||||
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 {
|
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 {
|
||||||
color: {{ Setting::get('app-color') }};
|
color: {{ setting('app-color') }};
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
<script src="/libs/highlightjs/highlight.min.js"></script>
|
<script src="{{ baseUrl('/libs/highlightjs/highlight.min.js') }}"></script>
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
var aCodes = document.getElementsByTagName('pre');
|
var aCodes = document.getElementsByTagName('pre');
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>BookStack</title>
|
<title>{{ setting('app-name') }}</title>
|
||||||
|
|
||||||
<!-- Meta -->
|
<!-- Meta -->
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<meta name="token" content="{{ csrf_token() }}">
|
<meta name="token" content="{{ csrf_token() }}">
|
||||||
|
<meta name="base-url" content="{{ baseUrl('/') }}">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<!-- Styles and Fonts -->
|
<!-- Styles and Fonts -->
|
||||||
<link rel="stylesheet" href="{{ versioned_asset('css/styles.css') }}">
|
<link rel="stylesheet" href="{{ versioned_asset('css/styles.css') }}">
|
||||||
<link rel="stylesheet" media="print" href="{{ versioned_asset('css/print-styles.css') }}">
|
<link rel="stylesheet" media="print" href="{{ versioned_asset('css/print-styles.css') }}">
|
||||||
<link rel="stylesheet" href="/libs/material-design-iconic-font/css/material-design-iconic-font.min.css">
|
<link rel="stylesheet" href="{{ baseUrl("/libs/material-design-iconic-font/css/material-design-iconic-font.min.css") }}">
|
||||||
|
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
<script src="/libs/jquery/jquery.min.js?version=2.1.4"></script>
|
<script src="{{ baseUrl("/libs/jquery/jquery.min.js?version=2.1.4") }}"></script>
|
||||||
@include('partials/custom-styles')
|
@include('partials/custom-styles')
|
||||||
</head>
|
</head>
|
||||||
<body class="@yield('body-class')" ng-app="bookStack">
|
<body class="@yield('body-class')" ng-app="bookStack">
|
||||||
@ -26,9 +27,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
<a href="/" class="logo">
|
<a href="{{ baseUrl('/') }}" class="logo">
|
||||||
<img class="logo-image" src="/logo.png" alt="Logo">
|
@if(setting('app-logo', '') !== 'none')
|
||||||
<span class="logo-text">{{ Setting::get('app-name', 'BookStack') }}</span>
|
<img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo">
|
||||||
|
@endif
|
||||||
|
<span class="logo-text">{{ setting('app-name') }}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -40,14 +43,17 @@
|
|||||||
<div class="dropdown-container" dropdown>
|
<div class="dropdown-container" dropdown>
|
||||||
<span class="user-name" dropdown-toggle>
|
<span class="user-name" dropdown-toggle>
|
||||||
<img class="avatar" src="{{$currentUser->getAvatar(30)}}" alt="{{ $currentUser->name }}">
|
<img class="avatar" src="{{$currentUser->getAvatar(30)}}" alt="{{ $currentUser->name }}">
|
||||||
<span class="name" ng-non-bindable>{{ $currentUser->name }}</span> <i class="zmdi zmdi-caret-down"></i>
|
<span class="name" ng-non-bindable>{{ $currentUser->getShortName(9) }}</span> <i class="zmdi zmdi-caret-down"></i>
|
||||||
</span>
|
</span>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="/users/{{$currentUser->id}}" class="text-primary"><i class="zmdi zmdi-edit zmdi-hc-lg"></i>Edit Profile</a>
|
<a href="{{ baseUrl("/user/{$currentUser->id}") }}" class="text-primary"><i class="zmdi zmdi-account zmdi-hc-fw zmdi-hc-lg"></i>View Profile</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/logout" class="text-neg"><i class="zmdi zmdi-run zmdi-hc-lg"></i>Logout</a>
|
<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>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{ baseUrl('/logout') }}" class="text-neg"><i class="zmdi zmdi-run zmdi-hc-fw zmdi-hc-lg"></i>Logout</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,36 +9,36 @@
|
|||||||
<p>
|
<p>
|
||||||
|
|
||||||
@if(count($pages) > 0)
|
@if(count($pages) > 0)
|
||||||
<a href="/search/pages?term={{$searchTerm}}" class="text-page"><i class="zmdi zmdi-file-text"></i>View all matched pages</a>
|
<a href="{{ baseUrl("/search/pages?term={$searchTerm}") }}" class="text-page"><i class="zmdi zmdi-file-text"></i>View all matched pages</a>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
@if(count($chapters) > 0)
|
@if(count($chapters) > 0)
|
||||||
|
|
||||||
<a href="/search/chapters?term={{$searchTerm}}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>View all matched chapters</a>
|
<a href="{{ baseUrl("/search/chapters?term={$searchTerm}") }}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>View all matched chapters</a>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(count($books) > 0)
|
@if(count($books) > 0)
|
||||||
|
|
||||||
<a href="/search/books?term={{$searchTerm}}" class="text-book"><i class="zmdi zmdi-book"></i>View all matched books</a>
|
<a href="{{ baseUrl("/search/books?term={$searchTerm}") }}" class="text-book"><i class="zmdi zmdi-book"></i>View all matched books</a>
|
||||||
@endif
|
@endif
|
||||||
</p>
|
</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3><a href="/search/pages?term={{$searchTerm}}" class="no-color">Matching Pages</a></h3>
|
<h3><a href="{{ baseUrl("/search/pages?term={$searchTerm}") }}" class="no-color">Matching Pages</a></h3>
|
||||||
@include('partials/entity-list', ['entities' => $pages, 'style' => 'detailed'])
|
@include('partials/entity-list', ['entities' => $pages, 'style' => 'detailed'])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-5 col-md-offset-1">
|
<div class="col-md-5 col-md-offset-1">
|
||||||
|
|
||||||
@if(count($books) > 0)
|
@if(count($books) > 0)
|
||||||
<h3><a href="/search/books?term={{$searchTerm}}" class="no-color">Matching Books</a></h3>
|
<h3><a href="{{ baseUrl("/search/books?term={$searchTerm}") }}" class="no-color">Matching Books</a></h3>
|
||||||
@include('partials/entity-list', ['entities' => $books])
|
@include('partials/entity-list', ['entities' => $books])
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(count($chapters) > 0)
|
@if(count($chapters) > 0)
|
||||||
<h3><a href="/search/chapters?term={{$searchTerm}}" class="no-color">Matching Chapters</a></h3>
|
<h3><a href="{{ baseUrl("/search/chapters?term={$searchTerm}") }}" class="no-color">Matching Chapters</a></h3>
|
||||||
@include('partials/entity-list', ['entities' => $chapters])
|
@include('partials/entity-list', ['entities' => $chapters])
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<h1>Settings</h1>
|
<h1>Settings</h1>
|
||||||
|
|
||||||
<form action="/settings" method="POST" ng-cloak>
|
<form action="{{ baseUrl("/settings") }}" method="POST" ng-cloak>
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
|
|
||||||
<h3>App Settings</h3>
|
<h3>App Settings</h3>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<div class="form-group" id="logo-control">
|
<div class="form-group" id="logo-control">
|
||||||
<label for="setting-app-logo">Application logo</label>
|
<label for="setting-app-logo">Application logo</label>
|
||||||
<p class="small">This image should be 43px in height. <br>Large images will be scaled down.</p>
|
<p class="small">This image should be 43px in height. <br>Large images will be scaled down.</p>
|
||||||
<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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" id="color-control">
|
<div class="form-group" id="color-control">
|
||||||
<label for="setting-app-color">Application primary color</label>
|
<label for="setting-app-color">Application primary color</label>
|
||||||
@ -112,7 +112,7 @@
|
|||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
<script src="/libs/jq-color-picker/tiny-color-picker.min.js?version=1.0.0"></script>
|
<script src="{{ baseUrl("/libs/jq-color-picker/tiny-color-picker.min.js?version=1.0.0") }}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('#setting-app-color').colorPicker({
|
$('#setting-app-color').colorPicker({
|
||||||
opacity: false,
|
opacity: false,
|
||||||
@ -125,9 +125,9 @@
|
|||||||
if (!isEmpty) $elm.val(hexVal);
|
if (!isEmpty) $elm.val(hexVal);
|
||||||
$('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal);
|
$('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal);
|
||||||
// Set page elements to provide preview
|
// Set page elements to provide preview
|
||||||
$('#header, .image-picker .button').css('background-color', hexVal);
|
$('#header, .image-picker .button').attr('style', 'background-color:'+ hexVal+'!important;');
|
||||||
$('.faded-small').css('background-color', rgbLightVal);
|
$('.faded-small').css('background-color', rgbLightVal);
|
||||||
$('.setting-nav a.selected').css('border-bottom-color', hexVal);
|
$('.setting-nav a.selected').css('border-bottom-color', hexVal + '!important');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 setting-nav nav-tabs">
|
<div class="col-md-12 setting-nav nav-tabs">
|
||||||
@if($currentUser->can('settings-manage'))
|
@if($currentUser->can('settings-manage'))
|
||||||
<a href="/settings" @if($selected == 'settings') class="selected text-button" @endif><i class="zmdi zmdi-settings"></i>Settings</a>
|
<a href="{{ baseUrl('/settings') }}" @if($selected == 'settings') class="selected text-button" @endif><i class="zmdi zmdi-settings"></i>Settings</a>
|
||||||
@endif
|
@endif
|
||||||
@if($currentUser->can('users-manage'))
|
@if($currentUser->can('users-manage'))
|
||||||
<a href="/settings/users" @if($selected == 'users') class="selected text-button" @endif><i class="zmdi zmdi-accounts"></i>Users</a>
|
<a href="{{ baseUrl('/settings/users') }}" @if($selected == 'users') class="selected text-button" @endif><i class="zmdi zmdi-accounts"></i>Users</a>
|
||||||
@endif
|
@endif
|
||||||
@if($currentUser->can('user-roles-manage'))
|
@if($currentUser->can('user-roles-manage'))
|
||||||
<a href="/settings/roles" @if($selected == 'roles') class="selected text-button" @endif><i class="zmdi zmdi-lock-open"></i>Roles</a>
|
<a href="{{ baseUrl('/settings/roles') }}" @if($selected == 'roles') class="selected text-button" @endif><i class="zmdi zmdi-lock-open"></i>Roles</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Create New Role</h1>
|
<h1>Create New Role</h1>
|
||||||
|
|
||||||
<form action="/settings/roles/new" method="POST">
|
<form action="{{ baseUrl("/settings/roles/new") }}" method="POST">
|
||||||
@include('settings/roles/form')
|
@include('settings/roles/form')
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<h1>Delete Role</h1>
|
<h1>Delete Role</h1>
|
||||||
<p>This will delete the role with the name '{{ $role->display_name }}'.</p>
|
<p>This will delete the role with the name '{{ $role->display_name }}'.</p>
|
||||||
|
|
||||||
<form action="/settings/roles/delete/{{$role->id}}" method="POST">
|
<form action="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="_method" value="DELETE">
|
<input type="hidden" name="_method" value="DELETE">
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
<p class="text-neg">Are you sure you want to delete this role?</p>
|
<p class="text-neg">Are you sure you want to delete this role?</p>
|
||||||
<a href="/settings/roles/{{ $role->id }}" class="button">Cancel</a>
|
<a href="{{ baseUrl("/settings/roles/{$role->id}") }}" class="button">Cancel</a>
|
||||||
<button type="submit" class="button neg">Confirm</button>
|
<button type="submit" class="button neg">Confirm</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<p></p>
|
<p></p>
|
||||||
<a href="/settings/roles/delete/{{ $role->id }}" class="button neg float right">Delete Role</a>
|
<a href="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" class="button neg float right">Delete Role</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="/settings/roles/{{ $role->id }}" method="POST">
|
<form action="{{ baseUrl("/settings/roles/{$role->id}") }}" method="POST">
|
||||||
<input type="hidden" name="_method" value="PUT">
|
<input type="hidden" name="_method" value="PUT">
|
||||||
@include('settings/roles/form', ['model' => $role])
|
@include('settings/roles/form', ['model' => $role])
|
||||||
</form>
|
</form>
|
||||||
|
@ -109,7 +109,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="/settings/roles" class="button muted">Cancel</a>
|
<a href="{{ baseUrl("/settings/roles") }}" class="button muted">Cancel</a>
|
||||||
<button type="submit" class="button pos">Save Role</button>
|
<button type="submit" class="button pos">Save Role</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -122,7 +122,7 @@
|
|||||||
<td style="line-height: 0;"><img class="avatar small" src="{{ $user->getAvatar(40) }}" alt="{{ $user->name }}"></td>
|
<td style="line-height: 0;"><img class="avatar small" src="{{ $user->getAvatar(40) }}" alt="{{ $user->name }}"></td>
|
||||||
<td>
|
<td>
|
||||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||||
<a href="/settings/users/{{$user->id}}">
|
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
|
||||||
@endif
|
@endif
|
||||||
{{ $user->name }}
|
{{ $user->name }}
|
||||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<p></p>
|
<p></p>
|
||||||
<a href="/settings/roles/new" class="button float right pos"><i class="zmdi zmdi-lock-open"></i>Add new role</a>
|
<a href="{{ baseUrl("/settings/roles/new") }}" class="button float right pos"><i class="zmdi zmdi-lock-open"></i>Add new role</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
@foreach($roles as $role)
|
@foreach($roles as $role)
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/settings/roles/{{ $role->id }}">{{ $role->display_name }}</a></td>
|
<td><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a></td>
|
||||||
<td>{{ $role->description }}</td>
|
<td>{{ $role->description }}</td>
|
||||||
<td class="text-right">{{ $role->users->count() }}</td>
|
<td class="text-right">{{ $role->users->count() }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
<div class="container small" ng-non-bindable>
|
<div class="container small" ng-non-bindable>
|
||||||
<h1>Create User</h1>
|
<h1>Create User</h1>
|
||||||
|
|
||||||
<form action="/settings/users/create" method="post">
|
<form action="{{ baseUrl("/settings/users/create") }}" method="post">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
@include('users.forms.' . $authMethod)
|
@include('users/forms/' . $authMethod)
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
<p>This will fully delete this user with the name '<span class="text-neg">{{ $user->name }}</span>' from the system.</p>
|
<p>This will fully delete this user with the name '<span class="text-neg">{{ $user->name }}</span>' from the system.</p>
|
||||||
<p class="text-neg">Are you sure you want to delete this user?</p>
|
<p class="text-neg">Are you sure you want to delete this user?</p>
|
||||||
|
|
||||||
<form action="/settings/users/{{$user->id}}" method="POST">
|
<form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="_method" value="DELETE">
|
<input type="hidden" name="_method" value="DELETE">
|
||||||
<a href="/settings/users/{{$user->id}}" class="button muted">Cancel</a>
|
<a href="{{ baseUrl("/settings/users/{$user->id}") }}" class="button muted">Cancel</a>
|
||||||
<button type="submit" class="button neg">Confirm</button>
|
<button type="submit" class="button neg">Confirm</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,14 +8,14 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="container small">
|
<div class="container small">
|
||||||
<form action="/settings/users/{{$user->id}}" method="post">
|
<form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="post">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<h1>Edit {{ $user->id === $currentUser->id ? 'Profile' : 'User' }}</h1>
|
<h1>Edit {{ $user->id === $currentUser->id ? 'Profile' : 'User' }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<p></p>
|
<p></p>
|
||||||
<a href="/settings/users/{{$user->id}}/delete" class="neg button float right">Delete User</a>
|
<a href="{{ baseUrl("/settings/users/{$user->id}/delete") }}" class="neg button float right">Delete User</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<div class="form-group" id="logo-control">
|
<div class="form-group" id="logo-control">
|
||||||
<label for="user-avatar">User Avatar</label>
|
<label for="user-avatar">User Avatar</label>
|
||||||
<p class="small">This image should be approx 256px square.</p>
|
<p class="small">This image should be approx 256px square.</p>
|
||||||
<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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -49,9 +49,9 @@
|
|||||||
<div><i class="zmdi zmdi-google-plus-box zmdi-hc-4x" style="color: #DC4E41;"></i></div>
|
<div><i class="zmdi zmdi-google-plus-box zmdi-hc-4x" style="color: #DC4E41;"></i></div>
|
||||||
<div>
|
<div>
|
||||||
@if($user->hasSocialAccount('google'))
|
@if($user->hasSocialAccount('google'))
|
||||||
<a href="/login/service/google/detach" class="button neg">Disconnect Account</a>
|
<a href="{{ baseUrl("/login/service/google/detach") }}" class="button neg">Disconnect Account</a>
|
||||||
@else
|
@else
|
||||||
<a href="/login/service/google" class="button pos">Attach Account</a>
|
<a href="{{ baseUrl("/login/service/google") }}" class="button pos">Attach Account</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -61,9 +61,9 @@
|
|||||||
<div><i class="zmdi zmdi-github zmdi-hc-4x" style="color: #444;"></i></div>
|
<div><i class="zmdi zmdi-github zmdi-hc-4x" style="color: #444;"></i></div>
|
||||||
<div>
|
<div>
|
||||||
@if($user->hasSocialAccount('github'))
|
@if($user->hasSocialAccount('github'))
|
||||||
<a href="/login/service/github/detach" class="button neg">Disconnect Account</a>
|
<a href="{{ baseUrl("/login/service/github/detach") }}" class="button neg">Disconnect Account</a>
|
||||||
@else
|
@else
|
||||||
<a href="/login/service/github" class="button pos">Attach Account</a>
|
<a href="{{ baseUrl("/login/service/github") }}" class="button pos">Attach Account</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<a href="/settings/users" class="button muted">Cancel</a>
|
<a href="{{ baseUrl("/settings/users") }}" class="button muted">Cancel</a>
|
||||||
<button class="button pos" type="submit">Save</button>
|
<button class="button pos" type="submit">Save</button>
|
||||||
</div>
|
</div>
|
@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<a href="/settings/users" class="button muted">Cancel</a>
|
<a href="{{ baseUrl("/settings/users") }}" class="button muted">Cancel</a>
|
||||||
<button class="button pos" type="submit">Save</button>
|
<button class="button pos" type="submit">Save</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<p></p>
|
<p></p>
|
||||||
@if(userCan('users-manage'))
|
@if(userCan('users-manage'))
|
||||||
<a href="/settings/users/create" class="pos button float right"><i class="zmdi zmdi-account-add"></i>Add new user</a>
|
<a href="{{ baseUrl("/settings/users/create") }}" class="pos button float right"><i class="zmdi zmdi-account-add"></i>Add new user</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<form method="get" class="float right" action="/settings/users">
|
<form method="get" class="float right" action="{{ baseUrl("/settings/users") }}">
|
||||||
@foreach(collect($listDetails)->except('search') as $name => $val)
|
@foreach(collect($listDetails)->except('search') as $name => $val)
|
||||||
<input type="hidden" name="{{ $name }}" value="{{ $val }}">
|
<input type="hidden" name="{{ $name }}" value="{{ $val }}">
|
||||||
@endforeach
|
@endforeach
|
||||||
@ -50,7 +50,7 @@
|
|||||||
<td style="line-height: 0;"><img class="avatar med" src="{{ $user->getAvatar(40)}}" alt="{{ $user->name }}"></td>
|
<td style="line-height: 0;"><img class="avatar med" src="{{ $user->getAvatar(40)}}" alt="{{ $user->name }}"></td>
|
||||||
<td>
|
<td>
|
||||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||||
<a href="/settings/users/{{$user->id}}">
|
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
|
||||||
@endif
|
@endif
|
||||||
{{ $user->name }}
|
{{ $user->name }}
|
||||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||||
@ -59,7 +59,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||||
<a href="/settings/users/{{$user->id}}">
|
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
|
||||||
@endif
|
@endif
|
||||||
{{ $user->email }}
|
{{ $user->email }}
|
||||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||||
@ -68,7 +68,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@foreach($user->roles as $index => $role)
|
@foreach($user->roles as $index => $role)
|
||||||
<small><a href="/settings/roles/{{$role->id}}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
|
<small><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
|
||||||
@endforeach
|
@endforeach
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -151,8 +151,10 @@ class EntityTest extends TestCase
|
|||||||
->visit('/books/create')
|
->visit('/books/create')
|
||||||
->type($book->name, '#name')
|
->type($book->name, '#name')
|
||||||
->type($book->description, '#description')
|
->type($book->description, '#description')
|
||||||
->press('Save Book')
|
->press('Save Book');
|
||||||
->seePageIs('/books/my-first-book-2');
|
|
||||||
|
$expectedPattern = '/\/books\/my-first-book-[0-9a-zA-Z]{3}/';
|
||||||
|
$this->assertRegExp($expectedPattern, $this->currentUri, "Did not land on expected page [$expectedPattern].\n");
|
||||||
|
|
||||||
$book = \BookStack\Book::where('slug', '=', 'my-first-book')->first();
|
$book = \BookStack\Book::where('slug', '=', 'my-first-book')->first();
|
||||||
return $book;
|
return $book;
|
||||||
|
Loading…
Reference in New Issue
Block a user