Files
dockerfluxodecaixapro/cache/twig/3b/3bd055421bbce36081a139fff23197a1.php
2026-09-01 10:46:29 -03:00

479 lines
25 KiB
PHP
Executable File

<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* @notes/admin/index.twig */
class __TwigTemplate_2a4cddb3e6c00a6056d8dc4b84ce9379 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'head' => [$this, 'block_head'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "layouts/dashboard.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$this->parent = $this->load("layouts/dashboard.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
yield " - ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["platformName"] ?? null), "html", null, true);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_head(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 6
yield "<style>
.note-card {
transition: transform 0.2s, box-shadow 0.2s;
border-radius: 10px;
overflow: hidden;
height: 100%;
}
.note-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}
.note-content {
max-height: 200px;
overflow: hidden;
position: relative;
word-break: break-word;
overflow-wrap: break-word;
}
.note-content p {
margin-bottom: 0.5rem;
}
.note-content *:last-child {
margin-bottom: 0;
}
.pinned-badge {
position: absolute;
top: 10px;
right: 10px;
color: #ffc107;
font-size: 1.2rem;
}
</style>
";
yield from [];
}
// line 40
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 41
yield "<div class=\"container-fluid px-4\">
<div class=\"d-flex justify-content-between align-items-center mb-4\">
<h1 class=\"mt-4\">";
// line 43
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
yield "</h1>
<div class=\"d-flex gap-2\">
<form action=\"";
// line 45
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/notes"), "html", null, true);
yield "\" method=\"GET\" class=\"d-flex gap-2 me-3\">
<div class=\"input-group\" style=\"min-width: 250px;\">
<span class=\"input-group-text bg-white\"><i class=\"bi bi-search\"></i></span>
<input type=\"text\" name=\"search\" class=\"form-control\" placeholder=\"";
// line 48
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.search_placeholder"), "html", null, true);
yield "\" value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "search", [], "any", false, false, false, 48), "html", null, true);
yield "\">
</div>
<select name=\"subject_id\" class=\"form-select\" style=\"min-width: 180px;\" onchange=\"this.form.submit()\">
<option value=\"\">";
// line 51
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.all_subjects"), "html", null, true);
yield "</option>
";
// line 52
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(($context["subjects"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["subject"]) {
// line 53
yield " <option value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["subject"], "subjects_id", [], "any", false, false, false, 53), "html", null, true);
yield "\" ";
yield (((CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "subject_id", [], "any", false, false, false, 53) == CoreExtension::getAttribute($this->env, $this->source, $context["subject"], "subjects_id", [], "any", false, false, false, 53))) ? ("selected") : (""));
yield ">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["subject"], "subjects_name", [], "any", false, false, false, 53), "html", null, true);
yield "</option>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['subject'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 55
yield " </select>
";
// line 56
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "search", [], "any", false, false, false, 56) || CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "subject_id", [], "any", false, false, false, 56))) {
// line 57
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/notes"), "html", null, true);
yield "\" class=\"btn btn-outline-secondary\" title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.cancel"), "html", null, true);
yield "\"><i class=\"bi bi-x-lg\"></i></a>
";
}
// line 59
yield " </form>
<button type=\"button\" class=\"btn btn-outline-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#subjectsModal\">
<i class=\"bi bi-tags me-1\"></i> ";
// line 61
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.manage_subjects"), "html", null, true);
yield "
</button>
<a href=\"";
// line 63
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/notes/create"), "html", null, true);
yield "\" class=\"btn btn-primary\">
<i class=\"bi bi-file-earmark-plus me-1\"></i> ";
// line 64
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.add_note"), "html", null, true);
yield "
</a>
</div>
</div>
";
// line 69
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["flash_messages"] ?? null), "success", [], "any", false, false, false, 69)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 70
yield " <div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">
";
// line 71
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["flash_messages"] ?? null), "success", [], "any", false, false, false, 71), "html", null, true);
yield "
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
</div>
";
}
// line 75
yield "
<div class=\"row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4 g-4\">
";
// line 77
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(($context["notes"] ?? null));
$context['_iterated'] = false;
foreach ($context['_seq'] as $context["_key"] => $context["note"]) {
// line 78
yield " <div class=\"col\">
<div class=\"card note-card shadow-sm h-100\" style=\"background-color: ";
// line 79
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_color", [], "any", false, false, false, 79), "html", null, true);
yield ";\">
";
// line 80
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_is_pinned", [], "any", false, false, false, 80)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 81
yield " <div class=\"pinned-badge\"><i class=\"bi bi-pin-angle-fill\"></i></div>
";
}
// line 83
yield "
<div class=\"card-body\">
<div class=\"d-flex justify-content-between align-items-start mb-2\">
<h5 class=\"card-title text-truncate pe-4\">
";
// line 87
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_title", [], "any", false, false, false, 87), "html", null, true);
yield "
";
// line 88
if ((CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_image", [], "any", false, false, false, 88) || CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_file", [], "any", false, false, false, 88))) {
// line 89
yield " <span class=\"ms-1 fs-6 text-muted\" title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::default($this->env->getFunction('__')->getCallable()("notes.has_attachments"), "Possui anexos"), "html", null, true);
yield "\">
<i class=\"bi bi-paperclip\"></i>
</span>
";
}
// line 93
yield " </h5>
<div class=\"dropdown\">
<button class=\"btn btn-link btn-sm text-dark p-0\" type=\"button\" data-bs-toggle=\"dropdown\">
<i class=\"bi bi-three-dots-vertical\"></i>
</button>
<ul class=\"dropdown-menu dropdown-menu-end\">
<li>
<a href=\"";
// line 100
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("/admin/notes/edit/" . CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_id", [], "any", false, false, false, 100))), "html", null, true);
yield "\" class=\"dropdown-item\">
<i class=\"bi bi-pencil me-2\"></i> ";
// line 101
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.edit_note"), "html", null, true);
yield "
</a>
</li>
<li>
<form action=\"";
// line 105
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("/admin/notes/pin/" . CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_id", [], "any", false, false, false, 105))), "html", null, true);
yield "\" method=\"POST\" class=\"d-inline\">
<button type=\"submit\" class=\"dropdown-item\">
<i class=\"bi bi-pin me-2\"></i> ";
// line 107
yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_is_pinned", [], "any", false, false, false, 107)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.unpin"), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.pin"), "html", null, true)));
yield "
</button>
</form>
</li>
<li><hr class=\"dropdown-divider\"></li>
<li>
<form action=\"";
// line 113
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("/admin/notes/delete/" . CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_id", [], "any", false, false, false, 113))), "html", null, true);
yield "\" method=\"POST\" class=\"d-inline\" onsubmit=\"return confirm('";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.delete_confirm"), "html", null, true);
yield "')\">
<button type=\"submit\" class=\"dropdown-item text-danger\">
<i class=\"bi bi-trash me-2\"></i> ";
// line 115
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.delete"), "html", null, true);
yield "
</button>
</form>
</li>
</ul>
</div>
</div>
<div class=\"note-content small text-muted\">
";
// line 124
yield CoreExtension::getAttribute($this->env, $this->source, $context["note"], "notes_content", [], "any", false, false, false, 124);
yield "
</div>
</div>
<div class=\"card-footer bg-transparent border-0 d-flex justify-content-between align-items-center\">
<div class=\"d-flex gap-1\">
";
// line 129
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["note"], "subject", [], "any", false, false, false, 129)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 130
yield " <span class=\"badge text-dark\" style=\"background-color: ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["note"], "subject", [], "any", false, false, false, 130), "subjects_color", [], "any", false, false, false, 130), "html", null, true);
yield ";\">
<i class=\"bi bi-tag me-1\"></i>
";
// line 132
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["note"], "subject", [], "any", false, false, false, 132), "subjects_name", [], "any", false, false, false, 132), "html", null, true);
yield "
</span>
";
}
// line 135
yield " </div>
<small class=\"text-muted\" title=\"";
// line 136
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.created_at"), "html", null, true);
yield ": ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["note"], "created_at", [], "any", false, false, false, 136), "d/m/Y H:i"), "html", null, true);
yield "\">
";
// line 137
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["note"], "created_at", [], "any", false, false, false, 137), "d/m/Y"), "html", null, true);
yield "
</small>
</div>
</div>
</div>
";
$context['_iterated'] = true;
}
// line 142
if (!$context['_iterated']) {
// line 143
yield " <div class=\"col-12 text-center py-5\">
<div class=\"text-muted\">
<i class=\"bi bi-journal-x display-1 mb-3\"></i>
<p class=\"lead\">";
// line 146
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.no_notes"), "html", null, true);
yield "</p>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['note'], $context['_parent'], $context['_iterated']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 150
yield " </div>
</div>
<!-- Subjects Management Modal -->
<div class=\"modal fade\" id=\"subjectsModal\" tabindex=\"-1\" aria-hidden=\"true\">
<div class=\"modal-dialog\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\">";
// line 158
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.manage_subjects"), "html", null, true);
yield "</h5>
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"";
// line 159
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.cancel"), "html", null, true);
yield "\"></button>
</div>
<div class=\"modal-body\">
<form action=\"";
// line 162
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/notes/subjects/store"), "html", null, true);
yield "\" method=\"POST\" class=\"mb-4\">
<div class=\"row g-2\">
<div class=\"col-7\">
<input type=\"text\" name=\"subjects_name\" class=\"form-control\" placeholder=\"";
// line 165
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.subject_name"), "html", null, true);
yield "\" required>
</div>
<div class=\"col-3\">
<input type=\"color\" name=\"subjects_color\" class=\"form-control form-control-color w-100\" value=\"#6c757d\" title=\"";
// line 168
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.subject_color"), "html", null, true);
yield "\">
</div>
<div class=\"col-2\">
<button type=\"submit\" class=\"btn btn-primary w-100\" title=\"";
// line 171
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.add"), "html", null, true);
yield "\"><i class=\"bi bi-plus-lg\"></i></button>
</div>
</div>
</form>
<div class=\"list-group\">
";
// line 177
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(($context["subjects"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["subject"]) {
// line 178
yield " <div class=\"list-group-item d-flex justify-content-between align-items-center\">
<div>
<span class=\"badge rounded-circle p-2 me-2\" style=\"background-color: ";
// line 180
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["subject"], "subjects_color", [], "any", false, false, false, 180), "html", null, true);
yield ";\"> </span>
";
// line 181
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["subject"], "subjects_name", [], "any", false, false, false, 181), "html", null, true);
yield "
</div>
<form action=\"";
// line 183
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("/admin/notes/subjects/delete/" . CoreExtension::getAttribute($this->env, $this->source, $context["subject"], "subjects_id", [], "any", false, false, false, 183))), "html", null, true);
yield "\" method=\"POST\" onsubmit=\"return confirm('";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.delete_subject_confirm"), "html", null, true);
yield "')\">
<button type=\"submit\" class=\"btn btn-link btn-sm text-danger p-0\" title=\"";
// line 184
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("notes.delete"), "html", null, true);
yield "\"><i class=\"bi bi-trash\"></i></button>
</form>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['subject'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 188
yield " </div>
</div>
</div>
</div>
</div>
";
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@notes/admin/index.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 440 => 188, 430 => 184, 424 => 183, 419 => 181, 415 => 180, 411 => 178, 407 => 177, 398 => 171, 392 => 168, 386 => 165, 380 => 162, 374 => 159, 370 => 158, 360 => 150, 350 => 146, 345 => 143, 343 => 142, 333 => 137, 327 => 136, 324 => 135, 318 => 132, 312 => 130, 310 => 129, 302 => 124, 290 => 115, 283 => 113, 274 => 107, 269 => 105, 262 => 101, 258 => 100, 249 => 93, 241 => 89, 239 => 88, 235 => 87, 229 => 83, 225 => 81, 223 => 80, 219 => 79, 216 => 78, 211 => 77, 207 => 75, 200 => 71, 197 => 70, 195 => 69, 187 => 64, 183 => 63, 178 => 61, 174 => 59, 166 => 57, 164 => 56, 161 => 55, 148 => 53, 144 => 52, 140 => 51, 132 => 48, 126 => 45, 121 => 43, 117 => 41, 110 => 40, 73 => 6, 66 => 5, 53 => 3, 42 => 1,);
}
public function getSourceContext(): Source
{
return new Source("", "@notes/admin/index.twig", "/app/modules/notes/views/admin/index.twig");
}
}