-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
211 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div> | ||
<p> | ||
<a class="btn btn-tertiary" href="{{ path('is_useful.index') }}">Index</a> | ||
<a class="btn btn-tertiary" href="{{ path('is_useful.unread') }}">View unread feedback</a> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{% extends '_base/_page-nav.twig' %} | ||
|
||
{% block page_nav title %} | ||
|
||
{% block page_title __(title) %} | ||
|
||
{% block page_main %} | ||
|
||
{{ include('@is_useful/backend/_navigation.twig') }} | ||
|
||
{% if feedback is not empty %} | ||
<table data-table> | ||
<thead> | ||
<th>IP</th> | ||
<th>Datetime</th> | ||
<th>Message</th> | ||
<th>Actions</th> | ||
</thead> | ||
<tbody> | ||
{% for item in feedback %} | ||
{% set ip = item.ip %} | ||
{% set datetime = item.datetime %} | ||
{% set message = item.message %} | ||
{% set deleteLink = path('is_useful.feedback.delete', { id: item.id }) %} | ||
{% set markLink = path('is_useful.feedback.markasread', { id: item.id }) %} | ||
<tr> | ||
<td>{{ ip }}</td> | ||
<td>{{ datetime }}</td> | ||
<td>{{ message }} </td> | ||
<td> | ||
<a class="btn btn-tertiary" href="{{ deleteLink }}" onclick="return confirm('Are you sure?')">Delete</a> | ||
<a class="btn btn-secondary" href="{{ markLink }}">Mark as read</a> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% else %} | ||
This item has no feedback yet. | ||
{% endif %} | ||
|
||
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"> | ||
<script type="text/javascript" src="//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script> | ||
<script> | ||
$(document).ready(function(){ | ||
$('[data-table]').DataTable({ | ||
pageLength: 100 | ||
}); | ||
}); | ||
</script> | ||
|
||
{% endblock page_main %} |