Initial import

This commit is contained in:
2026-01-18 00:53:18 +00:00
parent fb78291fb1
commit 940191502e
115 changed files with 15524 additions and 0 deletions

8
views/404.blade.php Normal file
View File

@@ -0,0 +1,8 @@
@extends("layout.main")
@section("content")
<div class="text-center">
<h1>Page not found</h1>
<img src='/logo.png'>
<p>The page you were looking for could not be found. Maybe you should look for a different one instead.</p>
</div>
@endsection

94
views/account.blade.php Normal file
View File

@@ -0,0 +1,94 @@
@extends("layout.main")
@section("content")
<ul class="nav nav-tabs mt-3 mb-2">
<li class="nav-item">
@if ($tab == "account")
<a class="nav-link active" aria-current="page" href="#">Account</a>
@else
<a class="nav-link" aria-current="page" href="/account">Account</a>
@endif
</li>
<li class="nav-item">
@if ($tab == "data")
<a class="nav-link active" aria-current="page" href="#">Data</a>
@else
<a class="nav-link" aria-current="page" href="/account/data">Data</a>
@endif
</li>
</ul>
@if ($tab == "account")
<div class="row">
<div class="col-12 col-lg-3"></div>
<div class="col-12 col-lg-6">
<h5>Change Password</h5>
<form action='/account/chpass' method="POST">
<div class="input-group">
<span class="input-group-text w-25">Current password</span>
<input class="form-control" name="current" type="password">
</div>
<div class="input-group">
<span class="input-group-text w-25">New password</span>
<input class="form-control" name="pass1" type="password">
</div>
<div class="input-group">
<span class="input-group-text w-25">Confirm password</span>
<input class="form-control w-50" name="pass2" type="password">
<input class="form-control w-25 btn btn-primary" type="submit" value="Change">
</div>
</form>
</div>
<div class="col-12 col-lg-3"></div>
</div>
@endif
@if ($tab == "data")
<p>Here is a list of all the data associated with your current session.</p>
<table class="table">
<thead>
<tr>
<th>Key</th>
<th>Data</th>
</tr>
</thead>
<tbody>
@foreach ($session as $k=>$v)
<tr>
<td>{{ $k }}</td>
<td>{{ json_encode($v) }}</td>
</tr>
@endforeach
</tbody>
</table>
<p>And here is the contents of your user's database record.</p>
<table class="table">
<thead>
<tr>
<th>Key</th>
<th>Data</th>
</tr>
</thead>
<tbody>
@foreach ($user->_data as $k=>$v)
<tr>
<td>{{ $k }}</td>
<td>{{ json_encode($v) }}</td>
</tr>
@endforeach
</tbody>
</table>
<p>And that's it. That's the sum total of the data we currently store.</p>
@endif
@endsection

137
views/document.blade.php Normal file
View File

