1 {extends file="page.tpl"}
4 <form action="{path_for name="history_filter"}" method="post" id="filtre">
6 <label for="start_date_filter">{_T string="since"}</label>
7 <input type="text" name="start_date_filter" id="start_date_filter" maxlength="10" size="10" value="{$history->filters->start_date_filter}"/>
8 <label for="end_date_filter">{_T string="until"}</label>
9 <input type="text" name="end_date_filter" id="end_date_filter" maxlength="10" size="10" value="{$history->filters->end_date_filter}"/>
12 {assign var="users" value=$history->getUsersList()}
13 {if $users|@count gt 0}
14 <label for="user_filter">{_T string="Member"}</label>
15 <select name="user_filter" id="user_filter">
16 <option value="0"{if $history->filters->user_filter eq 0} selected="selected"{/if}>{_T string="Select an user"}</option>
17 {foreach from=$users item=$user}
18 <option value="{$user}"{if $history->filters->user_filter === $user} selected="selected"{/if}>{$user}</option>
23 {assign var="actions" value=$history->getActionsList()}
24 {if $actions|@count gt 0}
25 <label for="action_filter">{_T string="Action"}</label>
26 <select name="action_filter" id="action_filter">
27 <option value="0">{_T string="Select an action"}</option>
28 {foreach from=$actions item=$action}
29 <option value="{$action|escape}"{if $history->filters->action_filter eq $action} selected="selected"{/if}>{$action|escape}</option>
35 <input type="submit" class="inline" value="{_T string="Filter"}"/>
36 <input type="submit" name="clear_filter" class="inline" value="{_T string="Clear filter"}"/>
38 <div class="infoline">
41 href="{path_for name="flushHistory"}"
43 <i class="fas fa-trash"></i>
44 {_T string="Flush the logs"}
46 {_T string="%count entry" plural="%count entries" count=$history->getCount() pattern="/%count/" replace=$history->getCount()}
48 <label for="nbshow">{_T string="Records per page:"}</label>
49 <select name="nbshow" id="nbshow">
50 {html_options options=$nbshow_options selected=$numrows}
52 <noscript> <span><input type="submit" value="{_T string="Change"}" /></span></noscript>
53 {include file="forms_types/csrf.tpl"}
58 <table class="listing">
61 <th class="small_head">#</th>
62 <th class="left date_row">
63 <a href="{path_for name="history" data=["option" => "order", "value" => "Galette\Filters\HistoryList::ORDERBY_DATE"|constant]}">
65 {if $history->filters->orderby eq constant('Galette\Filters\HistoryList::ORDERBY_DATE')}
66 {if $history->filters->ordered eq constant('Galette\Filters\HistoryList::ORDER_ASC')}
67 <img src="{base_url}/{$template_subdir}images/down.png" width="10" height="6" alt="{_T string="Ascendent"}"/>
69 <img src="{base_url}/{$template_subdir}images/up.png" width="10" height="6" alt="{_T string="Descendant"}"/>
74 <th class="left date_row">
75 <a href="{path_for name="history" data=["option" => "order", "value" => "Galette\Filters\HistoryList::ORDERBY_IP"|constant]}">
77 {if $history->filters->orderby eq constant('Galette\Filters\HistoryList::ORDERBY_IP')}
78 {if $history->filters->ordered eq constant('Galette\Filters\HistoryList::ORDER_ASC')}
79 <img src="{base_url}/{$template_subdir}images/down.png" width="10" height="6" alt="{_T string="Ascendent"}"/>
81 <img src="{base_url}/{$template_subdir}images/up.png" width="10" height="6" alt="{_T string="Descendant"}"/>
86 <th class="left date_row">
87 <a href="{path_for name="history" data=["option" => "order", "value" => "Galette\Filters\HistoryList::ORDERBY_USER"|constant]}">
89 {if $history->filters->orderby eq constant('Galette\Filters\HistoryList::ORDERBY_USER')}
90 {if $history->filters->ordered eq constant('Galette\Filters\HistoryList::ORDER_ASC')}
91 <img src="{base_url}/{$template_subdir}images/down.png" width="10" height="6" alt="{_T string="Ascendent"}"/>
93 <img src="{base_url}/{$template_subdir}images/up.png" width="10" height="6" alt="{_T string="Descendant"}"/>
98 <th class="left username_row">
99 <a href="{path_for name="history" data=["option" => "order", "value" => "Galette\Filters\HistoryList::ORDERBY_ACTION"|constant]}">
101 {if $history->filters->orderby eq constant('Galette\Filters\HistoryList::ORDERBY_ACTION')}
102 {if $history->filters->ordered eq constant('Galette\Filters\HistoryList::ORDER_ASC')}
103 <img src="{base_url}/{$template_subdir}images/down.png" width="10" height="6" alt="{_T string="Ascendent"}"/>
105 <img src="{base_url}/{$template_subdir}images/up.png" width="10" height="6" alt="{_T string="Descendant"}"/>
111 {_T string="Description"}
116 {if $logs|@count == 0}
117 <tr><td colspan="6" class="emptylist">{_T string="No log found"}</td></tr>
119 {foreach from=$logs item=log name=eachlog}
120 <tr class="{if $smarty.foreach.eachlog.iteration % 2 eq 0}even{else}odd{/if}">
121 <td data-scope="row">
122 {$smarty.foreach.eachlog.iteration}
123 <span class="row-title">
124 {_T string="History entry %id" pattern="/%id/" replace=$smarty.foreach.eachlog.iteration}
127 <td class="nowrap" data-title="{_T string="Date"}">{$log.date_log|date_format:"%a %d/%m/%Y - %R"}</td>
128 <td class="nowrap" data-title="{_T string="IP"}">{$log.ip_log}</td>
129 <td data-title="{_T string="User"}">{$log.adh_log}</td>
130 <td data-title="{_T string="Action"}">{$log.action_log|escape}</td>
131 <td data-title="{_T string="Description"}">
132 {$log.text_log|escape}
134 <span class="sql_log">{$log.sql_log|escape:"htmlall"}</span>
139 <tr><td colspan="6" class="emptylist">{_T string="logs are empty"}</td></tr>
144 {if $logs|@count != 0}
145 <div class="center cright">
146 {_T string="Pages:"}<br/>
147 <ul class="pages">{$pagination}</ul>
152 {block name="javascripts"}
153 <script type="text/javascript">
155 {include file="js_removal.tpl"}
156 var _elt = $('<img src="{base_url}/{$template_subdir}images/info.png" class="qryhide" alt="" title="{_T string="Show associated query"}"/>');
157 $('.sql_log').hide().parent().prepend(_elt);
158 $('.qryhide').click(function() {
159 $(this).next('.sql_log').show();
163 $('#start_date_filter, #end_date_filter').datepicker({
167 buttonText: '<i class="far fa-calendar-alt"></i> <span class="sr-only">{_T string="Select a date" escape="js"}</span>'