Dan Brown

Merge fixes from branch 'v0.11'

...@@ -145,7 +145,9 @@ class AuthController extends Controller ...@@ -145,7 +145,9 @@ class AuthController extends Controller
145 auth()->login($user); 145 auth()->login($user);
146 } 146 }
147 147
148 - return redirect()->intended($this->redirectPath()); 148 + $path = session()->pull('url.intended', '/');
149 + $path = baseUrl($path, true);
150 + return redirect($path);
149 } 151 }
150 152
151 /** 153 /**
......
...@@ -215,7 +215,7 @@ class SocialAuthService ...@@ -215,7 +215,7 @@ class SocialAuthService
215 { 215 {
216 session(); 216 session();
217 auth()->user()->socialAccounts()->where('driver', '=', $socialDriver)->delete(); 217 auth()->user()->socialAccounts()->where('driver', '=', $socialDriver)->delete();
218 - \Session::flash('success', $socialDriver . ' account successfully detached'); 218 + session()->flash('success', title_case($socialDriver) . ' account successfully detached');
219 return redirect(auth()->user()->getEditUrl()); 219 return redirect(auth()->user()->getEditUrl());
220 } 220 }
221 221
......
...@@ -64,13 +64,21 @@ function setting($key, $default = false) ...@@ -64,13 +64,21 @@ function setting($key, $default = false)
64 64
65 /** 65 /**
66 * Helper to create url's relative to the applications root path. 66 * Helper to create url's relative to the applications root path.
67 - * @param $path 67 + * @param string $path
68 + * @param bool $forceAppDomain
68 * @return string 69 * @return string
69 */ 70 */
70 -function baseUrl($path) 71 +function baseUrl($path, $forceAppDomain = false)
71 { 72 {
72 - if (strpos($path, 'http') === 0) return $path; 73 + $isFullUrl = strpos($path, 'http') === 0;
74 + if ($isFullUrl && !$forceAppDomain) return $path;
73 $path = trim($path, '/'); 75 $path = trim($path, '/');
76 +
77 + if ($isFullUrl && $forceAppDomain) {
78 + $explodedPath = explode('/', $path);
79 + $path = implode('/', array_splice($explodedPath, 3));
80 + }
81 +
74 return rtrim(config('app.url'), '/') . '/' . $path; 82 return rtrim(config('app.url'), '/') . '/' . $path;
75 } 83 }
76 84
......
...@@ -250,13 +250,10 @@ ...@@ -250,13 +250,10 @@
250 margin: 0; 250 margin: 0;
251 padding: 0; 251 padding: 0;
252 } 252 }
253 - span { 253 + .heading th {
254 - color: #666;
255 - margin-left: $-s;
256 - }
257 - .heading {
258 padding: $-xs $-s; 254 padding: $-xs $-s;
259 - color: #444; 255 + color: #333;
256 + font-weight: 400;
260 } 257 }
261 td { 258 td {
262 border: 0; 259 border: 0;
...@@ -267,9 +264,6 @@ ...@@ -267,9 +264,6 @@
267 .tag-value { 264 .tag-value {
268 color: #888; 265 color: #888;
269 } 266 }
270 - td i {
271 - color: #888;
272 - }
273 tr:last-child td { 267 tr:last-child td {
274 border-bottom: none; 268 border-bottom: none;
275 } 269 }
......
...@@ -4,14 +4,20 @@ ...@@ -4,14 +4,20 @@
4 4
5 @if(count($page->tags) > 0) 5 @if(count($page->tags) > 0)
6 <div class="tag-display float right"> 6 <div class="tag-display float right">
7 - <div class="heading primary-background-light">Page Tags</div>
8 <table> 7 <table>
9 - @foreach($page->tags as $tag) 8 + <thead>
10 - <tr class="tag"> 9 + <tr class="text-left heading primary-background-light">
11 - <td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td> 10 + <th colspan="2">Page Tags</th>
12 - @if($tag->value) <td class="tag-value"><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}">{{$tag->value}}</a></td> @endif
13 </tr> 11 </tr>
14 - @endforeach 12 + </thead>
13 + <tbody>
14 + @foreach($page->tags as $tag)
15 + <tr class="tag">
16 + <td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td>
17 + @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
18 + </tr>
19 + @endforeach
20 + </tbody>
15 </table> 21 </table>
16 </div> 22 </div>
17 @endif 23 @endif
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
3 @section('head') 3 @section('head')
4 <style> 4 <style>
5 body { 5 body {
6 - font-size: 15px; 6 + font-size: 14px;
7 - line-height: 1; 7 + line-height: 1.2;
8 } 8 }
9 9
10 h1, h2, h3, h4, h5, h6 { 10 h1, h2, h3, h4, h5, h6 {
11 - line-height: 1; 11 + line-height: 1.2;
12 } 12 }
13 13
14 table { 14 table {
...@@ -21,10 +21,21 @@ ...@@ -21,10 +21,21 @@
21 width: auto !important; 21 width: auto !important;
22 } 22 }
23 23
24 + .page-content .float {
25 + float: none !important;
26 + }
27 +
24 .page-content img.align-left, .page-content img.align-right { 28 .page-content img.align-left, .page-content img.align-right {
25 float: none !important; 29 float: none !important;
26 clear: both; 30 clear: both;
27 display: block; 31 display: block;
28 } 32 }
33 +
34 + .tag-display {
35 + min-width: 0;
36 + max-width: none;
37 + display: none;
38 + }
39 +
29 </style> 40 </style>
30 @stop 41 @stop
...\ No newline at end of file ...\ No newline at end of file
......