@@ -0,0 +1,137 @@
@extends("layout.main")
@section("content")
@if (Auth::can_moderate())
<jobdisplay source="document:{{ $doc->id }}"></jobdisplay>
@endif
<h1 class="text-center">{{ $doc->title }}</h1>
<h2 class="text-center">{{ $doc->subtitle }}</h2>
<h3 class="text-center">{{ $doc->subsubtitle }}</h3>
<div class="row" id="droppable">
<div class="col-lg-6 col-12">
@if (Auth::can_moderate())
<div class="btn-group">
<documentedit docid="{{ $doc->id }}"></documentedit>
<a href="/upload/attachment/{{ $doc->id }}" class="btn btn-primary" title="Upload attachment"><i class="fa-solid fa-file-arrow-up"></i></a>
<a href="/overview/create/{{ $doc->id }}" class="btn btn-primary" title="Create Overview with AI"><i class="fa-solid fa-wand-magic-sparkles"></i></a>
<a href="/merge/{{ $doc->id }}" class="btn btn-primary" title="Merge Revisions"><i class="fa fa-link"></i></a>
<a href="/explode/{{ $doc->id }}" class="btn btn-primary" title="Separate Revisions"><i class="fa fa-unlink"></i></a>
</div>
@endif
<h5 class="text-center">Order Number: {{ $doc->internal_id }}</h5>
@if (Auth::can_moderate())
<table class="table">
<tbody>
@foreach ($doc->metadata as $meta)
@php
$meta->load("metadata");
@endphp
<tr>
<td class="w-25">{{ $meta->metadata->name }}</td>
<td class="w-75"><inlineedit value="{{ $meta->data }}" url="/api/document/{{ $doc->id }}/metadata/{{ $meta->metadata->id }}" field="data"/></td>
<td style="width: 0"><a class="btn btn-danger px-1 py-0" href="/document/{{ $doc->id }}/metadata/{{ $meta->metadata->id }}/delete">
<i class="fa fa-trash"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<itemadder list="/api/document/{{ $doc->id }}/available_metadata" target="/api/document/{{ $doc->id }}/metadata" method="PUT"></itemadder>
@else
<table class="table">
<tbody>
@foreach ($doc->metadata as $meta)
@php
$meta->load("metadata");
@endphp
<tr>
<td class="w-25">{{ $meta->metadata->name }}</td>
<td class="w-75">{{ $meta->data }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
<hr/>
@if ($doc->attachments->count() > 0)
<h5>Attachments</h5>
<table class="table w-100">
<thead>
<th>Filename</th>
<th>Size</th>
</thead>
<tbody>
@foreach ($doc->attachments as $f)
<tr>
<td><a href='/attachment/{{$doc->id}}/{{$f->basename()}}'>{{ $f->basename() }}</a></td>
<td>{{ $f->size() }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
<ul class="list-group">
@foreach ($doc->products as $prod)
<li class="list-group-item">
@if (Auth::can_moderate())
<a class="btn btn-danger px-1 py-0" href='/del_docproduct/{{$doc->id}}/{{$prod->id}}'>
<i class="fa fa-close"></i>
</a>
<a class="btn w-90 text-start" href='/documents/{{ $prod->id }}'>
{{ $prod->full_path }}
</a>
@else
<a class="btn w-100 text-start" href='/documents/{{ $prod->id }}'>
{{ $prod->full_path }}
</a>
@endif
</li>
@endforeach
</ul>
@if ($doc->overview)
<div class="overflow-y-auto p-3">
{!! $doc->overview_md() !!}
</div>
@endif
</div>
<div class="col-lg-6 col-12">
<div class="row">
@foreach ($doc->revisions as $rev)
@component("thumbnail-50", ["rev" => $rev])
@endcomponent
@endforeach
</div>
</div>
@if (count($doc->related) > 0)
<div class="col-12">
<h5>Related Documents</h5>
<table class="table">
@foreach ($doc->related as $r)
<tr>
<td>
<a href='/document/{{ $r->id }}'>
<strong>{{ $r->title }}</strong>
{{ $r->subtitle }}
<small>{{ $r->subsubtitle }}</small>
</a>
</td>
<td>
<a href='/document/{{ $r->id }}'>
{{ $r->internal_id }}
</a>
</td>
</tr>
@endforeach
</table>
</div>
@endif
</div>
@endsection

140
views/documents.blade.php Executable file
View File

@@ -0,0 +1,140 @@
@extends("layout.main")
@section("content")
<div class="my-4 btn-group">
@foreach ($product->get_tree() as $p)
<a href='/documents/{{ $p->id }}' class="btn btn-secondary"><strong>{{ $p->title }}</strong></a>
@endforeach
</div>
<a href='<?php print($product->refurl) ?>'><?php print($product->refurl) ?></a><br/>
@if (Auth::can_moderate())
<inlineedittext url='/api/product/{{$product->id}}' field='overview'>{{ $product->overview }}</inlineedittext>
@else
@if ($product->overview != "")
<div class="blockquote">
{!! $product->overview_md() !!}
</div>
@endif
@endif
<table class="table table-hover">
@if (Auth::can_moderate())
<tr>
<td colspan="{{ 3 + count($product->meta()) }}">
<div class="w-100 text-end">
<productcontrols pid="{{ $product->id }}"></productcontrols>
</div>
</td>
</tr>
@endif
<tr>
<th></th>
<th>Title</th>
@foreach ($product->meta() as $m)
<th class="fit">{{ MetaType::name($m) }}</th>
@endforeach
<th>Order No</th>
</tr>
@if ($product->parent != null)
<tr>
<td class="fit"><a class="btn" href='/documents/{{ $product->parent->id }}'><i class="fa fa-level-up" aria-hidden="true"></a></td>
@if (Auth::can_moderate())
<td class="w-100" colspan="{{ 2 + count($product->meta()) }}">
<dddiv droppable="true" object_id="{{$product->parent->id}}" object_type="product" callback="/api/document/dragdrop">
<a class="btn w-100 text-start" href='/documents/{{ $product->parent->id }}'>Parent</a>
</dddiv>
</td>
@else
<td class="w-100" colspan="{{ 2 + count($product->meta()) }}"><a class="btn w-100 text-start" href='/documents/{{ $product->parent->id }}'>Parent</a></td>
@endif
</tr>
@endif
@foreach ($product->children as $child)
<tr>
<td class="fit"><a class="btn" href='/documents/{{ $child->id }}'>
@if ($child->title == "Trash")
<i class="fa fa-trash" aria-hidden="true"></i>
@else
<i class="fa fa-folder" aria-hidden="true"></i>
@endif
</a></td>
@if (Auth::can_moderate())
<td class="w-100">
<dddiv draggable="true" droppable="true" object_id="{{ $child->id }}" object_type="product" callback="/api/document/dragdrop">
<a class="btn w-100 text-start" href='/documents/{{$child->id}}' >
{{$child->title}}
</a>
</dddiv>
</td>
@else
<td class="w-100"><a class="btn w-100 text-start" href='/documents/{{$child->id}}'>{{$child->title}}</a></td>
@endif
<td colspan="{{ 1 + count($product->meta()) }}" class="fit"></td>
</tr>
@endforeach
@foreach ($product->documents_sorted_by_meta() as $doc)
<tr>
<td class="fit">
@if ($doc->attachments->count() > 0)
<a class="btn" href='/document/{{$doc->id}}'><i class="fa fa-file-arrow-down text-success" aria-hidden="true"></i></a>
@else
<a class="btn" href='/document/{{$doc->id}}'><i class="fa fa-file-text" aria-hidden="true"></i></a>
@endif
</td>
<td class="w-100">
@if (Auth::can_moderate())
<dddiv draggable="true" droppable="true" object_id="{{$doc->id}}" object_type="document" extra_data="{{$product->id}}" callback="/api/document/dragdrop">
<a class="btn w-100 text-start" href='/document/{{$doc->id}}'>
<strong>{{$doc->title}}</strong>
{{$doc->subtitle}}
<small>{{$doc->subsubtitle}}</small>
@if ($doc->overview)
<small><i title="{{ $doc->overview }}" class="ms-1 fa-solid fa-paragraph"></i></small>
@endif
</a>
</dddiv>
@else
<a class="btn w-100 text-start" href='/document/{{$doc->id}}'>
<strong>{{$doc->title}}</strong>
{{$doc->subtitle}}
<small>{{$doc->subsubtitle}}</small>
@if ($doc->overview)
<small><i title="{{ $doc->overview }}" class="ms-1 fa-solid fa-paragraph"></i></small>
@endif
</a>
@endif
</td>
@foreach ($product->meta() as $m)
<td class="fit">
<a draggable="true" object_id="{{$doc->id}}" pid_from="{{$product->id}}" class="btn" href='/document/{{$doc->id}}'>
{{ $doc->get_metadata_by_id($m) }}
</a>
</td>
@endforeach
<td class="fit">
<a draggable="true" object_id="{{$doc->id}}" pid_from="{{$product->id}}" class="btn" href='/document/{{$doc->id}}'>
{{ $doc->internal_id }}
</a>
</td>
</tr>
@endforeach
</table>
<div class="text-center">
<small>
<i>
{{ count($product->documents) }} documents
</i>
</small>
</div>
@endsection

View File

@@ -0,0 +1,4 @@
@extends("layout.main")
@section("content")
<downloadmanager></downloadmanager>
@endsection

View File

@@ -0,0 +1,4 @@
<div class="mb-3">
<label for="{{$name}}" class="form-label">{{$title}}</label>
<input class="form-control" id="{{$name}}" type="text" name="{{$name}}" value="{{$value}}" {{$attrs}}>
</div>

View File

@@ -0,0 +1,4 @@
<div class="mb-3">
<label for="{{$name}}" class="form-label">{{$title}}</label>
<input class="form-control" id="{{$name}}" type="password" name="{{$name}}" value="{{$value}}" {{$attrs}}>
</div>

View File

@@ -0,0 +1,5 @@
<div class="mb-3 text-end">
<input class="btn btn-primary" type="submit" value="{{$title}}" {{$attrs}}>
</div>

4
views/idmatch.blade.php Normal file
View File

@@ -0,0 +1,4 @@
@extends("layout.main")
@section("content")
<idmatch></idmatch>
@endsection

4
views/imports.blade.php Normal file
View File

@@ -0,0 +1,4 @@
@extends("layout.main")
@section("content")
<imports></imports>
@endsection

46
views/index.blade.php Normal file
View File

@@ -0,0 +1,46 @@
@extends('layout.main')
@section('content')
<p class="mt-3">Welcome to <i><b>DECPDF</b></i>, the searchable and organised repository of
Digital Equipment Corporation (DEC) documentation, gathering together documents
and manuals from around the internet and from users' personal archives.</p>
<p>We have strived to arrange the content of this site in a logical order
so that it finally becomes easy to locate the documentation for your device
or system that you need - be it a PDP-11 computer, or an obscure feature
of VMS. It should all be there at your fingertips.</p>
<p>Do you have a document that we don't? Are we missing some vital information
that you could provide us with? Then register for an account and request
upload permissions, and you can help us to build the ultimate repository
of DEC documentation.</p>
<h3>FAQ</h3>
<h5>Why do some documents have &quot;Original&quot; and &quot;OCR&quot; versions?</h5>
<p>When a new document is uploaded it is tested to see if it has had OCR run on it
already. If it has, we use that OCR data for our indexing. If it hasn't, we automatically
run OCR on the document. This creates a new version of the document, the OCR version.
We keep the original alongside the new OCR version and give you the choice of which
version to download.</p>
<h5>I have a different copy of a document you already have. Can I upload it?</h5>
<p>Absolutely. Document revisions with the same main document ID code will be grouped together
within the document on the website. We actively seek out other versions of documents, or
even other scans of existing revisions of documents, to try and make the archive as complete
as possible.</p>
<h5>What's the Order Number and Revision when I upload?</h5>
<p>The order number is DEC's internal document reference ID. It is typically of the format
XX-YYYYY-ZZ-RRR, for example EK-3K370-TR-001. The first three sections are the document
ID and the last section is the document revision. When you upload please split the document
ID from the revision and enter them into the two separate boxes. That way the different
revisions of the same document are properly grouped together. Note that not all documents
(especially field maintenance print sets) use this format of document IDs, and not all documents
even have an ID. In this case, just enter what you can in the document ID and leave the
revision either empty or set to 000 (which indicates it's the original unrevised version).
If there is no document ID then leave the Order Number blank. A new document ID will be
generated as a placeholder for internal use.</p>
<h5>Will you ever host binary files like disk images and software?</h5>
<p>No. That opens up a whole other kettle of worms, alongside a can of fish as well.</p>
@endsection

120
views/layout/main.blade.php Normal file
View File

@@ -0,0 +1,120 @@
<!doctype html>
<html lang="en" data-bs-theme="dark">
<head>
<title>Digital PDFs</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="/manifest.webmanifest">
<script src="/app.js"></script>
</head>
<body>
<div id="app" class="container">
<nav class="navbar navbar-expand-lg bg-body-tertiary w-100">
<div class="container">
<div class="d-flex flex-row justify-content-between w-100">
<a class="d-none d-lg-inline navbar-brand" href='/'>Digital PDFs</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-1g-0">
<li class="nav-item">
<a class="nav-link" href='/documents'>Documents</a>
</li>
@if (Auth::can_moderate())
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Spider
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/spider_pdfs">Spidered PDFs</a></li>
<li><a class="dropdown-item" href="/spider_pages">Potential Sites</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
System
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/status">System Status</a></li>
<li><a class="dropdown-item" href="/idmatch">ID Matches</a></li>
</ul>
</li>
@endif
@if (Auth::logged_in())
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ get_user()->username }}
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/account">My Account</a></li>
<?php if (Auth::can_upload()) { ?>
<li><a class="dropdown-item" href="/upload">Upload PDF</a></li>
<li><a class="dropdown-item" href="/downloads">My Downloads</a></li>
<li><a class="dropdown-item" href="/imports">My Imports</a></li>
<?php } ?>
<li><hr></li>
<li><a class="dropdown-item text-danger" href="/logout">Log Out</a></li>
</ul>
</li>
@else
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Guest
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/register">Register</a></li>
<li><hr></li>
<li><a class="dropdown-item" href="/login">Log In</a></li>
</ul>
</li>
@endif
</ul>
</div>
<div>
<search/>
</div>
</div>
</div>
</nav>
<div class="container">
@if($flash_error)
<div class="my-2 alert alert-danger">{{ $flash_error }}</div>
@endif
@if($flash_warn)
<div class="my-2 alert alert-warning">{{ $flash_warn }}</div>
@endif
@if($flash_info)
<div class="my-2 alert alert-info">{{ $flash_info }}</div>
@endif
@if($flash_success)
<div class="my-2 alert alert-success">{{ $flash_success }}</div>
@endif
</div>
@yield('content')
<hr>
<nav class="navbar">
<ul class="navbar-nav">
<li class="nav-item"><a href='/' class="nav-link small p-0">Home</a></li>
</ul>
<ul class="navbar-nav">
<li class="nav-item"><a href='/privacy' class="nav-link small p-0">Privacy and Data</a></li>
</ul>
</nav>
<p class="text-center small text-secondary">Site structure and layout &copy;2025 Majenko Technologies</p>
</div>
</body>
</html>

4
views/loggedin.blade.php Normal file
View File

@@ -0,0 +1,4 @@
@extends("layout.main")
@section("content")
<h1>You are now logged in.</h1>
@endsection

19
views/login.blade.php Executable file
View File

@@ -0,0 +1,19 @@
@extends("layout.main")
@section("content")
<div class="row">
<div class="col-lg-4 col-12"></div>
<div class="col-lg-4 col-12 m-3">
<div class="card w-100 p-3">
<h5 class="card-title">Log In</h5>
<div class="card-body">
<form action="/login" method="POST">
{!!Form::input("Username or Email", "username", "")!!}
{!!Form::password("Password", "password", "")!!}
{!!Form::submit("Login")!!}
</form>
</div>
</div>
</div>
<div class="col-lg-4 col-12"></div>
</div>
@endsection

23
views/privacy.blade.php Normal file
View File

@@ -0,0 +1,23 @@
@extends("layout.main")
@section("content")
<h1>Privacy and Data</h1>
<h3>What cookies do you store?</h3>
<p>One. Just one cookie. That is all we put on your computer. That cookie is a simple randomly generated session ID.</p>
<h3>What is it used for?</h3>
<p>It is used to associate temporary runtime information about how you are using the site. Such things as which user ID you are
currently logged into the site as, or what you are currently searching for.</p>
<h3>How long do you keep that information?</h3>
<p>All information connected to your session is stored in a <i>memcached</i> database. This is a temporary data store which is never
written to disk. The data expires after a month if not used, or if the storage system should get restarted. In other words, it's
ephemeral and we don't store it past holding it in memory.</p>
<h3>What other data do you store about me?</h3>
<p>Only what you provide when you register for an account - username, email and password (which is hashed so cannot be seen by anyone, ever).</p>
<h3>Will you ever sell or otherwise pass on my data to someone else?</h3>
<p>No. Absolutely not. Since we don't really store any data of note, there's not really anything to sell, and even if there was we
wouldn't sell it anyway. Selling people's data is just scummy and evil, and we don't want to be scummy and evil.</p>
@endsection

21
views/register.blade.php Normal file
View File

@@ -0,0 +1,21 @@
@extends("layout.main")
@section("content")
<div class="row">
<div class="col-lg-4 col-12"></div>
<div class="col-lg-4 col-12 m-3">
<div class="card w-100 p-3">
<h5 class="card-title">Register</h5>
<div class="card-body">
<form action="/register" method="POST">
{!!Form::input("Username", "username", $username)!!}
{!!Form::input("Email", "email", $email)!!}
{!!Form::password("Password", "password", $password)!!}
{!!Form::password("Password Confirmation", "confirm", $confirm)!!}
{!!Form::submit("Register")!!}
</form>
</div>
</div>
</div>
<div class="col-lg-4 col-12"></div>
</div>
@endsection

99
views/revision.blade.php Normal file
View File

@@ -0,0 +1,99 @@
@extends("layout.main")
@section("content")
@if (Auth::can_moderate())
<jobdisplay source="revision:{{ $rev->id }}"></jobdisplay>
@endif
<pdf rev="{{ $rev->id }}"></pdf>
<div class="row">
@component("thumbnail", ["rev" => $rev])
@endcomponent
<div class="col-lg-9 col-12">
@if (Auth::can_moderate())
<div class="text-end btn-group">
<a class="btn btn-primary" href='/purge/revision/{{ $rev->id }}'><i class='fa fa-images'></i></a>
<a class="btn btn-primary" href='/redownload/revision/{{ $rev->id }}'><i class='fa fa-recycle'></i></a>
<a class="btn btn-danger" href='/delete/revision/{{ $rev->id }}'><i class='fa fa-trash'></i></a>
</div>
@endif
<table class="table">
@if ($rev->document)
<tr>
<td>
<b>Document:</b>
</td>
<td>
<a href='/document/{{ $rev->document->id }}'>
<strong>{{ $rev->document->title }}</strong>
{{ $rev->document->subtitle }}
<small>{{ $rev->document->subsubtitle }}</small>
</a>
</td>
</tr>
<tr>
<td>
<b>Order Number:</b>
</td>
<td>
{{ $rev->document->internal_id }}
</td>
</tr>
@endif
<tr>
<td>
<span class="my-auto align-middle"><b>Revision:</b></span>
</td>
<td>
@if (Auth::can_moderate())
<inlineedit value="{{ $rev->revno }}" url="/api/revision/{{ $rev->id }}" field="revno"/>
@else
{{ $rev->revno }}
@endif
</td>
</tr>
<tr>
<td>
<b>Pages:</b>
</td>
<td>
@isset ($rev->info->Pages)
{{ $rev->info->Pages }}
@else
Unknown
@endisset
</td>
</tr>
<tr>
<td>
<b>Original Filename:</b>
</td>
<td>
{{ $rev->origtitle }}
</td>
</tr>
</table>
@if (Auth::can_moderate())
<form action='/update_ocr_text/{{ $rev->id }}' method="POST">
@endif
<label for="body">OCR Text</label>
<textarea class="form-control w-100" rows=15 name="body"
@if (!Auth::can_moderate())
disabled
@endif
>{{ $rev->body }}</textarea>
@if (Auth::can_moderate())
{!! Form::submit("Update") !!}
</form>
@endif
</div>
</div>
@endsection

74
views/search.blade.php Normal file
View File

@@ -0,0 +1,74 @@
@extends("layout.main")
@section("content")
<nav>
<ul class="pagination justify-content-center my-2">
@if ($page > 0)
<!--keyboardinteraction keyname="p" target='/search/{{ $page - 1 }}' ></keyboardinteraction-->
<li class="page-item"><a class="page-link" href='/search/{{ $page - 1 }}'>Previous</a></li>
@else
<li class="page-item disabled"><a class="page-link" href='/search/{{ $page - 1 }}'>Previous</a></li>
@endif
@for ($i = -4; $i <= 4; $i++)
@if ((($page + $i) < ($pages)) && (($page + $i) >= 0))
@if ($i == 0)
<li class="page-item active"><a class="page-link" href='/search/{{ $page + $i }}'>{{ $page + $i + 1}}</a></li>
@else
<li class="page-item"><a class="page-link" href='/search/{{ $page + $i }}'>{{ $page + $i + 1}}</a></li>
@endif
@endif
@endfor
@if ($page < $pages - 1)
<li class="page-item"><a class="page-link" href='/search/{{ $page + 1 }}'>Next</a></li>
<!--keyboardinteraction keyname="n" target='/search/{{ $page + 1 }}'></keyboardinteraction-->
@else
<li class="page-item disabled"><a class="page-link" href='/search/{{ $page + 1 }}'>Next</a></li>
@endif
</ul>
</nav>
<div class="row">
@foreach ($results as $rev)
@if ($rev !== false)
@component("thumbnail_title", ["rev" => $rev])
@endcomponent
@endif
@endforeach
</div>
<nav>
<ul class="pagination justify-content-center my-2">
@if ($page > 0)
<li class="page-item"><a class="page-link" href='/search/{{ $page - 1 }}'>Previous</a></li>
@else
<li class="page-item disabled"><a class="page-link" href='/search/{{ $page - 1 }}'>Previous</a></li>
@endif
@for ($i = -4; $i <= 4; $i++)
@if ((($page + $i) < ($pages)) && (($page + $i) >= 0))
@if ($i == 0)
<li class="page-item active"><a class="page-link" href='/search/{{ $page + $i }}'>{{ $page + $i + 1}}</a></li>
@else
<li class="page-item"><a class="page-link" href='/search/{{ $page + $i }}'>{{ $page + $i + 1}}</a></li>
@endif
@endif
@endfor
@if ($page < $pages - 1)
<li class="page-item"><a class="page-link" href='/search/{{ $page + 1 }}'>Next</a></li>
@else
<li class="page-item disabled"><a class="page-link" href='/search/{{ $page + 1 }}'>Next</a></li>
@endif
</ul>
</nav>
@endsection

View File

@@ -0,0 +1,10 @@
<table class="table">
<tbody>
@foreach ($list as $k=>$v)
<tr>
<td>{{ $k }}</td>
<td class="text-end">{{ $v }}</td>
</tr>
@endforeach
</tbody>
</table>

View File

@@ -0,0 +1,4 @@
@extends("layout.main")
@section("content")
<spiderpages></spiderpages>
@endsection

View File

@@ -0,0 +1,4 @@
@extends("layout.main")
@section("content")
<pdflist></pdflist>
@endsection

27
views/status.blade.php Normal file
View File

@@ -0,0 +1,27 @@
@extends("layout.main")
@section("content")
<div class="row">
<div class="col-lg-3 col-12">
<h2 class="text-center">Spider</h2>
@component("simple_table", ["list" => $spider]);
@endcomponent
</div>
<div class="col-lg-3 col-12">
<h2 class="text-center">PDF URLs</h2>
@component("simple_table", ["list" => $pdf]);
@endcomponent
</div>
<div class="col-lg-3 col-12">
<h2 class="text-center">OCR</h2>
@component("simple_table", ["list" => $ocr]);
@endcomponent
</div>
<div class="col-lg-3 col-12">
<h2 class="text-center">Index</h2>
@component("simple_table", ["list" => $idx]);
@endcomponent
</div>
</div>
@endsection

View File

@@ -0,0 +1,75 @@
@php
$rev->load("document");
@endphp
<div class="card bg-body-secondary col-lg-6 col-12 p-0 mb-auto">
<a href='/revision/{{ $rev->id }}'>
<img class="card-img-top" src='{{ $rev->cover(320) }}'>
</a>
<div class="d-flex flex-column justify-content-between card-body h-100">
<div>
@if (($rev->revno != "") && ($rev->revno != "0"))
<h5 class="card-title text-center">
{{ $rev->document->internal_id }}-{{ $rev->revno }}
</h5>
@else
<h5 class="card-title text-center">
{{ $rev->document->internal_id }}
</h5>
@endif
</div>
<div>
<div class="row">
<div class="col">
<b>
{{ fmt_date($rev->month, $rev->year) }}
</b>
</div>
<div class="col">
@isset ($rev->info->Pages)
{{ $rev->info->Pages }} pages
@else
Number of pages unknown
@endisset
</div>
</div>
<div class="row">
<div class="col">
<b>
Original
</b>
</div>
<div class="col">
{{ format_size(stat($rev->path() . "/doc.pdf")["size"]) }}
</div>
</div>
<div class="btn-group w-100">
<a class="btn btn-primary w-50" href='/pdf/{{ $rev->id }}/view/{{ $rev->filename() }}'>
view
</a>
<a class="btn btn-secondary w-50" href='/pdf/{{ $rev->id }}/download/{{ $rev->filename() }}'>
download
</a>
</div>
@if (file_exists($rev->path() . "/ocr.pdf"))
<div class="row">
<div class="col">
<b>
OCR Version
</b>
</div>
<div class="col">
{{ format_size(stat($rev->path() . "/ocr.pdf")["size"]) }}
</div>
</div>
<div class="btn-group w-100">
<a class="btn btn-primary w-50" href='/pdf/{{ $rev->id }}/viewocr/{{ $rev->filename() }}'>
view
</a>
<a class="btn btn-secondary w-50" href='/pdf/{{ $rev->id }}/downloadocr/{{ $rev->filename() }}'>
download
</a>
</div>
@endif
</div>
</div>
</div>

77
views/thumbnail.blade.php Normal file
View File

@@ -0,0 +1,77 @@
@php
$rev->load("document");
@endphp
<div class="card bg-body-secondary col-lg-3 col-12 p-0 mb-auto">
<a href='/revision/{{ $rev->id }}'>
<img class="card-img-top" src='{{ $rev->cover(320) }}'>
</a>
<div class="d-flex flex-column justify-content-between card-body h-100">
@if ($rev->document)
<div>
@if (($rev->revno != "") && ($rev->revno != "0"))
<h5 class="card-title text-center">
{{ $rev->document->internal_id }}-{{ $rev->revno }}
</h5>
@else
<h5 class="card-title text-center">
{{ $rev->document->internal_id }}
</h5>
@endif
</div>
@endif
<div>
<div class="row">
<div class="col">
<b>
{{ fmt_date($rev->month, $rev->year) }}
</b>
</div>
<div class="col">
@isset ($rev->info->Pages)
{{ $rev->info->Pages }} pages
@else
Number of pages unknown
@endisset
</div>
</div>
<div class="row">
<div class="col">
<b>
Original
</b>
</div>
<div class="col">
{{ format_size(stat($rev->path() . "/doc.pdf")["size"]) }}
</div>
</div>
<div class="btn-group w-100">
<a class="btn btn-primary w-50" href='/pdf/{{ $rev->id }}/view/{{ $rev->filename() }}'>
view
</a>
<a class="btn btn-secondary w-50" href='/pdf/{{ $rev->id }}/download/{{ $rev->filename() }}'>
download
</a>
</div>
@if (file_exists($rev->path() . "/ocr.pdf"))
<div class="row">
<div class="col">
<b>
OCR Version
</b>
</div>
<div class="col">
{{ format_size(stat($rev->path() . "/ocr.pdf")["size"]) }}
</div>
</div>
<div class="btn-group w-100">
<a class="btn btn-primary w-50" href='/pdf/{{ $rev->id }}/viewocr/{{ $rev->filename() }}'>
view
</a>
<a class="btn btn-secondary w-50" href='/pdf/{{ $rev->id }}/downloadocr/{{ $rev->filename() }}'>
download
</a>
</div>
@endif
</div>
</div>
</div>

View File

@@ -0,0 +1,84 @@
@php
$rev->load("document");
@endphp
<div class="card bg-body-secondary col-lg-3 col-12 p-0">
<a href='/revision/{{ $rev->id }}'>
<img class="card-img-top" src='{{ $rev->cover(320) }}'>
</a>
<div class="d-flex flex-column justify-content-between card-body h-100">
<div>
@if (($rev->revno != "") && ($rev->revno != "0"))
<h5 class="card-title text-center">
{{ $rev->document->internal_id }}-{{ $rev->revno }}
</h5>
@else
<h5 class="card-title text-center">
{{ $rev->document->internal_id }}
</h5>
@endif
<div class="text-center"><strong>{{ $rev->document->title }}</strong></div>
@if ($rev->document->subtitle)
<div class="text-center">{{ $rev->document->subtitle }}</div>
@endif
@if ($rev->document->subsubtitle)
<div class="text-center"><small>{{ $rev->document->subsubtitle }}</small></div>
@endif
</div>
<div>
<div class="row">
<div class="col">
<b>
{{ fmt_date($rev->month, $rev->year) }}
</b>
</div>
<div class="col">
{{ $rev->info->Pages }} pages
</div>
</div>
<div class="row">
<div class="col">
<b>
Original
</b>
</div>
<div class="col">
{{ format_size(stat($rev->path() . "/doc.pdf")["size"]) }}
</div>
</div>
<div class="btn-group w-100">
<a class="btn btn-primary w-50" href='/pdf/{{ $rev->id }}/view/{{ $rev->filename() }}'>
view
</a>
<a class="btn btn-secondary w-50" href='/pdf/{{ $rev->id }}/download/{{ $rev->filename() }}'>
download
</a>
</div>
@if (file_exists($rev->path() . "/ocr.pdf"))
<div class="row">
<div class="col">
<b>
OCR Version
</b>
</div>
<div class="col">
{{ format_size(stat($rev->path() . "/ocr.pdf")["size"]) }}
</div>
</div>
<div class="btn-group w-100">
<a class="btn btn-primary w-50" href='/pdf/{{ $rev->id }}/viewocr/{{ $rev->filename() }}'>
view
</a>
<a class="btn btn-secondary w-50" href='/pdf/{{ $rev->id }}/downloadocr/{{ $rev->filename() }}'>
download
</a>
</div>
@endif
</div>
</div>
</div>

View File

@@ -0,0 +1,20 @@
@extends("layout.main")
@section("content")
<div class="row my-3">
<div class="col-xl-3"></div>
<div class="col-12 col-xl-6 text-center">
<form action="/upload/attachment/{{ $doc->id }}" method="POST" enctype="multipart/form-data">
<label id="drop-zone">
Drop files here, or click to upload. <br/>
<input type="file" id="file-input" multiple accept="*/*" name="file[]" />
</label>
<br/>
<input type="submit" class="btn btn-success" value="Upload"/>
</form>
</div>
<div class="col-xl-3"></div>
</div>
@endsection