mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
* feat(notes): initial overhaul of notes with improved view, contact category, and better forms/validation * Notes: changes after draft PR review - improved security, avoided writing to $_POST - removing redundant $data variable passing - cleanup of xss_clean usage - changed to use existing callbook library instead new helper - migrated to plain SQL - changed name of the cat variable to category to avoid confusion - fixed translation (multiple places) * Translation of notes.js * Deleted not needed line. * Notes: Multiple fixes for after PR code review * Update application/views/notes/add.php Co-authored-by: Florian (DF2ET) <github@florian-wolters.de> * Layout improvmen of the error box suggested by phl0 * Add checking of note ownership during duplication. Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Notes: improved translation of one of the strings Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Notes: fix translation shall be using double quote Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Note: translation shall use double quote Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Notes: fix, translation shall be using sprintf Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Note: update -> translations shall be using double quotes Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Notes: fix, translation shall be using double quotes Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Notes: fix, translation shall be using double quotes Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Notes: missing translation of the error message. Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Notes: fix translation shall be using double quote Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Notes: translation of the error message Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org> * Notes: moved loading of the library out of the constructor --------- Co-authored-by: Florian (DF2ET) <github@florian-wolters.de> Co-authored-by: Fabian Berg <fabian.berg@hb9hil.org>
56 lines
2.4 KiB
PHP
56 lines
2.4 KiB
PHP
<!-- Notes view: displays a single note -->
|
|
<div class="container notes">
|
|
<div class="card">
|
|
<?php foreach ($note->result() as $row) { ?>
|
|
<div class="card-header">
|
|
<h2 class="card-title"><?= __("Notes"); ?></h2>
|
|
<ul class="nav nav-tabs card-header-tabs">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="<?= site_url('notes'); ?>">
|
|
<i class="fa fa-sticky-note-o"></i> <?= __("Your Notes"); ?>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="<?= site_url('notes/add'); ?>">
|
|
<i class="fa fa-plus-square"></i> <?= __("Create Note"); ?>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="<?= site_url('notes/add'); ?>">
|
|
<i class="fa fa-sticky-note"></i> <?= __("View Note"); ?>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row mb-3">
|
|
<div class="col-md-8">
|
|
<div class="mb-2">
|
|
<span style="font-size:1em;">
|
|
<?= __("Category"); ?>: <?= __($row->cat); ?>
|
|
<?php if ($row->cat == 'Contacts'): ?>
|
|
<span class="ms-1" data-bs-toggle="tooltip" title="<?= __("Contacts is a special note category used in various places of Wavelog to store information about QSO partners. This notes are private and are not shared with other users nor exported to external services.") ?>">
|
|
<i class="fa fa-question-circle text-info"></i>
|
|
</span>
|
|
<?php endif; ?>
|
|
</span>
|
|
</div>
|
|
<h4 class="fw-bold mb-0"><?php echo htmlspecialchars($row->title); ?></h4>
|
|
</div>
|
|
</div>
|
|
<!-- Note contents -->
|
|
<div class="mb-4">
|
|
<textarea name="content" style="display:none" id="notes_view"><?php echo $row->note; ?></textarea>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-end">
|
|
<a href="<?php echo site_url('notes/edit'); ?>/<?php echo $row->id; ?>" class="btn btn-primary btn-sm"><i class="fas fa-pencil-square-o"></i> <?= __("Edit Note"); ?></a>
|
|
<a href="<?php echo site_url('notes/delete'); ?>/<?php echo $row->id; ?>" class="btn btn-danger btn-sm"><i class="fas fa-trash-alt"></i> <?= __("Delete Note"); ?></a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|