Skip to content

Commit 4b1d08b

Browse files
committed
Merge branch 'v0.11' into release
2 parents 160fa99 + f8a299c commit 4b1d08b

File tree

7 files changed

+45
-24
lines changed

7 files changed

+45
-24
lines changed

app/Http/Controllers/Auth/AuthController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ protected function authenticated(Request $request, Authenticatable $user)
145145
auth()->login($user);
146146
}
147147

148-
return redirect()->intended($this->redirectPath());
148+
$path = session()->pull('url.intended', '/');
149+
$path = baseUrl($path, true);
150+
return redirect($path);
149151
}
150152

151153
/**

app/Http/Middleware/Authenticate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function handle($request, Closure $next)
4040
if ($request->ajax()) {
4141
return response('Unauthorized.', 401);
4242
} else {
43-
return redirect()->guest('/login');
43+
return redirect()->guest(baseUrl('/login'));
4444
}
4545
}
4646

app/Services/SocialAuthService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public function detachSocialAccount($socialDriver)
215215
{
216216
session();
217217
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');
219219
return redirect(auth()->user()->getEditUrl());
220220
}
221221

app/helpers.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,21 @@ function setting($key, $default = false)
6464

6565
/**
6666
* Helper to create url's relative to the applications root path.
67-
* @param $path
67+
* @param string $path
68+
* @param bool $forceAppDomain
6869
* @return string
6970
*/
70-
function baseUrl($path)
71+
function baseUrl($path, $forceAppDomain = false)
7172
{
72-
if (strpos($path, 'http') === 0) return $path;
73+
$isFullUrl = strpos($path, 'http') === 0;
74+
if ($isFullUrl && !$forceAppDomain) return $path;
7375
$path = trim($path, '/');
76+
77+
if ($isFullUrl && $forceAppDomain) {
78+
$explodedPath = explode('/', $path);
79+
$path = implode('/', array_splice($explodedPath, 3));
80+
}
81+
7482
return rtrim(config('app.url'), '/') . '/' . $path;
7583
}
7684

resources/assets/sass/_pages.scss

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,10 @@
250250
margin: 0;
251251
padding: 0;
252252
}
253-
span {
254-
color: #666;
255-
margin-left: $-s;
256-
}
257-
.heading {
253+
.heading th {
258254
padding: $-xs $-s;
259-
color: #444;
255+
color: #333;
256+
font-weight: 400;
260257
}
261258
td {
262259
border: 0;
@@ -267,9 +264,6 @@
267264
.tag-value {
268265
color: #888;
269266
}
270-
td i {
271-
color: #888;
272-
}
273267
tr:last-child td {
274268
border-bottom: none;
275269
}

resources/views/pages/page-display.blade.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@
44

55
@if(count($page->tags) > 0)
66
<div class="tag-display float right">
7-
<div class="heading primary-background-light">Page Tags</div>
87
<table>
9-
@foreach($page->tags as $tag)
10-
<tr class="tag">
11-
<td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td>
12-
@if($tag->value) <td class="tag-value"><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}">{{$tag->value}}</a></td> @endif
8+
<thead>
9+
<tr class="text-left heading primary-background-light">
10+
<th colspan="2">Page Tags</th>
1311
</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>
1521
</table>
1622
</div>
1723
@endif

resources/views/pages/pdf.blade.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
@section('head')
44
<style>
55
body {
6-
font-size: 15px;
7-
line-height: 1;
6+
font-size: 14px;
7+
line-height: 1.2;
88
}
99
1010
h1, h2, h3, h4, h5, h6 {
11-
line-height: 1;
11+
line-height: 1.2;
1212
}
1313
1414
table {
@@ -21,10 +21,21 @@
2121
width: auto !important;
2222
}
2323
24+
.page-content .float {
25+
float: none !important;
26+
}
27+
2428
.page-content img.align-left, .page-content img.align-right {
2529
float: none !important;
2630
clear: both;
2731
display: block;
2832
}
33+
34+
.tag-display {
35+
min-width: 0;
36+
max-width: none;
37+
display: none;
38+
}
39+
2940
</style>
3041
@stop

0 commit comments

Comments
 (0)