Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02b843a2b7 | ||
|
|
e7c64a5a13 | ||
|
|
743885608d | ||
|
|
60712b81ea | ||
|
|
d3508943a2 | ||
|
|
161e73f354 | ||
|
|
e14abe23fd |
+1
-1
@@ -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
File diff suppressed because it is too large
Load Diff
Executable → Regular
+2
-2
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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
@@ -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> ".
|
||||
"<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(),
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<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">
|
||||
|
||||
<!-- 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 %}
|
||||
|
||||
<!-- 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>
|
||||
|
||||
Reference in New Issue
Block a user