|
- <% c++ // Why isn't this done automatically?!?! %>
- <% c++ #include <cppcms/view.h> %>
- <% c++ #include "data.h" %>
- <% skin mainskin %>
- <% view domain_list uses ::DomainList %>
-
-
-
- <% template title() %><%= filter %> Domain List<% end %>
-
-
-
- <% template menu() %>
- <b>Filters: </b>
- <a href="<% url "" %>">To Be Decided</a> |
- <a href="<% url "accepted" %>">Accepted</a> |
- <a href="<% url "blocked" %>">Blocks</a>
- <% end template %>
-
-
-
- <% template pager(int no, int ct) %>
- <% if (ct>1) %><div class="pager">
- <% if (no>1) %>
- <a href="?pg=1">|<</a>
- <a href="?pg=<% c++ out() << no-1; %>"><<</a>
- <% end if %>
- <%= no %> of <%= ct %>
- <% if (no<ct) %>
- <a href="?pg=<% c++ out() << no+1; %>">>></a>
- <a href="?pg=<%= ct %>">>|</a>
- <% end if %>
- </div><% end if %>
- <% end template %>
-
-
-
- <% template render() %>
- <html><head>
- <title><% include title() %></title>
- <style>
- h1 { text-align: center; }
- table {
- margin-top: 1em;
- border-bottom: 2px solid black;
- }
- table th {
- border-top: 2px solid black;
- border-bottom: 2px solid black;
- }
- div.menu {
- border-top: 2px solid black;
- border-bottom: 2px solid black;
- padding: 0.25em;
- }
- div.pager {
- font-weight: bold;
- }
- </style>
- </head><body>
- <div class="menu"><% include menu() %></div>
-
- <h1><% include title() %></h1>
-
- <div id="content">
- <% foreach domain rowid r from 1 in list %>
- <% include pager(page, pages) %>
- <% if not empty error %>
- <p style="color: red"><i><b><%= error %></b></i></p>
- <% end %>
- <form method="POST">
- Whole Domain: <input name="domain" size=50>
- <p><i><b>NOTE:</b> the root domain name listed here will match any records in
- this list with the same suffix and record the decision as chosen below.
- <% if ( content.filter == "undecided" ) %>
- Whole domains can be blocked by prefixing them with "*.". This means that
- even if the exact host name or subdomain is not listed here it will get
- blocked.
- <% end %>
- <table>
- <tr><th><select name="op" value="0">
- <option value="0">Undecided</option>
- <option value="1">Accept</option>
- <option value="2">Block</option>
- </select>
- <input type="submit" value=">">
- </th>
- <th>Domain</th>
- <th>When Decided</th>
- </tr>
- <% item %>
- <tr>
- <td>
- <span style="float: left"><% c++ out() << r+content.page_size*(content.page-1); %>.</span>
- <center><input type=checkbox name="id" value="<%= domain.name %>"></center>
- </td>
- <td><%= domain.name %></td>
- <td><%= domain.decided %></td>
- </tr>
- <% end item %>
- <tr><td colspan="3">of <%= count %></td></tr>
- </table></form>
- <% include pager(page, pages) %>
- <% empty %>
- <h2>Nothing available</h2>
- <% end %>
- </div>
- </body></html>
- <% end template %>
-
-
-
- <% end view %>
- <% end skin %>
|