Add several columns to spamfilter IP & word tables for feature consistency and extensibility #1882

This commit is contained in:
Kijin Sung 2022-12-19 01:45:10 +09:00
parent e1f98e573c
commit 020b85168c
11 changed files with 94 additions and 30 deletions

View file

@ -1,5 +1,10 @@
span.is_regexp {
display: inline-block;
margin-left: 4px;
color: red;
}
background: #888;
color: #fff;
font-size: 10px;
line-height: 12px;
padding: 2px 4px;
border-radius: 2px;
}

View file

@ -13,6 +13,7 @@
<tr>
<th scope="col">IP</th>
<th scope="col">{$lang->description}</th>
<th scope="col">{$lang->cmd_spamfilter_except_member}</th>
<th scope="col"><a href="{getUrl('sort_index', 'latest_hit')}">{$lang->latest_hit} <!--@if($sort_index === 'latest_hit')--><!--@endif--></a></th>
<th scope="col"><a href="{getUrl('sort_index', 'hit')}">{$lang->hit} <!--@if($sort_index === 'hit')--><!--@endif--></a></th>
<th scope="col"><a href="{getUrl('sort_index', 'regdate')}">{$lang->regdate} <!--@if($sort_index === 'regdate' || !$sort_index)--><!--@endif--></a></th>
@ -23,6 +24,7 @@
<tr loop="$ip_list => $ip_info">
<td>{$ip_info->ipaddress}</td>
<td>{$ip_info->description}</td>
<td>{$ip_info->except_member}</td>
<td><!--@if($ip_info->latest_hit)-->{zdate($ip_info->latest_hit,'Y-m-d H:i')}<!--@else-->-<!--@end--></td>
<td>{$ip_info->hit}</td>
<td>{zdate($ip_info->regdate,'Y-m-d')}</td>

View file

@ -12,6 +12,9 @@
<thead>
<tr>
<th scope="col">{$lang->word}</th>
<th scope="col">{$lang->description}</th>
<th scope="col">{$lang->cmd_spamfilter_except_member}</th>
<th scope="col">{$lang->cmd_spamfilter_filter_html}</th>
<th scope="col"><a href="{getUrl('sort_index', 'latest_hit')}">{$lang->latest_hit} <!--@if($sort_index === 'latest_hit')--><!--@endif--></a></th>
<th scope="col"><a href="{getUrl('sort_index', 'hit')}">{$lang->hit} <!--@if($sort_index === 'hit' || !$sort_index)--><!--@endif--></a></th>
<th scope="col"><a href="{getUrl('sort_index', 'regdate')}">{$lang->regdate} <!--@if($sort_index === 'regdate')--><!--@endif--></a></th>
@ -20,7 +23,10 @@
</thead>
<tbody>
<tr loop="$word_list => $word_info">
<td>{$word_info->word} <!--@if(preg_match('#^/.+/$#', $word_info->word))--><span class="is_regexp">[{$lang->msg_denied_word_is_regexp}]</span><!--@end--></td>
<td>{$word_info->word} <!--@if(preg_match('#^/.+/$#', $word_info->word))--><span class="is_regexp">{$lang->cmd_spamfilter_is_regexp}</span><!--@end--></td>
<td>{$word_info->description}</td>
<td>{$word_info->except_member}</td>
<td>{$word_info->filter_html}</td>
<td><!--@if($word_info->latest_hit)-->{zdate($word_info->latest_hit,'Y-m-d H:i')}<!--@else-->-<!--@end--></td>
<td>{$word_info->hit}</td>
<td>{zdate($word_info->regdate,'Y-m-d')}</td>