Dan Brown

Merge branch 'master' into add_role_view_permissions

Showing 74 changed files with 130 additions and 98 deletions
...@@ -36,7 +36,6 @@ class BookController extends Controller ...@@ -36,7 +36,6 @@ class BookController extends Controller
36 36
37 /** 37 /**
38 * Display a listing of the book. 38 * Display a listing of the book.
39 - *
40 * @return Response 39 * @return Response
41 */ 40 */
42 public function index() 41 public function index()
...@@ -50,7 +49,6 @@ class BookController extends Controller ...@@ -50,7 +49,6 @@ class BookController extends Controller
50 49
51 /** 50 /**
52 * Show the form for creating a new book. 51 * Show the form for creating a new book.
53 - *
54 * @return Response 52 * @return Response
55 */ 53 */
56 public function create() 54 public function create()
...@@ -84,7 +82,6 @@ class BookController extends Controller ...@@ -84,7 +82,6 @@ class BookController extends Controller
84 82
85 /** 83 /**
86 * Display the specified book. 84 * Display the specified book.
87 - *
88 * @param $slug 85 * @param $slug
89 * @return Response 86 * @return Response
90 */ 87 */
...@@ -100,7 +97,6 @@ class BookController extends Controller ...@@ -100,7 +97,6 @@ class BookController extends Controller
100 97
101 /** 98 /**
102 * Show the form for editing the specified book. 99 * Show the form for editing the specified book.
103 - *
104 * @param $slug 100 * @param $slug
105 * @return Response 101 * @return Response
106 */ 102 */
...@@ -114,7 +110,6 @@ class BookController extends Controller ...@@ -114,7 +110,6 @@ class BookController extends Controller
114 110
115 /** 111 /**
116 * Update the specified book in storage. 112 * Update the specified book in storage.
117 - *
118 * @param Request $request 113 * @param Request $request
119 * @param $slug 114 * @param $slug
120 * @return Response 115 * @return Response
...@@ -157,7 +152,7 @@ class BookController extends Controller ...@@ -157,7 +152,7 @@ class BookController extends Controller
157 { 152 {
158 $book = $this->bookRepo->getBySlug($bookSlug); 153 $book = $this->bookRepo->getBySlug($bookSlug);
159 $this->checkOwnablePermission('book-update', $book); 154 $this->checkOwnablePermission('book-update', $book);
160 - $bookChildren = $this->bookRepo->getChildren($book); 155 + $bookChildren = $this->bookRepo->getChildren($book, true);
161 $books = $this->bookRepo->getAll(false); 156 $books = $this->bookRepo->getAll(false);
162 $this->setPageTitle('Sort Book ' . $book->getShortName()); 157 $this->setPageTitle('Sort Book ' . $book->getShortName());
163 return view('books/sort', ['book' => $book, 'current' => $book, 'books' => $books, 'bookChildren' => $bookChildren]); 158 return view('books/sort', ['book' => $book, 'current' => $book, 'books' => $books, 'bookChildren' => $bookChildren]);
......
...@@ -4,6 +4,7 @@ use Activity; ...@@ -4,6 +4,7 @@ use Activity;
4 use BookStack\Exceptions\NotFoundException; 4 use BookStack\Exceptions\NotFoundException;
5 use BookStack\Repos\UserRepo; 5 use BookStack\Repos\UserRepo;
6 use BookStack\Services\ExportService; 6 use BookStack\Services\ExportService;
7 +use Carbon\Carbon;
7 use Illuminate\Http\Request; 8 use Illuminate\Http\Request;
8 use BookStack\Http\Requests; 9 use BookStack\Http\Requests;
9 use BookStack\Repos\BookRepo; 10 use BookStack\Repos\BookRepo;
...@@ -216,8 +217,14 @@ class PageController extends Controller ...@@ -216,8 +217,14 @@ class PageController extends Controller
216 } else { 217 } else {
217 $draft = $this->pageRepo->saveUpdateDraft($page, $request->only(['name', 'html', 'markdown'])); 218 $draft = $this->pageRepo->saveUpdateDraft($page, $request->only(['name', 'html', 'markdown']));
218 } 219 }
219 - $updateTime = $draft->updated_at->format('H:i'); 220 +
220 - return response()->json(['status' => 'success', 'message' => 'Draft saved at ' . $updateTime]); 221 + $updateTime = $draft->updated_at->timestamp;
222 + $utcUpdateTimestamp = $updateTime + Carbon::createFromTimestamp(0)->offset;
223 + return response()->json([
224 + 'status' => 'success',
225 + 'message' => 'Draft saved at ',
226 + 'timestamp' => $utcUpdateTimestamp
227 + ]);
221 } 228 }
222 229
223 /** 230 /**
......
...@@ -198,16 +198,23 @@ class BookRepo extends EntityRepo ...@@ -198,16 +198,23 @@ class BookRepo extends EntityRepo
198 * Returns a sorted collection of Pages and Chapters. 198 * Returns a sorted collection of Pages and Chapters.
199 * Loads the bookslug onto child elements to prevent access database access for getting the slug. 199 * Loads the bookslug onto child elements to prevent access database access for getting the slug.
200 * @param Book $book 200 * @param Book $book
201 + * @param bool $filterDrafts
201 * @return mixed 202 * @return mixed
202 */ 203 */
203 - public function getChildren(Book $book) 204 + public function getChildren(Book $book, $filterDrafts = false)
204 { 205 {
205 $pageQuery = $book->pages()->where('chapter_id', '=', 0); 206 $pageQuery = $book->pages()->where('chapter_id', '=', 0);
206 $pageQuery = $this->restrictionService->enforcePageRestrictions($pageQuery, 'view'); 207 $pageQuery = $this->restrictionService->enforcePageRestrictions($pageQuery, 'view');
208 +
209 + if ($filterDrafts) {
210 + $pageQuery = $pageQuery->where('draft', '=', false);
211 + }
212 +
207 $pages = $pageQuery->get(); 213 $pages = $pageQuery->get();
208 214
209 - $chapterQuery = $book->chapters()->with(['pages' => function($query) { 215 + $chapterQuery = $book->chapters()->with(['pages' => function($query) use ($filterDrafts) {
210 $this->restrictionService->enforcePageRestrictions($query, 'view'); 216 $this->restrictionService->enforcePageRestrictions($query, 'view');
217 + if ($filterDrafts) $query->where('draft', '=', false);
211 }]); 218 }]);
212 $chapterQuery = $this->restrictionService->enforceChapterRestrictions($chapterQuery, 'view'); 219 $chapterQuery = $this->restrictionService->enforceChapterRestrictions($chapterQuery, 'view');
213 $chapters = $chapterQuery->get(); 220 $chapters = $chapterQuery->get();
......
...@@ -84,7 +84,7 @@ class EntityRepo ...@@ -84,7 +84,7 @@ class EntityRepo
84 if ($additionalQuery !== false && is_callable($additionalQuery)) { 84 if ($additionalQuery !== false && is_callable($additionalQuery)) {
85 $additionalQuery($query); 85 $additionalQuery($query);
86 } 86 }
87 - return $query->skip($page * $count)->take($count)->get(); 87 + return $query->with('book')->skip($page * $count)->take($count)->get();
88 } 88 }
89 89
90 /** 90 /**
...@@ -114,7 +114,7 @@ class EntityRepo ...@@ -114,7 +114,7 @@ class EntityRepo
114 { 114 {
115 return $this->restrictionService->enforcePageRestrictions($this->page) 115 return $this->restrictionService->enforcePageRestrictions($this->page)
116 ->where('draft', '=', false) 116 ->where('draft', '=', false)
117 - ->orderBy('updated_at', 'desc')->skip($page * $count)->take($count)->get(); 117 + ->orderBy('updated_at', 'desc')->with('book')->skip($page * $count)->take($count)->get();
118 } 118 }
119 119
120 /** 120 /**
......
...@@ -154,10 +154,10 @@ class PageRepo extends EntityRepo ...@@ -154,10 +154,10 @@ class PageRepo extends EntityRepo
154 /** 154 /**
155 * Get a new draft page instance. 155 * Get a new draft page instance.
156 * @param Book $book 156 * @param Book $book
157 - * @param Chapter|null $chapter 157 + * @param Chapter|bool $chapter
158 * @return static 158 * @return static
159 */ 159 */
160 - public function getDraftPage(Book $book, $chapter) 160 + public function getDraftPage(Book $book, $chapter = false)
161 { 161 {
162 $page = $this->page->newInstance(); 162 $page = $this->page->newInstance();
163 $page->name = 'New Page'; 163 $page->name = 'New Page';
......
1 <?php namespace BookStack\Services; 1 <?php namespace BookStack\Services;
2 2
3 -
4 use BookStack\Entity; 3 use BookStack\Entity;
5 use BookStack\View; 4 use BookStack\View;
6 5
...@@ -47,7 +46,6 @@ class ViewService ...@@ -47,7 +46,6 @@ class ViewService
47 return 1; 46 return 1;
48 } 47 }
49 48
50 -
51 /** 49 /**
52 * Get the entities with the most views. 50 * Get the entities with the most views.
53 * @param int $count 51 * @param int $count
...@@ -58,17 +56,13 @@ class ViewService ...@@ -58,17 +56,13 @@ class ViewService
58 { 56 {
59 $skipCount = $count * $page; 57 $skipCount = $count * $page;
60 $query = $this->restrictionService->filterRestrictedEntityRelations($this->view, 'views', 'viewable_id', 'viewable_type') 58 $query = $this->restrictionService->filterRestrictedEntityRelations($this->view, 'views', 'viewable_id', 'viewable_type')
61 - ->select('id', 'viewable_id', 'viewable_type', \DB::raw('SUM(views) as view_count')) 59 + ->select('*', 'viewable_id', 'viewable_type', \DB::raw('SUM(views) as view_count'))
62 ->groupBy('viewable_id', 'viewable_type') 60 ->groupBy('viewable_id', 'viewable_type')
63 ->orderBy('view_count', 'desc'); 61 ->orderBy('view_count', 'desc');
64 62
65 if ($filterModel) $query->where('viewable_type', '=', get_class($filterModel)); 63 if ($filterModel) $query->where('viewable_type', '=', get_class($filterModel));
66 64
67 - $views = $query->with('viewable')->skip($skipCount)->take($count)->get(); 65 + return $query->with('viewable')->skip($skipCount)->take($count)->get()->pluck('viewable');
68 - $viewedEntities = $views->map(function ($item) {
69 - return $item->viewable()->getResults();
70 - });
71 - return $viewedEntities;
72 } 66 }
73 67
74 /** 68 /**
...@@ -81,21 +75,18 @@ class ViewService ...@@ -81,21 +75,18 @@ class ViewService
81 public function getUserRecentlyViewed($count = 10, $page = 0, $filterModel = false) 75 public function getUserRecentlyViewed($count = 10, $page = 0, $filterModel = false)
82 { 76 {
83 if ($this->user === null) return collect(); 77 if ($this->user === null) return collect();
84 - $skipCount = $count * $page; 78 +
85 $query = $this->restrictionService 79 $query = $this->restrictionService
86 ->filterRestrictedEntityRelations($this->view, 'views', 'viewable_id', 'viewable_type'); 80 ->filterRestrictedEntityRelations($this->view, 'views', 'viewable_id', 'viewable_type');
87 81
88 if ($filterModel) $query = $query->where('viewable_type', '=', get_class($filterModel)); 82 if ($filterModel) $query = $query->where('viewable_type', '=', get_class($filterModel));
89 $query = $query->where('user_id', '=', auth()->user()->id); 83 $query = $query->where('user_id', '=', auth()->user()->id);
90 84
91 - $views = $query->with('viewable')->orderBy('updated_at', 'desc')->skip($skipCount)->take($count)->get(); 85 + $viewables = $query->with('viewable')->orderBy('updated_at', 'desc')
92 - $viewedEntities = $views->map(function ($item) { 86 + ->skip($count * $page)->take($count)->get()->pluck('viewable');
93 - return $item->viewable; 87 + return $viewables;
94 - });
95 - return $viewedEntities;
96 } 88 }
97 89
98 -
99 /** 90 /**
100 * Reset all view counts by deleting all views. 91 * Reset all view counts by deleting all views.
101 */ 92 */
...@@ -104,5 +95,4 @@ class ViewService ...@@ -104,5 +95,4 @@ class ViewService
104 $this->view->truncate(); 95 $this->view->truncate();
105 } 96 }
106 97
107 -
108 } 98 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -139,6 +139,6 @@ return [ ...@@ -139,6 +139,6 @@ return [
139 | 139 |
140 */ 140 */
141 141
142 - 'redis' => $redisConfig, 142 + 'redis' => env('REDIS_SERVERS', false) ? $redisConfig : [],
143 143
144 ]; 144 ];
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
13 "dropzone": "^4.0.1", 13 "dropzone": "^4.0.1",
14 "laravel-elixir": "^3.4.0", 14 "laravel-elixir": "^3.4.0",
15 "marked": "^0.3.5", 15 "marked": "^0.3.5",
16 + "moment": "^2.12.0",
16 "zeroclipboard": "^2.2.0" 17 "zeroclipboard": "^2.2.0"
17 } 18 }
18 } 19 }
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
1 "use strict"; 1 "use strict";
2 2
3 +var moment = require('moment');
4 +
3 module.exports = function (ngApp, events) { 5 module.exports = function (ngApp, events) {
4 6
5 ngApp.controller('ImageManagerController', ['$scope', '$attrs', '$http', '$timeout', 'imageManagerService', 7 ngApp.controller('ImageManagerController', ['$scope', '$attrs', '$http', '$timeout', 'imageManagerService',
...@@ -367,7 +369,8 @@ module.exports = function (ngApp, events) { ...@@ -367,7 +369,8 @@ module.exports = function (ngApp, events) {
367 if (isMarkdown) data.markdown = $scope.editContent; 369 if (isMarkdown) data.markdown = $scope.editContent;
368 370
369 $http.put('/ajax/page/' + pageId + '/save-draft', data).then((responseData) => { 371 $http.put('/ajax/page/' + pageId + '/save-draft', data).then((responseData) => {
370 - $scope.draftText = responseData.data.message; 372 + var updateTime = moment.utc(moment.unix(responseData.data.timestamp)).toDate();
373 + $scope.draftText = responseData.data.message + moment(updateTime).format('HH:mm');
371 if (!$scope.isNewPageDraft) $scope.isUpdateDraft = true; 374 if (!$scope.isNewPageDraft) $scope.isUpdateDraft = true;
372 }); 375 });
373 } 376 }
......
...@@ -11,7 +11,7 @@ var mceOptions = module.exports = { ...@@ -11,7 +11,7 @@ var mceOptions = module.exports = {
11 extended_valid_elements: 'pre[*]', 11 extended_valid_elements: 'pre[*]',
12 automatic_uploads: false, 12 automatic_uploads: false,
13 valid_children: "-div[p|pre|h1|h2|h3|h4|h5|h6|blockquote]", 13 valid_children: "-div[p|pre|h1|h2|h3|h4|h5|h6|blockquote]",
14 - plugins: "image table textcolor paste link fullscreen imagetools code hr autosave", 14 + plugins: "image table textcolor paste link fullscreen imagetools code hr autosave lists",
15 imagetools_toolbar: 'imageoptions', 15 imagetools_toolbar: 'imageoptions',
16 toolbar: "undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr | removeformat code fullscreen", 16 toolbar: "undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr | removeformat code fullscreen",
17 content_style: "body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}", 17 content_style: "body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}",
......
1 -/* Generated by Font Squirrel (http://www.fontsquirrel.com) on December 30, 2015 */ 1 +// Generated using https://google-webfonts-helper.herokuapp.com
2 +
3 +/* roboto-100 - cyrillic_latin */
2 @font-face { 4 @font-face {
3 font-family: 'Roboto'; 5 font-family: 'Roboto';
4 - src: url('/fonts/roboto-bold-webfont.eot');
5 - src: url('/fonts/roboto-bold-webfont.eot?#iefix') format('embedded-opentype'),
6 - url('/fonts/roboto-bold-webfont.woff2') format('woff2'),
7 - url('/fonts/roboto-bold-webfont.woff') format('woff'),
8 - url('/fonts/roboto-bold-webfont.ttf') format('truetype'),
9 - url('/fonts/roboto-bold-webfont.svg#robotobold') format('svg');
10 - font-weight: bold;
11 font-style: normal; 6 font-style: normal;
7 + font-weight: 100;
8 + src: local('Roboto Thin'), local('Roboto-Thin'),
9 + url('/fonts/roboto-v15-cyrillic_latin-100.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
10 + url('/fonts/roboto-v15-cyrillic_latin-100.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
12 } 11 }
13 - 12 +/* roboto-100italic - cyrillic_latin */
14 @font-face { 13 @font-face {
15 font-family: 'Roboto'; 14 font-family: 'Roboto';
16 - src: url('/fonts/roboto-bolditalic-webfont.eot');
17 - src: url('/fonts/roboto-bolditalic-webfont.eot?#iefix') format('embedded-opentype'),
18 - url('/fonts/roboto-bolditalic-webfont.woff2') format('woff2'),
19 - url('/fonts/roboto-bolditalic-webfont.woff') format('woff'),
20 - url('/fonts/roboto-bolditalic-webfont.ttf') format('truetype'),
21 - url('/fonts/roboto-bolditalic-webfont.svg#robotobold_italic') format('svg');
22 - font-weight: bold;
23 font-style: italic; 15 font-style: italic;
16 + font-weight: 100;
17 + src: local('Roboto Thin Italic'), local('Roboto-ThinItalic'),
18 + url('/fonts/roboto-v15-cyrillic_latin-100italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
19 + url('/fonts/roboto-v15-cyrillic_latin-100italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
24 } 20 }
25 - 21 +/* roboto-300 - cyrillic_latin */
26 @font-face { 22 @font-face {
27 font-family: 'Roboto'; 23 font-family: 'Roboto';
28 - src: url('/fonts/roboto-italic-webfont.eot'); 24 + font-style: normal;
29 - src: url('/fonts/roboto-italic-webfont.eot?#iefix') format('embedded-opentype'), 25 + font-weight: 300;
30 - url('/fonts/roboto-italic-webfont.woff2') format('woff2'), 26 + src: local('Roboto Light'), local('Roboto-Light'),
31 - url('/fonts/roboto-italic-webfont.woff') format('woff'), 27 + url('/fonts/roboto-v15-cyrillic_latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
32 - url('/fonts/roboto-italic-webfont.ttf') format('truetype'), 28 + url('/fonts/roboto-v15-cyrillic_latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
33 - url('/fonts/roboto-italic-webfont.svg#robotoitalic') format('svg');
34 - font-weight: normal;
35 - font-style: italic;
36 } 29 }
37 - 30 +/* roboto-300italic - cyrillic_latin */
38 @font-face { 31 @font-face {
39 font-family: 'Roboto'; 32 font-family: 'Roboto';
40 - src: url('/fonts/roboto-light-webfont.eot'); 33 + font-style: italic;
41 - src: url('/fonts/roboto-light-webfont.eot?#iefix') format('embedded-opentype'),
42 - url('/fonts/roboto-light-webfont.woff2') format('woff2'),
43 - url('/fonts/roboto-light-webfont.woff') format('woff'),
44 - url('/fonts/roboto-light-webfont.ttf') format('truetype'),
45 - url('/fonts/roboto-light-webfont.svg#robotolight') format('svg');
46 font-weight: 300; 34 font-weight: 300;
35 + src: local('Roboto Light Italic'), local('Roboto-LightItalic'),
36 + url('/fonts/roboto-v15-cyrillic_latin-300italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
37 + url('/fonts/roboto-v15-cyrillic_latin-300italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
38 +}
39 +/* roboto-regular - cyrillic_latin */
40 +@font-face {
41 + font-family: 'Roboto';
47 font-style: normal; 42 font-style: normal;
43 + font-weight: 400;
44 + src: local('Roboto'), local('Roboto-Regular'),
45 + url('/fonts/roboto-v15-cyrillic_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
46 + url('/fonts/roboto-v15-cyrillic_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
48 } 47 }
49 - 48 +/* roboto-italic - cyrillic_latin */
50 @font-face { 49 @font-face {
51 font-family: 'Roboto'; 50 font-family: 'Roboto';
52 - src: url('/fonts/roboto-lightitalic-webfont.eot');
53 - src: url('/fonts/roboto-lightitalic-webfont.eot?#iefix') format('embedded-opentype'),
54 - url('/fonts/roboto-lightitalic-webfont.woff2') format('woff2'),
55 - url('/fonts/roboto-lightitalic-webfont.woff') format('woff'),
56 - url('/fonts/roboto-lightitalic-webfont.ttf') format('truetype'),
57 - url('/fonts/roboto-lightitalic-webfont.svg#robotolight_italic') format('svg');
58 - font-weight: 300;
59 font-style: italic; 51 font-style: italic;
52 + font-weight: 400;
53 + src: local('Roboto Italic'), local('Roboto-Italic'),
54 + url('/fonts/roboto-v15-cyrillic_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
55 + url('/fonts/roboto-v15-cyrillic_latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
60 } 56 }
61 - 57 +/* roboto-500 - cyrillic_latin */
62 @font-face { 58 @font-face {
63 font-family: 'Roboto'; 59 font-family: 'Roboto';
64 - src: url('/fonts/roboto-medium-webfont.eot');
65 - src: url('/fonts/roboto-medium-webfont.eot?#iefix') format('embedded-opentype'),
66 - url('/fonts/roboto-medium-webfont.woff2') format('woff2'),
67 - url('/fonts/roboto-medium-webfont.woff') format('woff'),
68 - url('/fonts/roboto-medium-webfont.ttf') format('truetype'),
69 - url('/fonts/roboto-medium-webfont.svg#robotomedium') format('svg');
70 - font-weight: 500;
71 font-style: normal; 60 font-style: normal;
61 + font-weight: 500;
62 + src: local('Roboto Medium'), local('Roboto-Medium'),
63 + url('/fonts/roboto-v15-cyrillic_latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
64 + url('/fonts/roboto-v15-cyrillic_latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
72 } 65 }
73 - 66 +/* roboto-500italic - cyrillic_latin */
74 @font-face { 67 @font-face {
75 font-family: 'Roboto'; 68 font-family: 'Roboto';
76 - src: url('/fonts/roboto-mediumitalic-webfont.eot');
77 - src: url('/fonts/roboto-mediumitalic-webfont.eot?#iefix') format('embedded-opentype'),
78 - url('/fonts/roboto-mediumitalic-webfont.woff2') format('woff2'),
79 - url('/fonts/roboto-mediumitalic-webfont.woff') format('woff'),
80 - url('/fonts/roboto-mediumitalic-webfont.ttf') format('truetype'),
81 - url('/fonts/roboto-mediumitalic-webfont.svg#robotomedium_italic') format('svg');
82 - font-weight: 500;
83 font-style: italic; 69 font-style: italic;
70 + font-weight: 500;
71 + src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'),
72 + url('/fonts/roboto-v15-cyrillic_latin-500italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
73 + url('/fonts/roboto-v15-cyrillic_latin-500italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
84 } 74 }
85 - 75 +/* roboto-700 - cyrillic_latin */
86 @font-face { 76 @font-face {
87 font-family: 'Roboto'; 77 font-family: 'Roboto';
88 - src: url('/fonts/roboto-regular-webfont.eot');
89 - src: url('/fonts/roboto-regular-webfont.eot?#iefix') format('embedded-opentype'),
90 - url('/fonts/roboto-regular-webfont.woff2') format('woff2'),
91 - url('/fonts/roboto-regular-webfont.woff') format('woff'),
92 - url('/fonts/roboto-regular-webfont.ttf') format('truetype'),
93 - url('/fonts/roboto-regular-webfont.svg#robotoregular') format('svg');
94 - font-weight: normal;
95 font-style: normal; 78 font-style: normal;
79 + font-weight: 700;
80 + src: local('Roboto Bold'), local('Roboto-Bold'),
81 + url('/fonts/roboto-v15-cyrillic_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
82 + url('/fonts/roboto-v15-cyrillic_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
83 +}
84 +/* roboto-700italic - cyrillic_latin */
85 +@font-face {
86 + font-family: 'Roboto';
87 + font-style: italic;
88 + font-weight: 700;
89 + src: local('Roboto Bold Italic'), local('Roboto-BoldItalic'),
90 + url('/fonts/roboto-v15-cyrillic_latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+ */
91 + url('/fonts/roboto-v15-cyrillic_latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
96 } 92 }
97 93
98 /* roboto-mono-regular - latin */ 94 /* roboto-mono-regular - latin */
99 -// https://google-webfonts-helper.herokuapp.com
100 @font-face { 95 @font-face {
101 font-family: 'Roboto Mono'; 96 font-family: 'Roboto Mono';
102 font-style: normal; 97 font-style: normal;
......
...@@ -24,4 +24,13 @@ table { ...@@ -24,4 +24,13 @@ table {
24 background-color: #F8F8F8; 24 background-color: #F8F8F8;
25 font-weight: 500; 25 font-weight: 500;
26 } 26 }
27 +}
28 +
29 +table.list-table {
30 + margin: 0 -$-xs;
31 + td {
32 + border: 0;
33 + vertical-align: middle;
34 + padding: $-xs;
35 + }
27 } 36 }
...\ No newline at end of file ...\ No newline at end of file
......
1 +<?php
2 +
3 +class SortTest extends TestCase
4 +{
5 + protected $book;
6 +
7 + public function setUp()
8 + {
9 + parent::setUp();
10 + $this->book = \BookStack\Book::first();
11 + }
12 +
13 + public function test_drafts_do_not_show_up()
14 + {
15 + $this->asAdmin();
16 + $pageRepo = app('\BookStack\Repos\PageRepo');
17 + $draft = $pageRepo->getDraftPage($this->book);
18 +
19 + $this->visit($this->book->getUrl())
20 + ->see($draft->name)
21 + ->visit($this->book->getUrl() . '/sort')
22 + ->dontSee($draft->name);
23 + }
24 +
25 +}
...\ No newline at end of file ...\ No newline at end of file