This commit is contained in:
Felix Ivo
2025-07-07 14:42:47 +02:00
6 changed files with 58 additions and 16 deletions

View File

@@ -61,6 +61,14 @@ function sanitize($data, $flags = ENT_QUOTES, $encoding = 'UTF-8') {
Start typing or drop a file to see preview...
</div>
</div>
<div class="form-group">
<label>Priorität:</label>
<select name="priority" id="priority">
<option value="1">LOW</option>
<option value="2">MID</option>
<option value="3">HIGH</option>
</select>
</div>
<div class="form-group">
<label for="attachments">Attach Files:</label>

View File

@@ -56,6 +56,14 @@ function sanitize($data, $flags = ENT_QUOTES, $encoding = 'UTF-8') {
<?php if($note && !empty($note['content'])) echo $parsedown->text(sanitize($note['content'])); else echo "Start typing or drop a file to see preview..."; ?>
</div>
</div>
<div class="form-group">
<label>Priorität:</label>
<select name="priority" id="priority">
<option value="1">LOW</option>
<option value="2">MID</option>
<option value="3">HIGH</option>
</select>
</div>
<div class="form-group">
<label for="attachments">Attach additional Files:</label>
<input type="file" id="attachments" name="attachments[]" multiple>
@@ -78,5 +86,4 @@ function sanitize($data, $flags = ENT_QUOTES, $encoding = 'UTF-8') {
<input type="hidden" name="controller" value="Notes">
<input type="hidden" name="do" value="editNote">
</form>
</div>

View File

@@ -39,6 +39,7 @@
<?php endif; ?>
<th>Content (Preview)</th>
<th data-sort="updated_at">Last Edited <span class="sort-icon"><?php if($sortBy === 'updated_at') echo $sortOrder === 'ASC' ? '▲' : '▼'; ?></span></th>
<th data-sort="priority">Priority<span class="sort-icon"><?php if($sortBy === 'priority') echo $sortOrder === 'ASC' ? '▲' : '▼'; ?></span></th>
<th>Actions</th>
</tr>
</thead>
@@ -58,6 +59,13 @@
?>
</td>
<td><?php echo date("d.m.Y H:i", strtotime($note['updated_at'])); ?></td>
<?php
if($note['priority'] === 'LOW') echo ('<td class="style_low";>');
elseif($note['priority'] === 'MID') echo ('<td class="style_mid";>');
elseif($note['priority'] === 'HIGH') echo ('<td class="style_high";>');
echo sanitize($note['priority']);
echo ('</td>')
?>
<td class="actions-cell">
<a href="?controller=Notes&do=editNote&id=<?php echo $note['id']; ?>" class="button">Edit</a>
<form method="POST" action="?controller=Notes&do=deleteNote" onsubmit="return confirm('Are you sure you want to delete this note?');" style="display: inline;">