Other various changes
This commit is contained in:
parent
6af5f2a3f8
commit
f114843e4c
@ -2,6 +2,11 @@
|
||||
|
||||
use App\Kernel;
|
||||
|
||||
if (preg_match("/js\/data\.json$/", $_SERVER['REQUEST_URI'])) {
|
||||
print file_get_contents('js/data.json');
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||
|
||||
return function (array $context) {
|
||||
|
@ -12,9 +12,11 @@ use App\Entity\Bible;
|
||||
use App\Entity\Speaker;
|
||||
use App\Entity\Series;
|
||||
use App\Entity\Note;
|
||||
use App\Entity\NoteShares;
|
||||
use App\Entity\SharedNote;
|
||||
use App\Utils\Utils;
|
||||
use Doctrine\DBAL\Exception\ReadOnlyException;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Exception;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
@ -168,6 +170,10 @@ class AjaxController extends AbstractController
|
||||
$ref->setType($data->type);
|
||||
if (is_numeric($data->book)) {
|
||||
$ref->setNdx($data->book);
|
||||
} elseif ($data->type == 'ld' || $data->type == 'hc') {
|
||||
$type = substr($data->book, 0, 2);
|
||||
$ref->setType($type);
|
||||
$ref->setLabel($data->book);
|
||||
}
|
||||
|
||||
ReferenceController::$emi = $emi;
|
||||
@ -191,13 +197,27 @@ class AjaxController extends AbstractController
|
||||
'note' => ReferenceController::retrieveNote($user)
|
||||
};
|
||||
|
||||
if (!is_a($ret, Reference::class)) {
|
||||
$ret = new Reference();
|
||||
$ref = new Reference();
|
||||
|
||||
if (is_a($ret, Reference::class)) {
|
||||
$ref = $ret;
|
||||
}
|
||||
|
||||
if ($data->type == 'hc' && is_array($ret)) {
|
||||
$ref->setLabel(
|
||||
substr($ret[0]->getLabel(), 0, strpos($ret[0]->getLabel(), '-'))
|
||||
);
|
||||
|
||||
$content = null;
|
||||
foreach ($ret as $row) {
|
||||
$content .= $row->getContent().PHP_EOL.PHP_EOL;
|
||||
}
|
||||
$ref->setContent($content);
|
||||
}
|
||||
|
||||
$res->setContent(json_encode([
|
||||
'text' => $ret->getContent(),
|
||||
'title' => "{$ret->getLabel()}",
|
||||
'text' => $ref->getContent(),
|
||||
'title' => $ref->getLabel(),
|
||||
]));
|
||||
|
||||
return $res;
|
||||
@ -223,28 +243,12 @@ class AjaxController extends AbstractController
|
||||
{
|
||||
$res = new Response();
|
||||
$data = json_decode($req->getContent());
|
||||
$path = match($data->type) {
|
||||
'creed' => 'Creeds',
|
||||
'bc' => 'Belgic',
|
||||
'hc' => 'Heidelberg',
|
||||
'cd' => 'Dort',
|
||||
'wcf' => 'Westminster/Confessions',
|
||||
'wsc' => 'Westminster/Shorter Catechism',
|
||||
'wlc' => 'Westminster/Larger Catechism',
|
||||
'lbc' => 'London',
|
||||
'39a' => '39 Articles',
|
||||
'1hc' => '1 Helvetic Catechism',
|
||||
'2hc' => '2 Helvetic Catechism',
|
||||
'sd' => 'Savor Declaration',
|
||||
'agc' => 'Augsburg Confession'
|
||||
};
|
||||
$ref = $emi->getRepository(Reference::class)->find($data->refId);
|
||||
|
||||
$ret = file_put_contents(dirname(dirname(__DIR__))."/references/{$path}/{$data->file}", $data->text);
|
||||
|
||||
if($ret !== false) {
|
||||
$res->setContent(json_encode(['msg' => 'File Saved']));
|
||||
} else {
|
||||
$res->setContent(json_encode(['msg' => 'Failed to save file']));
|
||||
if ($ref) {
|
||||
$ref->setContent($data->text);
|
||||
$emi->persist($ref);
|
||||
$res = $this->json(['msg' => 'Reference updated.']);
|
||||
}
|
||||
|
||||
return $res;
|
||||
@ -371,10 +375,10 @@ class AjaxController extends AbstractController
|
||||
}
|
||||
|
||||
if (is_array($shared) && count($shared) > 0) {
|
||||
$ns = new NoteShares();
|
||||
$ns = new SharedNote();
|
||||
$ns->setNote($note)
|
||||
->setOwner($user)
|
||||
->setShare($shared[0]);
|
||||
->setOwnerId($user->getId())
|
||||
->setSharedUserId($shared[0]->getId());
|
||||
$emi->persist($ns);
|
||||
$emi->flush();
|
||||
|
||||
@ -477,6 +481,7 @@ class AjaxController extends AbstractController
|
||||
$data->trackSaveSize = false;
|
||||
}
|
||||
|
||||
try {
|
||||
$meta = $user->getMetaData();
|
||||
$meta['saveInterval'] = $data->saveInterval;
|
||||
$meta['saveReferences'] = $data->saveReferences;
|
||||
@ -487,6 +492,9 @@ class AjaxController extends AbstractController
|
||||
$user->setMetaData($meta);
|
||||
$emi->persist($user);
|
||||
$emi->flush();
|
||||
} catch (ReadOnlyException $e) {
|
||||
return new Response('Read Only '.$_ENV['DATABASE_URL'], 403);
|
||||
}
|
||||
|
||||
$res = new Response();
|
||||
$res->setContent(json_encode([
|
||||
|
@ -4,6 +4,7 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\Note;
|
||||
use App\Entity\User;
|
||||
use App\Entity\SharedNote;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@ -17,9 +18,9 @@ class DefaultController extends AbstractController
|
||||
public function index(): Response
|
||||
{
|
||||
if ($this->isGranted('IS_AUTHENTICATED_FULLY')) {
|
||||
return $this->redirect('/index.php/home');
|
||||
return $this->redirect('/home');
|
||||
}
|
||||
return $this->render('default/index.html.twig');
|
||||
return $this->render('default/index.html.twig', ['onLoad' => null]);
|
||||
}
|
||||
|
||||
#[Route('/home', name: 'app_home')]
|
||||
@ -31,6 +32,7 @@ class DefaultController extends AbstractController
|
||||
$meta = $user->getMetaData();
|
||||
|
||||
return $this->render('default/home.html.twig', [
|
||||
'onLoad' => 'setHeight()',
|
||||
'last4Notes' => $last4Notes,
|
||||
'reverseNoteSort' => $openNotes,
|
||||
'isAdmin' => $this->isGranted('ROLE_ADMIN'),
|
||||
@ -45,7 +47,7 @@ class DefaultController extends AbstractController
|
||||
}
|
||||
|
||||
#[Route('/profile', name: 'app_profile')]
|
||||
public function profile(): Response
|
||||
public function profile(EntityManagerInterface $emi): Response
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = $this->getUser();
|
||||
@ -55,6 +57,7 @@ class DefaultController extends AbstractController
|
||||
$meta = $user->getMetaData();
|
||||
if (!$meta) {
|
||||
$meta = [
|
||||
'onLoad' => null,
|
||||
'saveInterval' => 15,
|
||||
'saveReferences' => 'checked',
|
||||
'noteTextSize' => 12,
|
||||
@ -67,8 +70,16 @@ class DefaultController extends AbstractController
|
||||
$meta['trackSaveSize'] = $meta['trackSaveSize'] ? 'checked' : null;
|
||||
}
|
||||
|
||||
$sharedWithMe = $emi->getRepository(SharedNote::class)->getNotesSharedWithMe($user);
|
||||
$shared = $emi->getRepository(SharedNote::class)->getNotesSharedByMe($user);
|
||||
dump($shared);
|
||||
|
||||
return $this->render('default/profile.html.twig', [
|
||||
'onLoad' => 'rollUp("user");rollUp("settings")',
|
||||
'meta' => $meta,
|
||||
'sharedWithMe' => $sharedWithMe,
|
||||
'shared' => $shared,
|
||||
'user' => $this->getUser(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ class ReferenceController extends AbstractController
|
||||
|
||||
$bible = self::$emi->getRepository(Bible::class)->findRange($bible, [$passage_start, $passage_end]);
|
||||
$passage = "{$passage_start}-{$passage_end}";
|
||||
$label = "{$bible[0]->getLabel()}\n{$bible[0]->getChapter()}:{$passage}";
|
||||
$label = "{$bible[0]->getLabel()}\n{$bible[0]->getChapter()}\n{$passage}";
|
||||
} elseif (is_int($passage)) {
|
||||
$bible = self::$emi->getRepository(Bible::class)->findBy(['book' => $book, 'chapter' => $chapter, 'verse' => $passage]);
|
||||
$label = "{$bible[0]->getLabel()}\n{$bible[0]->getChapter()}:{$passage}";
|
||||
@ -93,15 +93,16 @@ class ReferenceController extends AbstractController
|
||||
*
|
||||
* @param Reference $ref
|
||||
*
|
||||
* @return Reference
|
||||
* @return Reference|array
|
||||
*/
|
||||
public static function retrieveHC($ref): Reference
|
||||
public static function retrieveHC(Reference $ref): Reference|array
|
||||
{
|
||||
$r = self::$emi->getRepository(Reference::class)->findBy(['type' => 'hc', 'ndx' => $ref->getNdx()]);
|
||||
$r = self::$emi->getRepository(Reference::class)->findHeidelberg($ref->getLabel());
|
||||
|
||||
if (!$r) {
|
||||
return new Reference();
|
||||
}
|
||||
return $r[0];
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,6 +19,7 @@ class SecurityController extends AbstractController
|
||||
$lastUsername = $authenticationUtils->getLastUsername();
|
||||
|
||||
return $this->render('security/login.html.twig', [
|
||||
'onLoad' => null,
|
||||
'last_username' => $lastUsername,
|
||||
'error' => $error,
|
||||
]);
|
||||
|
@ -68,12 +68,6 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, JsonSer
|
||||
#[ORM\OneToMany(targetEntity: Note::class, mappedBy: 'user')]
|
||||
private Collection $notes;
|
||||
|
||||
/**
|
||||
* @var Collection<int, NoteShares>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: NoteShares::class, mappedBy: 'ownerId', orphanRemoval: true)]
|
||||
private Collection $noteShares;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?array $metaData = null;
|
||||
|
||||
@ -83,7 +77,6 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, JsonSer
|
||||
$this->speakers = new ArrayCollection();
|
||||
$this->templates = new ArrayCollection();
|
||||
$this->notes = new ArrayCollection();
|
||||
$this->noteShares = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?Uuid
|
||||
@ -319,36 +312,6 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, JsonSer
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, NoteShares>
|
||||
*/
|
||||
public function getNoteShares(): Collection
|
||||
{
|
||||
return $this->noteShares;
|
||||
}
|
||||
|
||||
public function addNoteShare(NoteShares $noteShare): static
|
||||
{
|
||||
if (!$this->noteShares->contains($noteShare)) {
|
||||
$this->noteShares->add($noteShare);
|
||||
$noteShare->setOwner($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeNoteShare(NoteShares $noteShare): static
|
||||
{
|
||||
if ($this->noteShares->removeElement($noteShare)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($noteShare->getOwner() === $this) {
|
||||
$noteShare->setOwner(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMetaData(): ?array
|
||||
{
|
||||
return $this->metaData;
|
||||
|
@ -25,6 +25,35 @@ class ReferenceRepository extends ServiceEntityRepository
|
||||
->getResult();
|
||||
}
|
||||
|
||||
public function findHeidelberg($ref): array|Reference
|
||||
{
|
||||
if (substr($ref, 0, 2) == 'ld') {
|
||||
$num = substr($ref, 2);
|
||||
$qb = $this->createQueryBuilder('r');
|
||||
$r = $qb->where($qb->expr()->like('r.label', ':ld'))
|
||||
->setParameter('ld', "ld{$num}-%")
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
} elseif (substr($ref, 0, 2) == 'hc') {
|
||||
$num = substr($ref, 2);
|
||||
$qb = $this->createQueryBuilder('r');
|
||||
$r = $qb->where($qb->expr()->like('r.label', ':hc'))
|
||||
->setParameter('hc', "%-hc{$num}")
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
|
||||
if(count($r) > 0) {
|
||||
$r = $r[0];
|
||||
|
||||
$r->setLabel(implode("\n", explode("-", $r->getLabel())));
|
||||
}
|
||||
}
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Reference[] Returns an array of Reference objects
|
||||
// */
|
||||
|
@ -12,7 +12,7 @@
|
||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||
{% block stylesheets %}{% endblock %}
|
||||
</head>
|
||||
<body class='is-preload' onresize='setHeight()'>
|
||||
<body class='is-preload' onload='{% if onLoad is defined %}{{ onLoad }}{% endif %}'>
|
||||
{% block body %}{% endblock %}
|
||||
{% block javascripts %}{% endblock %}
|
||||
</body>
|
||||
|
@ -3,20 +3,20 @@
|
||||
{% block title %}Markdown Cheat Sheet{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link href="/theme/assets/css/main.css" rel="stylesheet" />
|
||||
<link href='/theme/assets/css/jquery-ui.theme.css' rel='stylesheet' />
|
||||
<link href='/theme/assets/css/jquery-ui.structure.css' rel='stylesheet' />
|
||||
<link href='/css/style.css' rel='stylesheet' />
|
||||
<link href="{{ asset('css/main.css') }}" rel="stylesheet" />
|
||||
<link href='{{ asset('css/jquery-ui.theme.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('css/jquery-ui.structure.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('css/style.css') }}' rel='stylesheet' />
|
||||
<link href='//cdn.datatables.net/2.0.8/css/dataTables.dataTables.min.css' rel='stylesheet' />
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="/theme/assets/js/jquery.min.js"></script>
|
||||
<script src='/theme/assets/js/jquery-ui.js'></script>
|
||||
<script src="/theme/assets/js/browser.min.js"></script>
|
||||
<script src="/theme/assets/js/breakpoints.min.js"></script>
|
||||
<script src="/theme/assets/js/util.js"></script>
|
||||
<script src="/theme/assets/js/main.js"></script>
|
||||
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||
<script src='{{ asset('js/jquery-ui.js') }}'></script>
|
||||
<script src="{{ asset('js/browser.min.js') }}"></script>
|
||||
<script src="{{ asset('js/breakpoints.min.js') }}"></script>
|
||||
<script src="{{ asset('js/util.js') }}"></script>
|
||||
<script src="{{ asset('js/main.js') }}"></script>
|
||||
<script src='//momentjs.com/downloads/moment-with-locales.js'></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.2/markdown-it.min.js" integrity="sha512-ohlWmsCxOu0bph1om5eDL0jm/83eH09fvqLDhiEdiqfDeJbEvz4FSbeY0gLJSVJwQAp0laRhTXbUQG+ZUuifUQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src='//cdn.datatables.net/2.0.8/js/dataTables.min.js'></script>
|
||||
|
@ -3,10 +3,10 @@
|
||||
{% block title %}Sermon Notes{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link href="/theme/assets/css/main.css" rel="stylesheet" />
|
||||
<link href='/theme/assets/css/jquery-ui.theme.css' rel='stylesheet' />
|
||||
<link href='/theme/assets/css/jquery-ui.structure.css' rel='stylesheet' />
|
||||
<link href='/css/style.css' rel='stylesheet' />
|
||||
<link href="{{ asset('css/main.css') }}" rel="stylesheet" />
|
||||
<link href='{{ asset('css/jquery-ui.theme.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('css/jquery-ui.structure.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('styles/style.css') }}' rel='stylesheet' />
|
||||
<link href='//cdn.datatables.net/2.0.8/css/dataTables.dataTables.min.css' rel='stylesheet' />
|
||||
<style>
|
||||
#notes,
|
||||
@ -20,12 +20,12 @@ button.button i {
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="/theme/assets/js/jquery.min.js"></script>
|
||||
<script src='/theme/assets/js/jquery-ui.js'></script>
|
||||
<script src="/theme/assets/js/browser.min.js"></script>
|
||||
<script src="/theme/assets/js/breakpoints.min.js"></script>
|
||||
<script src="/theme/assets/js/util.js"></script>
|
||||
<script src="/theme/assets/js/main.js"></script>
|
||||
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||
<script src='{{ asset('js/jquery-ui.js') }}'></script>
|
||||
<script src="{{ asset('js/browser.min.js') }}"></script>
|
||||
<script src="{{ asset('js/breakpoints.min.js') }}"></script>
|
||||
<script src="{{ asset('js/util.js') }}"></script>
|
||||
<script src="{{ asset('js/main.js') }}"></script>
|
||||
<script src='//momentjs.com/downloads/moment-with-locales.js'></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.2/markdown-it.min.js" integrity="sha512-ohlWmsCxOu0bph1om5eDL0jm/83eH09fvqLDhiEdiqfDeJbEvz4FSbeY0gLJSVJwQAp0laRhTXbUQG+ZUuifUQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src='//cdn.datatables.net/2.0.8/js/dataTables.min.js'></script>
|
||||
@ -35,7 +35,7 @@ let saveTimeout = ({{ meta.saveTimeout }} * 1000);
|
||||
const SAVE_FAILURE_LIMIT = {{ meta.saveFailureCount }};
|
||||
let saveFailureCount = {{ meta.saveFailureCount }};
|
||||
</script>
|
||||
<script src='/js/script.js'></script>
|
||||
<script src='{{ asset('js/script.js') }}'></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
@ -54,7 +54,7 @@ let saveFailureCount = {{ meta.saveFailureCount }};
|
||||
<button onclick='decreaseFont()'><i class='fa fa-minus'></i></button>
|
||||
<button id='openRefBtn' class='button' onclick='openRef(false)'><i class='fa fa-book'></i></button>
|
||||
</div>
|
||||
<div id="ref" style='font-size:12pt;'></div>
|
||||
<div id="ref" style='font-size:{{ meta.noteTextSize }}pt;'></div>
|
||||
<div id='note-list'>
|
||||
<table id='note-table' data-order='[[ 3, "desc" ]]'>
|
||||
<thead>
|
||||
@ -117,7 +117,7 @@ let saveFailureCount = {{ meta.saveFailureCount }};
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<textarea id="notes" wrap="hard"></textarea>
|
||||
<textarea id="notes" wrap="hard" style='font-size:{{ meta.noteTextSize }}pt'></textarea>
|
||||
<div id='notePreview'></div>
|
||||
</section>
|
||||
</div>
|
||||
|
@ -3,16 +3,18 @@
|
||||
{% block title %}Sermon Notes{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link href="/theme/assets/css/main.css" rel="stylesheet" />
|
||||
<link href='/css/style.css' rel='stylesheet' />
|
||||
<link href="{{ asset('css/main.css') }}" rel="stylesheet" />
|
||||
<link href='{{ asset('styles/style.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('css/jquery-ui.theme.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('css/jquery-ui.structure.css') }}' rel='stylesheet' />
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="/theme/assets/js/jquery.min.js"></script>
|
||||
<script src="/theme/assets/js/browser.min.js"></script>
|
||||
<script src="/theme/assets/js/breakpoints.min.js"></script>
|
||||
<script src="/theme/assets/js/util.js"></script>
|
||||
<script src="/theme/assets/js/main.js"></script>
|
||||
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||
<script src="{{ asset('js/browser.min.js') }}"></script>
|
||||
<script src="{{ asset('js/breakpoints.min.js') }}"></script>
|
||||
<script src="{{ asset('js/util.js') }}"></script>
|
||||
<script src="{{ asset('js/main.js') }}"></script>
|
||||
|
||||
<!-- <script src="https://kit.fontawesome.com/f15a79324f.js" crossorigin="anonymous"></script> -->
|
||||
{% endblock %}
|
||||
@ -23,12 +25,12 @@
|
||||
<div class='inner'>
|
||||
<header id="header">
|
||||
{% if app.user %}
|
||||
<a href='/index.php/home' class='logo'>
|
||||
<img src='/theme/images/vecteezy_notes-icon-in-trendy-flat-style-isolated-on-white_29722382.jpg' style='width:60px;'/>
|
||||
<a href='/home' class='logo'>
|
||||
<img src='{{ asset('images/vecteezy_notes-icon-in-trendy-flat-style-isolated-on-white_29722382.jpg') }}' style='width:60px;'/>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="/index.php/" class="logo">
|
||||
<img src='/theme/images/vecteezy_notes-icon-in-trendy-flat-style-isolated-on-white_29722382.jpg' style='width:60px;'/>
|
||||
<a href="/" class="logo">
|
||||
<img src=' {{ asset('images/vecteezy_notes-icon-in-trendy-flat-style-isolated-on-white_29722382.jpg') }}' style='width:60px;'/>
|
||||
</a>
|
||||
{% endif %}
|
||||
</header>
|
||||
@ -42,7 +44,7 @@
|
||||
</header>
|
||||
</div>
|
||||
<span class="image object">
|
||||
<img src="/theme/images/lined-paper-template-01.png" alt="" />
|
||||
<img src="{{ asset('images/lined-paper-template-01.png') }}" alt="" />
|
||||
</span>
|
||||
</section>
|
||||
</div>
|
||||
|
@ -53,7 +53,7 @@ label,
|
||||
input[type="number"],
|
||||
input[type="email"],
|
||||
input[type="text"] {
|
||||
display: inline !important;
|
||||
/*display: inline !important;*/
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
@ -67,12 +67,12 @@ input[type="checkbox"] {
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="/theme/assets/js/jquery.min.js"></script>
|
||||
<script src='/theme/assets/js/jquery-ui.js'></script>
|
||||
<script src="/theme/assets/js/browser.min.js"></script>
|
||||
<script src="/theme/assets/js/breakpoints.min.js"></script>
|
||||
<script src="/theme/assets/js/util.js"></script>
|
||||
<script src="/theme/assets/js/main.js"></script>
|
||||
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||
<script src='{{ asset('js/jquery-ui.js') }}'></script>
|
||||
<script src="{{ asset('js/browser.min.js') }}"></script>
|
||||
<script src="{{ asset('js/breakpoints.min.js') }}"></script>
|
||||
<script src="{{ asset('js/util.js') }}"></script>
|
||||
<script src="{{ asset('js/main.js') }}"></script>
|
||||
<script src='//momentjs.com/downloads/moment-with-locales.js'></script>
|
||||
<script src='//cdn.datatables.net/2.0.8/js/dataTables.min.js'></script>
|
||||
<script type='text/javascript'>
|
||||
@ -88,7 +88,7 @@ function saveSettings() {
|
||||
var saveTimeout = $('#save-timeout');
|
||||
var saveFailureCount = $('#save-failure-count');
|
||||
|
||||
fetch('/index.php/save-settings', {
|
||||
fetch('/save-settings', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
@ -107,12 +107,21 @@ function saveSettings() {
|
||||
alert(results.msg);
|
||||
});
|
||||
}
|
||||
|
||||
function rollUp(cont) {
|
||||
$('#'+cont+'-container').toggle(600);
|
||||
//$('#'+cont+'-div').height(100);
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<button id='back' onclick='history.go(-1)'>Back</button><br/>
|
||||
|
||||
<div class="flex-container">
|
||||
<div class="user-flex">
|
||||
<div class="user-flex" id='user-div'>
|
||||
<h2 onclick='rollUp("user")'>User Profile</h2>
|
||||
<div id='user-container'>
|
||||
<label for='name'>Name: </label>
|
||||
<input type='text' id='name' name='name' value='{{ app.user.name }}' /><br />
|
||||
|
||||
@ -130,14 +139,17 @@ function saveSettings() {
|
||||
|
||||
<button id='save-profile' onclick='saveProfile()'>Save Profile</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-flex">
|
||||
<h2 onclick='rollUp("settings")'>Site Settings</h2>
|
||||
<div id='settings-container'>
|
||||
<label for='save-interval'>Save Interval (seconds)?</label>
|
||||
<input type='number' id='save-interval' value='{{ meta.saveInterval }}' title='What is the interval to trigger an autosave, in seconds?' /><br/>
|
||||
|
||||
<label for='save-references'>Save References?</label>
|
||||
<input type='checkbox' id='save-references' {{ meta.saveReferences }} title='Do you want to also save reference content' /><br />
|
||||
|
||||
<label for='note-text-size'>Note Text Size? (points)</label>
|
||||
<label for='note-text-size'>Text Size? (points)</label>
|
||||
<input type='number' id='note-text-size' value='{{ meta.noteTextSize }}' title='Font size of the note preview, in points' /><br />
|
||||
|
||||
<label for='track-save-size'>Track Save Size?</label>
|
||||
@ -150,7 +162,7 @@ function saveSettings() {
|
||||
<input type='number' id='save-failure-count' value='{{ meta.saveFailureCount }}' title='How many times do you want to attempt to auto save before it stops and waits for a manual attempt' /><br />
|
||||
|
||||
<button id='save-settings' onclick='saveSettings()'>Save Settings</button>
|
||||
<button id='back' onclick='history.go(-1)'>Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -164,11 +176,13 @@ function saveSettings() {
|
||||
<th>Passage</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for s in shared %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class='settings-flex'>'
|
||||
<div class='settings-flex'>
|
||||
<h2>Notes Shared w/Me</h2>
|
||||
|
||||
<table id='shared-with-me'>
|
||||
|
@ -13,27 +13,27 @@
|
||||
<nav id="menu">
|
||||
<header class="major">
|
||||
{% if app.user %}
|
||||
<h3>Welcome <a href='/index.php/profile' style='text-decoration:underline;'>{{ app.user.name }}</a></h3>
|
||||
<a href='/index.php/logout'>Logout</a>
|
||||
<h3>Welcome <a href='/profile' style='text-decoration:underline;'>{{ app.user.name }}</a></h3>
|
||||
<a href='/logout'>Logout</a>
|
||||
{% endif %}
|
||||
</header>
|
||||
<ul>
|
||||
{% if app.user %}
|
||||
<li><a href='/index.php/home'>Home</a></li>
|
||||
<li><a href='/home'>Home</a></li>
|
||||
<li><a href="#" onclick='newNote()'>New Note</a></li>
|
||||
<li><a href='#' onclick='openNote()'>Open Note</a></li>
|
||||
<li><a href="#" onclick="saveNote()">Save Note</a></li>
|
||||
<li><a href='#' onclick='discardNote()'>Delete Note</a></li>
|
||||
{% if isAdmin is defined and isAdmin %}
|
||||
<li><a href='/index.php/reference-editor'>Reference Editor</a></li>
|
||||
<li><a href='/reference-editor'>Reference Editor</a></li>
|
||||
{% endif %}
|
||||
<li><a href='#' onclick="openRef()">Open Reference</a></li>
|
||||
<li><a href='/index.php/template-editor'>Template Editor</a></li>
|
||||
<li><a href='/index.php/cheat-sheet' target='_blank'>Markdown Cheat Sheet</a></li>
|
||||
<li><a href='/template-editor'>Template Editor</a></li>
|
||||
<li><a href='/cheat-sheet' target='_blank'>Markdown Cheat Sheet</a></li>
|
||||
{% else %}
|
||||
<li><a href="/index.php/">Home</a></li>
|
||||
<li><a href='/index.php/register'>Register</a></li>
|
||||
<li><a href='/index.php/login'>Login</a></li>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href='/register'>Register</a></li>
|
||||
<li><a href='/login'>Login</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
@ -26,9 +26,9 @@
|
||||
</select>
|
||||
<input type='text' name='name' id='refName' style='display:none;' />
|
||||
<button id='save' name='save' onclick='saveReference()'>Save</button>
|
||||
<a href='/index.php/home'>Back</a><br />
|
||||
<a href='/home'>Back</a><br />
|
||||
|
||||
<textarea id='reference' name='reference' rows=45 cols=100></textarea>
|
||||
<script src='/js/script.js'></script>
|
||||
<script src='{{ asset('js/script.js') }}'></script>
|
||||
</body>
|
||||
</html>
|
@ -13,7 +13,7 @@
|
||||
</select>
|
||||
<input type='text' name='series_name' id='series_name' />
|
||||
<input type='button' name='save' value='Save' onclick='saveSeries()' />
|
||||
<a href='/index.php/'>Back</a>
|
||||
<a href='/'>Back</a>
|
||||
|
||||
<script src='/js/script.js'></script>
|
||||
</body>
|
||||
|
@ -13,7 +13,7 @@
|
||||
</select>
|
||||
<input type='text' name='speaker_name' id='speaker_name' />
|
||||
<input type='button' name='save' value='Save' onclick='saveSpeaker()' />
|
||||
<a href='/index.php/'>Back</a>
|
||||
<a href='/'>Back</a>
|
||||
|
||||
<script src='/js/script.js'></script>
|
||||
</body>
|
||||
|
@ -14,7 +14,7 @@
|
||||
</select>
|
||||
<input type='text' name='name' id='template_name' />
|
||||
<input type='button' name='submit' value='Save' onclick='saveTemplate()' />
|
||||
<a href='/index.php/home'>Back</a>
|
||||
<a href='/home'>Back</a>
|
||||
<br />
|
||||
|
||||
<textarea id='template_value' name='template' wrap='hard' cols=100 rows=45></textarea>
|
||||
|
@ -1,22 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
blockquote {
|
||||
background-color: #808080;
|
||||
margin: 5 5 20 5;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
{{ owner.name }} has shared a note with you, what follows are their formatted notes.
|
||||
{% if isRegistered %}
|
||||
You can see shared notes <a href='{{ domain }}/index.php/shared-notes'>here</a>.
|
||||
You can see shared notes <a href='{{ domain }}/shared-notes'>here</a>.
|
||||
{% else %}
|
||||
You can register for an account <a href='{{ domain }}/index.php/register'>here</a>, or just review the notes below
|
||||
You can register for an account <a href='{{ domain }}/register'>here</a>, or just review the notes below
|
||||
{% endif %}
|
||||
</p>
|
||||
<h1>{{ note.title }}</h1>
|
||||
<blockquote>
|
||||
Passage: {{ note.passage }}<br/>
|
||||
Date: {{ note.date | date("F j Y") }}<br/>
|
||||
Speaker: {{ note.speaker.name }}<br/>
|
||||
Series: {{ note.series.name }}<br/>
|
||||
<strong>Passage:</strong> {{ note.passage }}<br/>
|
||||
<strong>Date:</strong> {{ note.date | date("F j Y") }}<br/>
|
||||
<strong>Speaker:</strong> {{ note.speaker.name }}<br/>
|
||||
<strong>Series:</strong> {{ note.series.name }}<br/>
|
||||
</blockquote>
|
||||
|
||||
{{ formattedText | raw }}
|
||||
|
@ -36,7 +36,7 @@
|
||||
<button type='submit' class='btn'>Register</button>
|
||||
{{ form_end(registrationForm) }}
|
||||
<!--
|
||||
<form action="/index.php/register" method="post" id='registration-form'>
|
||||
<form action="/register" method="post" id='registration-form'>
|
||||
<input type="hidden" name="_csrf_token" id="csrfToken"
|
||||
value="{{ csrf_token('authenticate') }}"
|
||||
>
|
||||
|
@ -3,17 +3,17 @@
|
||||
{% block title %}Login{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link href='/theme/assets/css/login.css' rel='stylesheet'/>
|
||||
<link href="/theme/assets/css/main.css" rel="stylesheet" />
|
||||
<link href='{{ asset('css/login.css') }}' rel='stylesheet'/>
|
||||
<link href="{{ asset('css/main.css') }}" rel="stylesheet" />
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="/theme/assets/js/login.js"></script>
|
||||
<script src="/theme/assets/js/jquery.min.js"></script>
|
||||
<script src="/theme/assets/js/browser.min.js"></script>
|
||||
<script src="/theme/assets/js/breakpoints.min.js"></script>
|
||||
<script src="/theme/assets/js/util.js"></script>
|
||||
<script src="/theme/assets/js/main.js"></script>
|
||||
<script src="{{ asset('js/login.js') }}"></script>
|
||||
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||
<script src="{{ asset('js/browser.min.js') }}"></script>
|
||||
<script src="{{ asset('js/breakpoints.min.js') }}"></script>
|
||||
<script src="{{ asset('js/util.js') }}"></script>
|
||||
<script src="{{ asset('js/main.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user