Create inclusion template for viewing a post.
[Sone.git] / src / main / resources / templates / index.html
1 <div id="sone">
2
3         <script src="javascript/jquery-1.4.2.js" language="javascript"></script>
4         <script src="javascript/sone.js" language="javascript"></script>
5
6         <script language="javascript">
7                 /* register input field/textarea swap. */
8                 $(document).ready(function() {
9                         registerInputTextareaSwap("#sone input.createpost", "What are you doing?");
10                 });
11         </script>
12
13         <h1><%= Page.Index.Page.Title|l10n|insert needle="{sone}" key=currentSone.name|html></h1>
14
15         <div>
16                 <form action="createPost.html" method="post">
17                         <div>
18                                 <label for="text"><%= Page.Index.Label.Text|l10n|html></label>
19                                 <input class="createpost" name="text" />
20                         </div>
21                         <div>
22                                 <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
23                         </div>
24                 </form>
25         </div>
26
27         <h1><%= Page.Index.PostList.Title|l10n|html></h1>
28
29         <div id="posts">
30                 <%foreach posts post>
31                         <%include include/viewPost.html>
32                 <%foreachelse>
33                         <div><%= Page.Index.PostList.Text.NoPostYet|l10n|html></div>
34                 <%/foreach>
35         </div>
36         
37         <h1><%= Page.Index.AddSone.Title|l10n|html></h1>
38         
39         <div><%= Page.Index.AddSone.Description|l10n|html></div>
40
41         <form action="addSone.html" method="post">
42                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
43                 <input id="addsone" type="text" name="request-uri" />
44                 <button type="submit"><%= Page.Index.AddSone.Button.Add|l10n|html></button>
45         </form>
46 </div>