Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2016-08-21 15:02:37 +0100
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Commit
96c074bb5620565df1da27551d70fe6214218034
96c074bb
2 parents
f8ad8202
f8a299ca
Merge fixes from branch 'v0.11'
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
23 deletions
app/Http/Controllers/Auth/AuthController.php
app/Services/SocialAuthService.php
app/helpers.php
resources/assets/sass/_pages.scss
resources/views/pages/page-display.blade.php
resources/views/pages/pdf.blade.php
app/Http/Controllers/Auth/AuthController.php
View file @
96c074b
...
...
@@ -145,7 +145,9 @@ class AuthController extends Controller
auth
()
->
login
(
$user
);
}
return
redirect
()
->
intended
(
$this
->
redirectPath
());
$path
=
session
()
->
pull
(
'url.intended'
,
'/'
);
$path
=
baseUrl
(
$path
,
true
);
return
redirect
(
$path
);
}
/**
...
...
app/Services/SocialAuthService.php
View file @
96c074b
...
...
@@ -215,7 +215,7 @@ class SocialAuthService
{
session
();
auth
()
->
user
()
->
socialAccounts
()
->
where
(
'driver'
,
'='
,
$socialDriver
)
->
delete
();
\Session
::
flash
(
'success'
,
$socialDriver
.
' account successfully detached'
);
session
()
->
flash
(
'success'
,
title_case
(
$socialDriver
)
.
' account successfully detached'
);
return
redirect
(
auth
()
->
user
()
->
getEditUrl
());
}
...
...
app/helpers.php
View file @
96c074b
...
...
@@ -64,13 +64,21 @@ function setting($key, $default = false)
/**
* Helper to create url's relative to the applications root path.
* @param $path
* @param string $path
* @param bool $forceAppDomain
* @return string
*/
function
baseUrl
(
$path
)
function
baseUrl
(
$path
,
$forceAppDomain
=
false
)
{
if
(
strpos
(
$path
,
'http'
)
===
0
)
return
$path
;
$isFullUrl
=
strpos
(
$path
,
'http'
)
===
0
;
if
(
$isFullUrl
&&
!
$forceAppDomain
)
return
$path
;
$path
=
trim
(
$path
,
'/'
);
if
(
$isFullUrl
&&
$forceAppDomain
)
{
$explodedPath
=
explode
(
'/'
,
$path
);
$path
=
implode
(
'/'
,
array_splice
(
$explodedPath
,
3
));
}
return
rtrim
(
config
(
'app.url'
),
'/'
)
.
'/'
.
$path
;
}
...
...
resources/assets/sass/_pages.scss
View file @
96c074b
...
...
@@ -250,13 +250,10 @@
margin
:
0
;
padding
:
0
;
}
span
{
color
:
#666
;
margin-left
:
$-s
;
}
.heading
{
.heading
th
{
padding
:
$-xs
$-s
;
color
:
#444
;
color
:
#333
;
font-weight
:
400
;
}
td
{
border
:
0
;
...
...
@@ -267,9 +264,6 @@
.tag-value
{
color
:
#888
;
}
td
i
{
color
:
#888
;
}
tr
:last-child
td
{
border-bottom
:
none
;
}
...
...
resources/views/pages/page-display.blade.php
View file @
96c074b
...
...
@@ -4,14 +4,20 @@
@if(count($page->tags) > 0)
<div
class=
"tag-display float right"
>
<div
class=
"heading primary-background-light"
>
Page Tags
</div>
<table>
@foreach($page->tags as $tag)
<tr
class=
"tag"
>
<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=
"{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}"
>
{{$tag->value}}
</a></td>
@endif
<thead>
<tr
class=
"text-left heading primary-background-light"
>
<th
colspan=
"2"
>
Page Tags
</th>
</tr>
@endforeach
</thead>
<tbody>
@foreach($page->tags as $tag)
<tr
class=
"tag"
>
<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=
"{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}"
>
{{$tag->value}}
</a></td>
@endif
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
...
...
resources/views/pages/pdf.blade.php
View file @
96c074b
...
...
@@ -3,12 +3,12 @@
@section('head')
<style>
body
{
font-size
:
1
5
px
;
line-height
:
1
;
font-size
:
1
4
px
;
line-height
:
1
.2
;
}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
line-height
:
1
;
line-height
:
1
.2
;
}
table
{
...
...
@@ -21,10 +21,21 @@
width
:
auto
!important
;
}
.page-content
.float
{
float
:
none
!important
;
}
.page-content
img
.align-left
,
.page-content
img
.align-right
{
float
:
none
!important
;
clear
:
both
;
display
:
block
;
}
.tag-display
{
min-width
:
0
;
max-width
:
none
;
display
:
none
;
}
</style>
@stop
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment