mirror of
https://github.com/magicbug/Cloudlog
synced 2026-08-13 17:49:35 -04:00
Introduces note categories with support for filtering, assigning, and managing categories. Adds category selection and creation to add/edit forms, category filtering to the notes list, and modals for deleting/merging categories and confirming note deletion. Updates controller and model logic to handle categories, and improves UI for notes management.
45 lines
No EOL
2.1 KiB
PHP
45 lines
No EOL
2.1 KiB
PHP
<div class="container notes">
|
|
<div class="row">
|
|
<div class="col-12 col-xl-10">
|
|
<?php foreach ($note->result() as $row) { ?>
|
|
<div class="card shadow-sm">
|
|
<div class="card-header">
|
|
<div class="d-flex flex-wrap justify-content-between align-items-start gap-3">
|
|
<div class="d-flex flex-column gap-1">
|
|
<div class="d-flex align-items-center gap-2 flex-wrap">
|
|
<a class="small text-decoration-none" href="<?php echo site_url('notes'); ?>">← <?php echo lang('notes_menu_notes'); ?></a>
|
|
<?php if (!empty($row->cat)) { ?>
|
|
<span class="badge bg-secondary"><?php echo $row->cat; ?></span>
|
|
<?php } ?>
|
|
</div>
|
|
<h2 class="card-title mb-0"><?php echo $row->title; ?></h2>
|
|
</div>
|
|
<div class="btn-group btn-group-sm" role="group" aria-label="Note actions">
|
|
<a href="<?php echo site_url('notes/edit/'.$row->id); ?>" class="btn btn-outline-primary">
|
|
<i class="fas fa-edit"></i> <?php echo lang('notes_input_btn_edit_note'); ?>
|
|
</a>
|
|
<button type="button" class="btn btn-outline-danger" data-bs-toggle="modal" data-bs-target="#deleteNoteModal" data-note-id="<?php echo $row->id; ?>" data-note-title="<?php echo htmlspecialchars($row->title, ENT_QUOTES); ?>">
|
|
<i class="fas fa-trash-alt"></i> <?php echo lang('notes_input_btn_delete_note'); ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="note-content lh-base">
|
|
<?php echo nl2br($row->note); ?>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer bg-transparent pt-0 border-0">
|
|
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2">
|
|
<div class="d-flex flex-wrap gap-2">
|
|
<a href="<?php echo site_url('notes'); ?>" class="btn btn-outline-secondary btn-sm"><?php echo lang('general_word_back') ?: 'Back'; ?></a>
|
|
<a href="<?php echo site_url('notes/add'); ?>" class="btn btn-outline-primary btn-sm"><?php echo lang('notes_create_note'); ?></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
<?php $this->load->view('notes/partials/delete_modal'); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|