aboutsummaryrefslogtreecommitdiff
path: root/cgi/templates/txt_thread.html
blob: 1d70f590ed9682ad3cf055685657711fdc80ad44 (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
<?py include('templates/txt_base_top.html') ?>
<body class="threadpage" data-brd="#{board}">
<?py if threads: ?>
<?py for thread in threads: ?>
<div id="thread_nav">
  <a href="/" name="top" target="_top">Bienvenido a Internet</a>
  <a href="#{boards_url}#{board}/">■Volver al BBS■</a>
  <a href="#{boards_url}#{board}/read/#{thread['timestamp']}/">Hilo completo</a>
  <?py if thread['length'] > 100: ?>
    <a href="#{boards_url}#{board}/read/#{thread['timestamp']}/1-100">Primeros 100</a>
  <?py #endif ?>
  <?py for i in range(thread['length'] / 100): ?>
    <a href="#{boards_url}#{board}/read/#{thread['timestamp']}/#{(i+1)*100+1}-#{(i+2)*100}">#{(i+1)*100+1}-</a>
  <?py #endfor ?>
  <?py if thread['length'] > 51: ?>
    <a href="#{boards_url}#{board}/read/#{thread['timestamp']}/l50">Últimos 50</a>
  <?py #endif ?>
  <a href="#bottom">&#9660;Bajar&#9660;</a>
</div>
<hr />
<?py if thread['length'] > 1000: ?>
  <div class="stop red">El hilo superó los 1000 mensajes y ha sido cerrado. Ya no se puede postear en él.</div>
<?py elif thread['length'] > 900: ?>
  <div class="warn yellow">El hilo ha recibido más de 900 mensajes. Cuando llegue a 1000 será cerrado.</div>
<?py #endif ?>
<div class="thread" data-length="#{thread['length']}">
  <h3>#{thread['subject']} <span>(${(str(thread['length'])+" respuestas") if thread['length']>1 else "Una respuesta"})</span></h3>
  <?py for post in thread['posts']: ?>
  <?py if post['IS_DELETED'] == '1': ?>
    <h4 class="deleted">#{post['num']} : Mensaje eliminado por usuario.</h4>
  <?py elif post['IS_DELETED'] == '2': ?>
    <h4 class="deleted">#{post['num']} : Mensaje eliminado por staff.</h4>
  <?py else: ?>
    <?py if post['num'] == 1: ?>
      <div class="reply first" data-n="#{post['num']}">
    <?py else: ?>
      <div class="reply" data-n="#{post['num']}">
    <?py #endif ?>
      <h4><a href="#" class="num">#{post['num']}</a> :
      <?py if post['email']: ?>
        <?py if post['tripcode']: ?>
          <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b> #{post['tripcode']}</span></a>
        <?py else: ?>
          <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b></span></a>
        <?py #endif ?>
      <?py else: ?>
        <?py if post['tripcode']: ?>
          <span class="name"><b>#{post['name']}</b> #{post['tripcode']}</span>
        <?py else: ?>
          <span class="name"><b>#{post['name']}</b></span>
        <?py #endif ?>
      <?py #endif ?> : <span class="date" data-unix="#{post['timestamp']}">#{post['timestamp_formatted']}</span>
      <span class="del"><a href="#{cgi_url}report/#{board}/#{post['id']}/#{post['num']}">rep</a> <a href="#">del</a></span></h4>
      <?py if post['file']: ?>
        <a href="/#{board}/src/#{post['file']}" target="_blank" class="thumb"><img src="#{'/static/' if post['thumb'].startswith('mime') else  ('/'+board+'/thumb/')}#{post['thumb']}" width="#{post['thumb_width']}" height="#{post['thumb_height']}" title="${post['file']}-(${post['file_size']} B)" /></a>
      <?py #endif ?>
      <div class="msg">#{post['message']}</div>
    </div>
  <?py #endif ?>
  <?py #endfor ?>
  <div id="size">#{thread['size']}</div>
</div>
<hr />
<?py if thread['locked'] != '1': ?>
  <div class="lastposts"><a href="#{boards_url}#{board}/read/#{thread['timestamp']}/#{thread['length']}-n" id="n">Ver nuevos posts</a></div>
  <hr />
<?py #endif ?>
<?py if thread['length'] > 1000: ?>
  <div class="stop red">El hilo superó los 1000 mensajes y ha sido cerrado. Ya no se puede postear en él.</div>
<?py elif thread['length'] > 900: ?>
  <div class="warn yellow">El hilo ha recibido más de 900 mensajes. Cuando llegue a 1000 será cerrado.</div>
<?py #endif ?>
<form id="postform#{thread['id']}" class="postform" name="postform" action="#{cgi_url}post" method="post" enctype="multipart/form-data">
  <div class="threadlinks">
    <a href="#{boards_url}#{board}/">■Volver al BBS■</a>
    <a href="#{boards_url}#{board}/read/#{thread['timestamp']}/">Hilo completo</a>
    <?py if prevrange: ?>
      <a href="#{boards_url}#{board}/read/#{thread['timestamp']}/#{prevrange}">Anteriores 100</a>
    <?py #endif ?>
    <?py if nextrange: ?>
      <a href="#{boards_url}#{board}/read/#{thread['timestamp']}/#{nextrange}">Próximos 100</a>
    <?py #endif ?>
    <?py if thread['length'] > 51: ?>
      <a href="#{boards_url}#{board}/read/#{thread['timestamp']}/l50">Últimos 50</a>
    <?py #endif ?>
    <a href="#top">&#9650;Subir&#9650;</a>
  </div>
    <input type="hidden" name="board" value="#{board}" /><input type="hidden" name="parent" value="#{thread['id']}" /><input type="hidden" name="password" value="" />
  <?py if thread['locked'] != '1': ?>
    <div style="display:none"><input type="text" name="name" size="13" /> <input type="text" name="email" size="13" /></div>
    <input type="submit" value="Responder" accesskey="z" /> <input type="button" name="preview" value="Previsualizar" /> <span><span>Nombre: </span><input type="text" name="fielda" size="13" accesskey="n" /> <span>E-mail: </span><input type="text" name="fieldb" size="13" accesskey="e" /></span><br />
    <textarea name="message" cols="80" rows="7" accesskey="m"></textarea><br />
    <div id="preview#{thread['id']}" class="msg" style="display:none"></div>
    <?py if allow_image_replies: ?>
      <input type="file" name="file" />
    <?py #endif ?>
  <?py else: ?>
    <div class="locked">El hilo ha sido cerrado. Ya no se puede postear en él.</div>
  <?py #endif ?>
</form>
<?py #endfor ?>
<?py #endif ?>
<div class="end">weabot.py ver <?py include('templates/revision.html') ?>
<span class="name"><b>neptune ★</b></span>
</div>
<a name="bottom"></a>
</body>
</html>