1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Added plaintext & basic PDF page Export

This commit is contained in:
Dan Brown
2016-01-31 17:53:30 +00:00
parent ea2e16cabb
commit 080acf0a62
14 changed files with 602 additions and 94 deletions

View File

@@ -0,0 +1,33 @@
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{{ $page->name }}</title>
<style>
{!! $css !!}
</style>
@yield('head')
</head>
<body>
<div class="container" id="page-show">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="page-content">
@include('pages/page-display')
<hr>
<p class="text-muted small">
Created {{$page->created_at->toDayDateTimeString()}} @if($page->createdBy) by {{$page->createdBy->name}} @endif
<br>
Last Updated {{$page->updated_at->toDayDateTimeString()}} @if($page->updatedBy) by {{$page->updatedBy->name}} @endif
</p>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,32 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{ $page->name }}</title>
@extends('pages/export')
@section('head')
<style>
{!! $css !!}
body {
font-size: 15px;
line-height: 1;
}
h1, h2, h3, h4, h5, h6 {
line-height: 1;
}
table {
max-width: 800px !important;
font-size: 0.8em;
width: auto !important;
}
table td {
width: auto !important;
}
</style>
</head>
<body>
<div class="container" id="page-show" ng-non-bindable>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="page-content">
@include('pages/page-display')
<hr>
<p class="text-muted small">
Created {{$page->created_at->diffForHumans()}} @if($page->createdBy) by {{$page->createdBy->name}} @endif
<br>
Last Updated {{$page->updated_at->diffForHumans()}} @if($page->updatedBy) by {{$page->updatedBy->name}} @endif
</p>
</div>
</div>
</div>
</div>
</body>
</html>
@stop

View File

@@ -20,9 +20,11 @@
<div class="col-sm-6 faded">
<div class="action-buttons">
<span dropdown class="dropdown-container">
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>Export Page</div>
<ul>
<li><a href="{{$page->getUrl() . '/export/html'}}" target="_blank">Contained HTML File</a></li>
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>Export</div>
<ul class="wide">
<li><a href="{{$page->getUrl() . '/export/html'}}" target="_blank">Contained Web File <span class="text-muted pull-right">.html</span></a></li>
<li><a href="{{$page->getUrl() . '/export/pdf'}}" target="_blank">PDF File <span class="text-muted pull-right">.pdf</span></a></li>
<li><a href="{{$page->getUrl() . '/export/plaintext'}}" target="_blank">Plain Text File <span class="text-muted pull-right">.txt</span></a></li>
</ul>
</span>
@if($currentUser->can('page-update'))