Adapt Recycler section of Spamblock Bayes for 2.0 backend.

This commit is contained in:
Matthias Mees 2014-06-05 13:09:44 +02:00
parent 006e7fa34b
commit f637b2df02

View file

@ -5,7 +5,7 @@
<input type="submit" class="serendipityPrettyButton input_button" value="{$CONST.PLUGIN_EVENT_SPAMBLOCK_BAYES_RECYCLER_EMPTY}" name="empty" />
</div>
<span id="bayesRecycler">
<div id="bayesRecycler">
<div class="bayesRecyclerTableNavigation">
{if $commentpage > 0}
<a class="serendipityIconLink" href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=spamblock_bayes&amp;serendipity[subpage]=1&amp;serendipity[commentpage]={$commentpage-1}">
@ -16,8 +16,11 @@
<a class="serendipityIconLinkRight" href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=spamblock_bayes&amp;serendipity[subpage]=1&amp;serendipity[commentpage]={$commentpage+1}">{$CONST.NEXT} <img src="{serendipity_getFile file="admin/img/next.png"}"/></a>
{/if}
</div>
{if $s9ybackend != 1}
<ul id="serendipity_comments_list" class="clearfix plainList zebra_list">
{/if}
{foreach from=$comments item=comment}
{if $s9ybackend == 1}
<details class="bayesRecyclerItem">
<summary>
<input type="checkbox" class="bayesRecyclerSelectBox" name="serendipity[selected][{$comment.id}]" />
@ -51,16 +54,54 @@
</dl>
</details>
{else}
<li id="comment_{$comment.id}" class="clearfix {cycle values="odd,even"}">
<input type="hidden" name="serendipity[comments][{$comment.id}]">
<div class="form_check">
<input id="serendipity[selected][{$comment.id}]" type="checkbox" class="bayesRecyclerSelectBox" name="serendipity[selected][{$comment.id}]">
<label for="serendipity[selected][{$comment.id}]" class="visuallyhidden">{$CONST.TOGGLE_SELECT}</label>
</div>
<h4 id="c{$comment.id}">{$comment.author|truncate:20:"..."|escape:"html"} {$CONST.IN_REPLY_TO} <a href="{$comment.article_link}" target="_blank">{$comment.article_title}</a> {$CONST.ON} {$comment.timestamp|date_format:"%d.%m.%y, %R"} <span title="{$CONST.PLUGIN_EVENT_SPAMBLOCK_BAYES_RATING}">{$comment.rating|regex_replace:"/\..*/":""}%</span> <button class="toggle_info button_link" type="button" data-href="#comment_data_{$comment.id}"><span class="icon-info-circled"></span><span class="visuallyhidden"> More</span></button></h4>
<div id="comment_data_{$comment.id}" class="additional_info">
<dl class="comment_data clearfix">
{foreach from=$types item=type}
<dt>{$type}</dt>
<dd>{$comment.$type|escape:"html"}</dd>
{/foreach}
</dl>
</div>
</li>
{/if}
{/foreach}
{if $s9ybackend == 1}
<div class="bayesRecyclerTableNavigation">
{else}
</ul>
<ul class="bayesRecyclerTableNavigation plainList clearfix">
{/if}
{if $commentpage > 0}
<a class="serendipityIconLink" href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=spamblock_bayes&amp;serendipity[subpage]=1&amp;serendipity[commentpage]={$commentpage-1}"><img src="{serendipity_getFile file="admin/img/previous.png"}"/>{$CONST.PREVIOUS}</a>
{if $s9ybackend == 1}
<a class="serendipityIconLink" href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=spamblock_bayes&amp;serendipity[subpage]=1&amp;serendipity[commentpage]={$commentpage-1}"><img src="{serendipity_getFile file="admin/img/previous.png"}"/>{$CONST.PREVIOUS}</a>
{else}
<li class="prev"><a class="" href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=spamblock_bayes&amp;serendipity[subpage]=1&amp;serendipity[commentpage]={$commentpage-1}">{$CONST.PREVIOUS}</a></li>
{/if}
{/if}
{if ($commentpage+1)*20 < $comments|@count}
{if $s9ybackend == 1}
<a class="serendipityIconLinkRight" href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=spamblock_bayes&amp;serendipity[subpage]=1&amp;serendipity[commentpage]={$commentpage+1}">{$CONST.NEXT} <img src="{serendipity_getFile file="admin/img/next.png"}"/></a>
{else}
<li class="next"><a class="" href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=spamblock_bayes&amp;serendipity[subpage]=1&amp;serendipity[commentpage]={$commentpage+1}">{$CONST.NEXT}</a></li>
{/if}
{/if}
{if $s9ybackend == 1}
</div>
</span>
{else}
</ul>
{/if}
</div>
</form>
{if $s9ybackend == 1}
<script src="{$path}details.polyfill.min.js" type="text/javascript"></script>
{/if}
</div>