aboutsummaryrefslogtreecommitdiff
path: root/cgi/templates/manage/news.html
blob: feec2a5a2a18b66f7f660de448830ff89e8e1d2f (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
<?py include('templates/base_top.html') ?>
<?py include('templates/manage/menu.html') ?>
<?py from tenjin.helpers.html import * ?>
<center>
<?py if action == 1: ?>
<div class="replymode">Publicar noticia</div>
<form action="#{cgi_url}manage/news/add?type=1" method="post">
<?py elif action == 2: ?>
<div class="replymode">Twitter</div>
<form action="#{cgi_url}manage/news/add?type=2" method="post">
<?py else: ?>
<div class="replymode">Publicar mensaje entre staff</div>
<form action="#{cgi_url}manage/newschannel/add" method="post">
<?py #endif ?>
<table>
  <?py if action != 2: ?>
  <tr>
    <td class="postblock">Anónimo</td>
    <td><input type="checkbox" name="anonymous" id="anon" value="1"#{checked(action != 0)} /><label for="anon"></label></td>
  </tr>
  <tr>
    <td class="postblock">Título</td>
    <td><input type="text" name="title" style="width:100%;" /></td>
  </tr>
  <?py #endif ?>
  <tr>
    <td class="postblock">Cuerpo<br /><br /><small style="font-weight:normal">HTML: Usar<br />con cuidado</small></td>
    <td><textarea cols="48" rows="5" name="message" style="width:100%;"></textarea></td>
  </tr>
  <tr><td colspan="2"><input type="submit" name="submit" style="width:100%;" value="Publicar" /></td></tr>
</table>
</form>
<?py if posts: ?>
<hr />
<table class="managertable">
  <tr>
    <th>ID</th>
    <th>Fecha</th>
    <?py if action != 2: ?><th>Título</th><?py #endif ?>
    <th>${"Noticia" if action != 2 else Tweet}</th>
    <th></th>
  </tr>
  <?py for post in posts: ?>
  <tr>
    <td style="text-align:center">#{post['id']}</td>
    <td>#{post['timestamp_formatted']}</td>
    <?py if action != 2: ?><td>#{post['title']}</td><?py #endif ?>
    <td>#{post['message']}</td>
    <td>[<a href="#{cgi_url}manage/#{'newschannel' if action == 'newschannel' else 'news'}/delete/#{post['id']}?type=#{action}">Eliminar</a>]</td>
  </tr>
  <?py #endfor ?>
</table>
<?py #endif ?>
</center>
<hr />
<?py include('templates/base_bottom.html') ?>