Made pages edit better and added messages
This commit is contained in:
43
views/messages.html.twig
Normal file
43
views/messages.html.twig
Normal file
@@ -0,0 +1,43 @@
|
||||
{% extends '@novaconium/master.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{title}}</h1>
|
||||
<table class="messages-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<th>Name</th>
|
||||
<th>Message Preview</th>
|
||||
<th>Created</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for msg in messages %}
|
||||
<tr class="{{ msg.unread ? 'unread' : 'read' }}">
|
||||
<td><a href="mailto:{{ msg.email }}">{{ msg.email }}</a></td>
|
||||
<td>{{ msg.name }}</td>
|
||||
<td>{{ msg.message }}</td>
|
||||
<td>{{ msg.created|date('Y-m-d H:i') }}</td>
|
||||
<td>
|
||||
{% if msg.unread %}
|
||||
<strong>Unread</strong>
|
||||
{% else %}
|
||||
Read
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="/novaconium/messages/edit/{{ msg.id }}" class="btn btn-edit">Edit</a>
|
||||
<a href="/novaconium/messages/delete/{{ msg.id }}">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="7" style="text-align:center;">No messages found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user