Add bookmark exports and sharing + various fixes
This commit is contained in:
@ -1,19 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container py-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
@ -109,12 +93,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
45
app/plugins/bookmarks/views/components/shareListPanel.html
Normal file
45
app/plugins/bookmarks/views/components/shareListPanel.html
Normal file
@ -0,0 +1,45 @@
|
||||
{LOOP}
|
||||
<div class="col-xlg-6 col-lg-6 col-md-6 col-sm-6 bookmark-card">
|
||||
<div class="card m-3 accordion">
|
||||
<div class="accordion-item">
|
||||
<div class="card-header accordion-header bg-{color} context-main" data-bs-target="#Collapse{ID}" data-bs-toggle="collapse" aria-expanded="true" aria-controls="Collapse{ID}">
|
||||
{title}{privacyBadge}
|
||||
<a class="btn btn-sm btn-primary float-end" data-bs-toggle="modal" data-bs-target="#linkShare{ID}">
|
||||
<i class="fa fa-fw fa-share"></i>
|
||||
</a>
|
||||
<div class="modal fade" id="linkShare{ID}" tabindex="-1" style="display: none;" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="exampleModalCenteredScrollableTitle">Modal title</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="text" value="{SITE_URL}shared/folder/{uuid}" name="input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="Collapse{ID}" class="accordion-collapse collapse show" style="width:100%; position: relative;">
|
||||
<div class="card-body accordion-body context-other-bg p-2">
|
||||
<ul class="list-group">
|
||||
{bookmarkListRows}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-footer d-flex justify-content-center align-items-center context-main-bg">
|
||||
<span class="ms-auto">
|
||||
<a href="{ROOT_URL}bookmarks/bookmarks/{ID}" class="btn btn-sm btn-primary"><i class="fa fa-fw fa-list"></i></a>
|
||||
<a href="{ROOT_URL}bookmarks/folders/{ID}" class="btn btn-sm btn-primary"><i class="fa fa-fw fa-info-circle"></i></a></td>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<div class="col-xlg-6 col-lg-6 col-md-6 col-sm-6">
|
||||
<p>no folders</p>
|
||||
</div>
|
||||
{/ALT}
|
30
app/plugins/bookmarks/views/components/shareListRows.html
Normal file
30
app/plugins/bookmarks/views/components/shareListRows.html
Normal file
@ -0,0 +1,30 @@
|
||||
{LOOP}
|
||||
<li class="list-group-item mb-1 context-main-b bg-{color}">
|
||||
<a href="{ROOT_URL}bookmarks/bookmark/{ID}" class="context-main">{iconHtml}</a>
|
||||
<a href="{url}"> {title}</a>{privacyBadge}
|
||||
<span class="float-end">
|
||||
<a href="{ROOT_URL}bookmarks/retract/{ID}" class="btn btn-sm btn-success"><i class="fa fa-fw fa-eye"></i></a>
|
||||
<a class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#linkShare{ID}">
|
||||
<i class="fa fa-fw fa-share"></i>
|
||||
</a>
|
||||
<div class="modal fade" id="linkShare{ID}" tabindex="-1" style="display: none;" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="exampleModalCenteredScrollableTitle">Modal title</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="text" value="{SITE_URL}shared/link/{uuid}" name="input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</li>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<li class="list-group-item py-1">
|
||||
<p class="list-group text-center">No Bookmarks</p>
|
||||
</li>
|
||||
{/ALT}
|
48
app/plugins/bookmarks/views/export.html
Normal file
48
app/plugins/bookmarks/views/export.html
Normal file
@ -0,0 +1,48 @@
|
||||
<div class="mb-4 mt-4">
|
||||
<div class="offset-md-1 col-10 py-3 context-main-bg">
|
||||
<legend class="text-center">Bookmark Export</legend>
|
||||
<hr>
|
||||
<h3 class="text-center text-muted">Select which folders to include in the export.</h3>
|
||||
<div class="row g-3 col-4 offset-4" data-masonry='{ "percentPosition": false }' id="bookmarkSort">
|
||||
<form action="" method="post">
|
||||
<table class="table context-main">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center" style="width: 80%">Title</th>
|
||||
<th style="width: 20%">
|
||||
<input type="checkbox" onchange="checkAll(this)" name="check.g" value="BF_[]"/>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
<tr>
|
||||
<td class="text-center">Unsorted</td>
|
||||
<td>
|
||||
<input type="checkbox" value="unsorted" name="BF_[]">
|
||||
</td>
|
||||
</tr>
|
||||
{LOOP}
|
||||
<tr>
|
||||
<td class="text-center">{prettyTitle}</td>
|
||||
<td>
|
||||
<input type="checkbox" value="{ID}" name="BF_[]">
|
||||
</td>
|
||||
</tr>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<tr>
|
||||
<td class="text-center context-main" colspan="7">
|
||||
No Folders To Export
|
||||
</td>
|
||||
</tr>
|
||||
{/ALT}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p>Literally every browser is chromium based now, so they all have a standard import/export.</p>
|
||||
<button type="submit" name="submit" value="submit" class="btn btn-primary btn-lg">Create Export</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@ -1,8 +1,6 @@
|
||||
<div class="row">
|
||||
<div class="offset-md-2 col-8 py-3 context-main-bg mt-4">
|
||||
<div class="text-center">
|
||||
<legend class="">Folders List</legend>
|
||||
</div>
|
||||
{foldersList}
|
||||
<div class="offset-md-2 col-8 py-3 context-main-bg mt-4">
|
||||
<div class="text-center">
|
||||
<legend class="">Folders List</legend>
|
||||
</div>
|
||||
{foldersList}
|
||||
</div>
|
@ -1,13 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container py-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
@ -68,12 +58,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
@ -1,18 +1,15 @@
|
||||
<div class="col-4 offset-md-4 py-3">
|
||||
<legend class="">Import Bookmarks</legend>
|
||||
<form action="" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="bookmark_file" class="col-lg-3 control-label">Export file (.html):</label>
|
||||
<div class="col-lg-3">
|
||||
<div class="mb-4 mt-4">
|
||||
<div class="offset-md-1 col-10 py-3 context-main-bg">
|
||||
<legend class="text-center">Import Bookmarks</legend>
|
||||
<hr>
|
||||
<div class="offset-3 col-lg-6 my-4">
|
||||
<form action="" method="post" enctype="multipart/form-data" class="text-center">
|
||||
<label for="bookmark_file" class="col-lg-3 control-label">Import file (.html):</label>
|
||||
<input type="file" name="bookmark_file" id="bookmark_file" accept=".html">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="submit" class="col-lg-3 control-label"></label>
|
||||
<div class="col-lg-3">
|
||||
<button name="submit" value="submit" type="submit" class="btn btn-lg btn-primary center-block ">Import</button>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button type="submit" name="submit" value="submit" class="btn btn-primary btn-lg center-block">Import</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@ -2,5 +2,7 @@
|
||||
<li class="nav-item context-main-bg mx-1"><a href="{ROOT_URL}bookmarks/index/" class="nav-link">Dashboard</a></li>
|
||||
<li class="nav-item context-main-bg mx-1"><a href="{ROOT_URL}bookmarks/folders/" class="nav-link">Folders</a></li>
|
||||
<li class="nav-item context-main-bg mx-1"><a href="{ROOT_URL}bookmarks/import/" class="nav-link">Import</a></li>
|
||||
<li class="nav-item context-main-bg mx-1"><a href="{ROOT_URL}bookmarks/export/" class="nav-link">Export</a></li>
|
||||
<li class="nav-item context-main-bg mx-1"><a href="{ROOT_URL}bookmarks/share/" class="nav-link">Share</a></li>
|
||||
</ul>
|
||||
{userFolderTabs}
|
19
app/plugins/bookmarks/views/share.html
Normal file
19
app/plugins/bookmarks/views/share.html
Normal file
@ -0,0 +1,19 @@
|
||||
<div class="mb-4 mt-4">
|
||||
<div class="offset-md-1 col-10 py-3 context-main-bg">
|
||||
<legend class="text-center">Share</legend>
|
||||
<hr>
|
||||
<div class="offset-3 col-lg-6 my-4">
|
||||
<p>Any link or folder can be shared. By default, the extensions and app both default to <strong>private</strong>. On this page, you can quickly see a list of any public links and folders. These "public" items can be shared with anyone who has the link.</p>
|
||||
</div>
|
||||
{LOOP}
|
||||
<div class="col-6 col-md-12">
|
||||
{panel}
|
||||
</div>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<div class="col-12">
|
||||
<p class="text-center">No <strong>public</strong> folders found.</p>
|
||||
</div>
|
||||
{/ALT}
|
||||
</div>
|
||||
</div>
|
48
app/plugins/bookmarks/views/shareFolder.html
Normal file
48
app/plugins/bookmarks/views/shareFolder.html
Normal file
@ -0,0 +1,48 @@
|
||||
<div class="container py-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card shadow">
|
||||
<!-- Card Header -->
|
||||
<div class="card-header text-center bg-dark text-white">
|
||||
<h3 class="card-title mb-0">Bookmark Folder</h3>
|
||||
</div>
|
||||
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<!-- User Details -->
|
||||
<div class="offset-md-2 col-md-8">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Title:</th>
|
||||
<td>{title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Privacy:</th>
|
||||
<td>{privacy}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Color:</th>
|
||||
<td>{color}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Created:</th>
|
||||
<td>{DTC}{createdAt}{/DTC}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" colspan="2">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{description}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
83
app/plugins/bookmarks/views/shareLink.html
Normal file
83
app/plugins/bookmarks/views/shareLink.html
Normal file
@ -0,0 +1,83 @@
|
||||
<div class="container py-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card shadow">
|
||||
<!-- Card Header -->
|
||||
<div class="card-header text-center bg-dark text-white">
|
||||
<h3 class="card-title mb-0">Bookmark</h3>
|
||||
</div>
|
||||
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<!-- User Details -->
|
||||
<div class="offset-md-2 col-md-8">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Title:</th>
|
||||
<td>{title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">URL:</th>
|
||||
<td>{url}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Type:</th>
|
||||
<td>{linkType}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Privacy:</th>
|
||||
<td>{privacy}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Color:</th>
|
||||
<td>{color}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Created:</th>
|
||||
<td>{DTC}{createdAt}{/DTC}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Archived:</th>
|
||||
<td>{DTC}{archivedAt}{/DTC}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Hidden:</th>
|
||||
<td>{DTC}{hiddenAt}{/DTC}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Last Refreshed:</th>
|
||||
<td>{DTC}{refreshedAt}{/DTC}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" colspan="2">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{description}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" colspan="2">Icon</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{iconHtml}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{icon}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" colspan="2">Meta</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{meta}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user