fixed parsedown import, submit buttons are now shown

This commit is contained in:
Felix Ivo 2025-06-23 11:04:08 +02:00
parent 21aa81dbd3
commit e54a8f241e
3 changed files with 11 additions and 2 deletions

View File

@ -2,6 +2,9 @@
use ppa\Model\NotesModel;
include dirname(__DIR__).'/header.phtml';
$parsedown = new Parsedown();
$parsedown->setSafeMode(true);
$this->notesModel = new \ppa\Model\NotesModel();
$isEditMode = false;

View File

@ -2,6 +2,9 @@
use ppa\Model\NotesModel;
include dirname(__DIR__).'/header.phtml';
$parsedown = new Parsedown();
$parsedown->setSafeMode(true);
$this->notesModel = new \ppa\Model\NotesModel();
$isEditMode = true;

View File

@ -1,7 +1,5 @@
<?php include dirname(__DIR__).'/header.phtml'; ?>
<h2>Notes</h2>
<div class="container">
<?php
$parsedown = new Parsedown();
@ -22,6 +20,11 @@
$sortBy = $_GET['sort_by'] ?? 'updated_at';
$sortOrder = strtoupper($_GET['sort_order'] ?? 'DESC'); // Ensure uppercase for comparison
?>
<div class="page-header">
<h2><?php echo isAdmin() ? "All Users' Notes" : "My Notes"; ?></h2>
<a href="?controller=Notes&do=createNote" class="button">Create New Note</a>
</div>
<table class="notes-table">
<thead>
<tr>