aboutsummaryrefslogtreecommitdiff
path: root/cgi/templates/manage/filters.html
blob: 188a741bfad2dc5f9923f895eecc1c7e3a72b018 (plain) (blame)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?py include('templates/base_top.html') ?>
<?py include('templates/manage/menu.html') ?>
<?py from tenjin.helpers.html import * ?>
<center>
<div class="replymode">Filtros</div>
<?py if mode == 0: ?>
<table class="managertable">
  <tr>
    <th>ID</th>
    <th>Boards</th>
    <th>Tipo</th>
    <th>Acción</th>
    <th>Mensaje</th>
    <th>Modificado</th>
    <th>Por</th>
    <th>Acción</th>
  </tr>
  <?py for filter in filters: ?>
  <tr>
   <td style="text-align:center">#{filter['id']}</td>
   <td style="text-align:center">${filter['boards']}</td>
   <td>#{filter['type_formatted']}</td>
   <td>#{filter['action_formatted']}</td>
   <td>${filter['reason']}</td>
   <td style="text-align:center">${filter['added']}</td>
   <td style="text-align:center">${filter['staff']}</td>
   <td style="text-align:center">[<a href="#{cgi_url}manage/filters/add?edit=#{filter['id']}">Editar</a>]<br />
    [<a href="#{cgi_url}manage/filters/delete/#{filter['id']}">Eliminar</a>]</td>
  </tr>
  <?py #endfor ?>
  <tr><td colspan="9" style="text-align:center">
   <form action="#{cgi_url}manage/filters/add" method="get">
    <input type="submit" value="Agregar filtro" />
   </form></td>
  </tr>
</table>
<?py elif mode == 1: ?>
<form name="banform" method="post">
<table>
  <tr><th colspan="3" class="postblock">Tipo de filtro</th></tr>
  <tr>
    <td class="postblock"><input type="radio" name="type" id="type1" value="0"#{checked(startvalues['type'] == '0')} /><label for="type1">Palabra</label></td>
    <td style="text-align:right">Regex:</td>
    <td><input type="text" name="word" value="${startvalues['word']}" /></td>
  </tr>
  <tr>
    <td rowspan="2" class="postblock"><input type="radio" name="type" id="type2" value="1"#{checked(startvalues['type'] == '1')} /><label for="type2">Nombre/Tripcode</label></td>
    <td style="text-align:right">Nombre:</td>
    <td><input type="text" name="name" value="${startvalues['name']}" /> (regex)</td>
  </tr>
  <tr>
    <td style="text-align:right">Tripcode:</td>
    <td><input type="text" name="trip" value="${startvalues['trip']}" /> (incluir separador)</td>
  </tr>
</table>
<br />
<div style="text-align:left;display:inline-block;">
  <div class="postblock" style="display:block;text-align:center;margin-bottom:0.5em;">Aplicar a</div>
  <div style="padding:0 10px">
    <input type="checkbox" name="board_all" id="board_all" value="1"#{checked(startvalues['where'] == '')} /><label for="board_all" style="font-weight:bold">Todos los boards</label>
    <hr />
    <?py for board in boards: ?>
    <input type="checkbox" name="board_#{board['dir']}" id="board_#{board['dir']}" value="1"#{checked(board['dir'] in startvalues['where'])} /><label for="board_#{board['dir']}">${board['name']} <span style="opacity:0.5">(/#{board['dir']}/)</span></label><br />
    <?py #endfor ?>
  </div>
</div>
<br /><br />
<table>
  <tr>
    <th colspan="3" class="postblock">Acción</th>
  </tr>
  <tr>
    <td class="postblock"><input type="radio" name="action" id="act0" value="0"#{checked(startvalues['action'] == '0')} /><label for="act0">Abortar post</label></td>
    <td colspan="2"></td>
  </tr>
  <tr>
    <td class="postblock"><input type="radio" name="action" id="act1" value="1"#{checked(startvalues['action'] == '1')} /><label for="act1">Reemplazar</label></td>
    <td colspan="2"><input type="text" name="changeto" value="#{startvalues['changeto']}" size="40" /></td>
  </tr>
  <tr>
    <td rowspan="2" class="postblock"><input type="radio" name="action" id="act2" value="2"#{checked(startvalues['action'] == '2')} /><label for="act2">Autoban</label></td>
    <td style="text-align:right">Expira en:</td>
    <td><input type="text" name="seconds" id="seconds" size="6" value="#{startvalues['seconds']}" /> (segundos)<div style="float:right"><input type="checkbox" name="blind" id="blind" value="1"#{checked(startvalues['blind'] == '1')} /><label for="blind">Ban ciego</label></div></td>
  </tr>
  <tr>
    <td style="text-align:right">Preset:</td>
    <td id="timelist">
      <a href="#" data-secs="0">Nunca</a>
      <a href="#" data-secs="3600">1h</a>
      <a href="#" data-secs="21600">6h</a>
      <a href="#" data-secs="43200">12h</a>
      <a href="#" data-secs="86400">1d</a>
      <a href="#" data-secs="259200">3d</a>
      <a href="#" data-secs="604800">1w</a>
      <a href="#" data-secs="2592000">30d</a>
      <a href="#" data-secs="31536000">1y</a>
    </td>
  </tr>
  <tr>
    <td rowspan="2" class="postblock"><input type="radio" name="action" id="act3" value="3"#{checked(startvalues['action'] == '3')} /><label for="act3">Redireccionar</label></td>
    <td colspan="2"><input type="text" name="redirect_url" value="#{startvalues['redirect_url']}" size="40" /></td>
  </tr>
  <tr>
    <td style="text-align:right">Tardar:</td>
    <td><input type="text" name="redirect_time" size="6" value="#{startvalues['redirect_time']}" /> (segundos)</td>
  </tr>
</table>
<br />
<table>
  <tr><th class="postblock" style="padding:2px">Mensaje a mostrar</th></tr>
  <tr><td><input type="text" size="50" name="reason" value="#{startvalues['reason']}" /></td></tr>
</table>
<br />
<input type="submit" name="add" value="#{submit}" />
</form>
<?py #endif ?>
</center>
<hr />
<?py include('templates/base_bottom.html') ?>