7 Commits
Author SHA1 Message Date
ryan 02b843a2b7 upd: Dockerfile
change default brange for building image
2026-06-17 19:12:26 -04:00
ryan e7c64a5a13 upd: install script
fix import-bible
fix import-heidelberg
2026-06-13 13:41:48 -04:00
ryan 743885608d upd: composer
update composer lock file
2026-06-13 13:40:50 -04:00
ryan 60712b81ea upd: sidebar twig
update format for new home format
2026-06-13 13:39:25 -04:00
ryan d3508943a2 fix: dbts
fix typos
2026-06-13 13:39:01 -04:00
ryan 161e73f354 upd: note entity
fix js calls
add recording URL to json output
2026-06-13 13:38:38 -04:00
ryan e14abe23fd upd: ajaxcontroller
fix couple typos
2026-06-13 13:37:24 -04:00
7 changed files with 279 additions and 272 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ RUN curl -sS https://get.symfony.com/cli/installer | bash && \
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
ARG CACHEBURST=1
ARG BRANCH=master
ARG BRANCH=main
WORKDIR /var/www/html
RUN git clone -b ${BRANCH} --single-branch https://gitea.rkprather.com/ryan/sermon-notes.git ./
Generated
+250 -244
View File
File diff suppressed because it is too large Load Diff
Executable → Regular
+2 -2
View File
@@ -17,7 +17,7 @@ shell_exec("chown -R www-data:www-data /data /var/www/html/var/cache");
// import reference material
print "Importing Bible and Eccumenical Creeds".PHP_EOL;
shell_exec("symfony console app:ingest-bible /var/www/html/references/esv-bible");
shell_exec("symfony console app:import-bible /var/www/html/references/esv-bible");
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Apostles 'Apostles Creed' creed apc");
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Athanasian 'Athanasian Creed' creed ath");
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Chalcedon 'Definition of Chalcedon' creed dc");
@@ -33,7 +33,7 @@ $dutchStandards = (
if ($dutchStandards) {
print "Importing Dutch Standards".PHP_EOL;
shell_exec("symfony console app:import-ref /var/www/html/references/bc Belgic belgic BC{\$ndx}");
shell_exec("symfony console app:import-heidelberg");
shell_exec("symfony console app:import-heidelberg /var/www/html/references/hc");
shell_exec("symfony console app:import-ref /var/www/html/references/cd Canons cd CD");
}
+4 -5
View File
@@ -3,7 +3,7 @@
namespace App\Controller;
use DateTime;
use Exception;
use Parsedown;
use App\Entity\Reference;
use App\Entity\Template;
@@ -16,7 +16,6 @@ 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;
@@ -299,11 +298,11 @@ class AjaxController extends AbstractController
$newNote = false;
if (isset($data->id) && $data->id) {
/** @var Note|array $note */
$note = $emi->getRepository(Note::class)->findBy(['id' => $data->id, 'user' => $this->getUser()]);
$dbnote = $emi->getRepository(Note::class)->findBy(['id' => $data->id, 'user' => $this->getUser()]);
if (is_array($note) && count($note) > 0) {
if (is_array($dbnote) && count($dbnote) > 0) {
/** @var Note $note */
$note = $note[0];
$note = $dbnote[0];
} else {
$note = new Note();
$newNote = true;
+4 -3
View File
@@ -167,14 +167,14 @@ class Note implements JsonSerializable
public function toLink(): string
{
return "<a href='#' onclick=\"retrieveNote('{$this->id}')\">".
return "<a href='#' onclick=\"note.retrieveNote('{$this->id}')\">".
$this->title.
"</a>&nbsp;".
"<a href='#' onclick=\"deleteNote('{$this->id}', this)\">".
"<a href='#' onclick=\"note.deleteNote('{$this->id}', this)\">".
"<i class='fas fa-trash-alt'></i>".
"</a>".
(
$this->recording ? "<br/>".
$this->recording ?
"<a href='{$this->recording}' target='_blank' class='recording-link'>".
"<i class='fa fa-play-circle'></i>".
"</a>" : null
@@ -195,6 +195,7 @@ class Note implements JsonSerializable
{
return [
'id' => $this->getId(),
'recording' => $this->getRecording(),
'link' => $this->toLink(),
'title' => $this->getTitle(),
'date' => $this->getDate(),
+3 -3
View File
@@ -26,12 +26,12 @@ class DatabaseTransferService
) {
// connect the source database
switch (explode(":", $_ENV['DATABASE_URL'])[0]) {
case 'pdo-sqlite';
case 'pdo-sqlite':
list($driverName, $dbFile) = explode(":/", $_ENV['DATABASE_URL']);
$this->srcDB = new PDO('sqlite:'.$dbFile);
break;
case 'pdo-mysql';
case 'pdo-pgsql';
case 'pdo-mysql':
case 'pdo-pgsql':
$dsn = $this->convertDBURLString($_ENV['DATABASE_URL']);
$this->srcDB = new PDO($dsn['dsn'], $dsn['username'], $dsn['password']);
}
+11 -10
View File
@@ -1,14 +1,16 @@
<!-- Sidebar -->
<div id="sidebar">
<div class="inner">
<div id='sidebar-header'>
<!-- Search -->
{% if app.user %}
<section id="search" class="alt">
<input type="text" name="query" id="query" placeholder="Search by title, passage, or note" />
</section>
{% endif %}
<a class='toggle' href='' id='sidebar-link'>Toggle</a>
</div>
<!-- Sidebar -->
<div id="sidebar">
<div class="inner">
<!-- Menu -->
<nav id="menu">
<header class="major">
@@ -20,16 +22,16 @@
<ul>
{% if app.user %}
<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 onclick='note.newNote()'>New Note</a></li>
<li><a onclick='note.openNote()'>Open Note</a></li>
<li><a onclick="note.saveNote()">Save Note</a></li>
{% if isAdmin is defined and isAdmin %}
<li><a href='/reference-editor'>Reference Editor</a></li>
{% if xferDB is defined and xferDB %}
<li><a href='/xfer-database'>Transfer Database</a></li>
{% endif %}
{% endif %}
<li><a href='#' onclick="openRef()">Open Reference</a></li>
<li><a onclick="openRef()">Open Reference</a></li>
<li><a href='/template-editor'>Template Editor</a></li>
<li><a href='/cheat-sheet' target='_blank'>Markdown Cheat Sheet</a></li>
{% else %}
@@ -50,7 +52,7 @@
{% for n in last4Notes %}
<article>
<p>{{ n.date|date("m/d/Y") }}</p>
<a href="#" onclick="retrieveNote('{{ n.id }}');openNote();">{{ n.title }}</a>
<a onclick="note.retrieveNote('{{ n.id }}');note.openNote();">{{ n.title }}</a>
<p>{{ n.passage }}</p>
</article>
{% endfor %}
@@ -70,5 +72,4 @@
</ul>
</section>
</div>
<a class='toggle' href='#sidebar' id='sidebar-link'>Toggle</a>
</div>