File size: 2,688 Bytes
7c89ed7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
Copyright (c) 2014 Mozilla Corporation
-->

<!--a striped table of our ip blocks-->
<template name="ipblocklist">
    <div class="ipblocklist container">
        <div class="fluid center">
            <table class="table table-striped table-hover table-condensed">
                <caption><p class="lead">IP Blocklist</p>
                    <div class="pull-left">
                            <input autofocus type="text" id="search" name="search" class="form-control"  placeholder="search..." value="{{query}}">
                    </div>
                </caption>
                {{ #if isReady }}
                    <thead>
                        <tr>
                            <td><button class="btn btn-xs btn-default ipblockadd">add</button></td>
                            <td>Address</td>
                            <td>Added</td>
                            <td>Expiring</td>
                            <td>Comment</td>
                            <td>By</td>
                            <td>Reference</td>
                        </tr>
                    </thead>
                    <tbody>
                        {{#each documents}}
                            {{>each_ipblock}}
                        {{else}}
                            {{#if query}}
                                <tr><td colspan="7"><p class="alert alert-warning">Nothing found for {{query}}..</p></td></tr>
                            {{/if}}
                        {{/each}}
                    </tbody>
                {{else}}
                    {{>loading}}
                {{/if}}
            </table>
            {{> defaultBootstrapPaginator pagination=templatePagination limit=5 containerClass="text-center"}}
        </div>
    </div>
</template>

<!--each individual ipblock -->
<template name="each_ipblock">

    <tr class="tooltip-wrapper info-row" title="{{creator}} at {{dateAdded}}" data-toggle="tooltip">
        <td></td>
        <td>{{{ipDecorate address}}}</td>
        <td>{{dateAdded}}</td>
        <td>{{dateExpiring}}</td>
        <td>{{comment}}</td>
        <td>{{creator}}</td>
        <td>{{reference}}</td>
        <td>
            <button class="btn btn-xs btn-warning" data-toggle="collapse" data-target="#delete{{_id}}">arm delete</button>
            <div id="delete{{_id}}" class="collapse">
                <button class="btn btn-xs btn-danger ipblockdelete" data-ipblockid={{_id}}>delete</button>
            </div>
        </td>
    </tr>

</template>