dry - include for session error. uniform headers and buttons

This commit is contained in:
tp_dhu 2025-03-24 01:19:10 +00:00
parent 040067c501
commit c8a0053e16
5 changed files with 16 additions and 27 deletions

5
ui/session/error.html Normal file
View File

@ -0,0 +1,5 @@
<check if="{{isset(@SESSION.error)}}">
<div class="notification is-warning">
{{ @SESSION.error }}
</div>
</check>

View File

@ -1,12 +1,6 @@
<h1 class="title">Knowledge Base</h1> <h1 class="title">Knowledge Base</h1>
<include href="/ui/session/error.html"></include>
<check if="{{isset(@SESSION.error)}}"> <p><a class="button" href="/kb/create">create kb article</a></p>
<div class="notification is-warning">
{{ @SESSION.error }}
</div>
</check>
<p><a href="/kb/create">create new kb article</a></p>
<hr> <hr>
<div class="block"> <div class="block">

View File

@ -1,6 +1,8 @@
<h3 class="title">Projects</h3> <h1 class="title">Projects</h1>
<a href="/project/create">create new project</a> <include href="/ui/session/error.html"></include>
<p><a class="button" href="/project/create">create project</a></p>
<hr> <hr>
<table class="table is-fullwidth is-hoverable is-bordered"> <table class="table is-fullwidth is-hoverable is-bordered">
<thead> <thead>
<tr class="has-background-primary"> <tr class="has-background-primary">

View File

@ -1,12 +1,6 @@
<h1 class="title">Tags</h1> <h1 class="title">Tags</h1>
<include href="/ui/session/error.html"></include>
<check if="{{isset(@SESSION.error)}}"> <p><a class="button" href="/tag/create">create tag</a></p>
<div class="notification is-warning">
{{ @SESSION.error }}
</div>
</check>
<p><a href="/tag/create">create new tag</a></p>
<hr> <hr>
<check if="{{ count(@tags) > 1 }}"> <check if="{{ count(@tags) > 1 }}">

View File

@ -1,12 +1,6 @@
<h1 class="title">View Tickets</h1> <h1 class="title">Tickets</h1>
<include href="/ui/session/error.html">
<check if="{{isset(@SESSION.error)}}"> <p><a class="button" href="/ticket/create">create ticket</a></p>
<div class="notification is-warning">
{{ @SESSION.error }}
</div>
</check>
<p><a href="/ticket/create">create ticket</a></p>
<hr> <hr>
<table class="table is-fullwidth is-bordered"> <table class="table is-fullwidth is-bordered">