mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-07-07 20:02:40 +00:00
parent
b51ede2372
commit
6a4b020dd8
|
@ -19,6 +19,7 @@ body {
|
||||||
font-family: 'DejaVu Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Roboto", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
font-family: 'DejaVu Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Roboto", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
|
|
|
@ -1,33 +1,16 @@
|
||||||
<div class="entity-meta">
|
<div class="entity-meta">
|
||||||
@if($entity->isA('revision'))
|
|
||||||
@icon('history'){{ trans('entities.pages_revision') }}
|
|
||||||
{{ trans('entities.pages_revisions_number') }}{{ $entity->revision_number == 0 ? '' : $entity->revision_number }}
|
|
||||||
<br>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($entity->isA('page'))
|
@if ($entity->isA('page'))
|
||||||
@if (userCan('page-update', $entity)) <a href="{{ $entity->getUrl('/revisions') }}"> @endif
|
|
||||||
@icon('history'){{ trans('entities.meta_revision', ['revisionCount' => $entity->revision_count]) }} <br>
|
@icon('history'){{ trans('entities.meta_revision', ['revisionCount' => $entity->revision_count]) }} <br>
|
||||||
@if (userCan('page-update', $entity))</a>@endif
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($entity->createdBy)
|
|
||||||
@icon('star'){!! trans('entities.meta_created_name', [
|
|
||||||
'timeLength' => '<span>'.$entity->created_at->toDayDateTimeString() . '</span>',
|
|
||||||
'user' => "<a href='{$entity->createdBy->getProfileUrl()}'>".htmlentities($entity->createdBy->name). "</a>"
|
|
||||||
]) !!}
|
|
||||||
@else
|
|
||||||
@icon('star')<span>{{ trans('entities.meta_created', ['timeLength' => $entity->created_at->toDayDateTimeString()]) }}</span>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@icon('star'){!! trans('entities.meta_created' . ($entity->createdBy ? '_name' : ''), [
|
||||||
|
'timeLength' => $entity->created_at->toDayDateTimeString(),
|
||||||
|
'user' => htmlentities($entity->createdBy->name),
|
||||||
|
]) !!}
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@if ($entity->updatedBy)
|
@icon('edit'){!! trans('entities.meta_updated' . ($entity->updatedBy ? '_name' : ''), [
|
||||||
@icon('edit'){!! trans('entities.meta_updated_name', [
|
'timeLength' => $entity->updated_at->toDayDateTimeString(),
|
||||||
'timeLength' => '<span>' . $entity->updated_at->toDayDateTimeString() .'</span>',
|
'user' => htmlentities($entity->updatedBy->name)
|
||||||
'user' => "<a href='{$entity->updatedBy->getProfileUrl()}'>".htmlentities($entity->updatedBy->name). "</a>"
|
]) !!}
|
||||||
]) !!}
|
|
||||||
@elseif (!$entity->isA('revision'))
|
|
||||||
@icon('edit')<span>{{ trans('entities.meta_updated', ['timeLength' => $entity->updated_at->toDayDateTimeString()]) }}</span>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
|
@ -1,6 +1,5 @@
|
||||||
<?php namespace Tests\Entity;
|
<?php namespace Tests\Entity;
|
||||||
|
|
||||||
|
|
||||||
use BookStack\Entities\Models\Chapter;
|
use BookStack\Entities\Models\Chapter;
|
||||||
use BookStack\Entities\Models\Page;
|
use BookStack\Entities\Models\Page;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
@ -151,6 +150,16 @@ class ExportTest extends TestCase
|
||||||
$resp->assertDontSee($page->updated_at->diffForHumans());
|
$resp->assertDontSee($page->updated_at->diffForHumans());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_page_export_does_not_include_user_or_revision_links()
|
||||||
|
{
|
||||||
|
$page = Page::first();
|
||||||
|
|
||||||
|
$resp = $this->asEditor()->get($page->getUrl('/export/html'));
|
||||||
|
$resp->assertDontSee($page->getUrl('/revisions'));
|
||||||
|
$resp->assertDontSee($page->createdBy->getProfileUrl());
|
||||||
|
$resp->assertSee($page->createdBy->name);
|
||||||
|
}
|
||||||
|
|
||||||
public function test_page_export_sets_right_data_type_for_svg_embeds()
|
public function test_page_export_sets_right_data_type_for_svg_embeds()
|
||||||
{
|
{
|
||||||
$page = Page::first();
|
$page = Page::first();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user