| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| |
| <% |
| /* |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| %> |
| |
| <html> |
| <% |
| pageTitle = "Blog admin" |
| load("header.esp") |
| %> |
| <body> |
| <div class="title"> |
| <div class="logo"> |
| <a href="http://sling.apache.org"> |
| <img border="0" src="/apps/espblog/sling-logo.png"/> |
| </a> |
| </div> |
| </div> |
| |
| <div class="menu"> |
| <% |
| load("menu.esp"); |
| %> |
| </div> |
| |
| <div class="main"> |
| <h1><%= pageTitle %></h1> |
| |
| <table> |
| <tr> |
| <th>Title</th> |
| |
| <th>Date</th> |
| <th colspan="2">Controls</th> |
| </tr> |
| |
| <% |
| df = new java.text.SimpleDateFormat( "yyyy-MM-dd HH:mm" ); |
| |
| posts = currentNode.getNodes() |
| for (a in posts) { |
| post = posts[a] |
| if(!post.created) { |
| // does not look like one of our posts |
| continue; |
| } |
| %> |
| |
| <tr> |
| <td><%=post.title%></td> |
| <td><%=df.format(post.created.getTime())%></td> |
| <td><a href="/content/espblog/posts/<%=a%>.html">View</a> <a href="/content/espblog/posts/<%=a%>.edit.html">Edit</a></td> |
| <td> |
| <form method="POST" action="/content/espblog/posts/<%=a%>"> |
| <input name=":redirect" type="hidden" value="/content/espblog/posts.admin.html"/> |
| <input name=":operation" type="hidden" value="delete"/> |
| <input type="submit" value="Delete"> |
| </form> |
| </td> |
| </tr> |
| |
| <%}%> |
| </table> |
| </div> |
| </body> |
| </html> |