--- a/server/src/main/webapp/WEB-INF/templates/renkanIndex.html Wed Mar 13 15:37:31 2013 +0100
+++ b/server/src/main/webapp/WEB-INF/templates/renkanIndex.html Wed Mar 13 15:47:08 2013 +0100
@@ -1,5 +1,6 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" >
+ <head>
<title>Renkan</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@@ -123,27 +124,33 @@
/*]]>*/
</style>
<link href="static/css/index.css" rel="stylesheet" th:href="@{/static/css/index.css}"/>
-
+ </head>
+ <body>
<div id="wrapper">
<div id="inner">
<div id="button" onclick="go2Random()" class="translate" th:utext="#{renkanIndex.new_space}">New Space</div>
- <div id="label" class="translate" th:text="#{renkanIndex.renkan_title}">Create a Renkan with the title</div>
+ <div id="label" class="translate" th:text="#{renkanIndex.space_exp}">Create a Space with the title</div>
<form action="#" onsubmit="go2Title();return false;">
- <input type="text" id="renkantitle" autofocus="autofocus" x-webkit-speech="x-webkit-speech"/>
+ <input type="text" id="renkantitle" autofocus="autofocus"/>
<button type="submit">OK</button>
</form>
</div>
<h2 th:text="#{renkanIndex.space_list}">Space list</h2>
+ <div th:include="fragment/paginationFragment :: paginationFragment"></div>
<table>
<thead>
<tr>
- <th th:text="#{renkanIndex.space_name}">Name</th><th th:text="#{renkanIndex.space_creation}">Creation</th><th th:text="#{renkanIndex.space_open}">Edit</th>
+ <th th:text="#{renkanIndex.space_name}">Name</th>
+ <th th:text="#{renkanIndex.space_creation}">Creation</th>
+ <th th:text="#{renkanIndex.space_proj_count}">Proj. count</th>
+ <th th:text="#{renkanIndex.space_open}">Edit</th>
</tr>
</thead>
<tbody>
- <tr th:each="space: ${spaces}">
+ <tr th:each="space: ${page.content}">
<th th:text="${space.title}">title</th>
<td th:text="${#dates.format(space.created, #messages.msg('date.format'))}">date</td>
+ <td th:text="${#maps.containsKey(projectsCount, space.id)}? ${projectsCount[space.id]} : 0">nb. proj</td>
<td><a href="#" th:href="@{'/s/'+${space.id}}" th:text="#{renkanIndex.space_open_link}">Open space</a></td>
</tr>
</tbody>
@@ -161,7 +168,7 @@
return false;
}
- new_renkan = {
+ new_space = {
title: renkantitle,
description: "(empty description)",
uri: null
@@ -169,7 +176,7 @@
var post_url = /*[[@{/rest/spaces/}]]*/"/rest/spaces/";
$.ajax(post_url, {
- data:JSON.stringify(new_renkan),
+ data:JSON.stringify(new_space),
type: "POST",
dataType: "json",
contentType: "application/json; charset=UTF-8"
@@ -183,5 +190,5 @@
/*]]>*/
</script>
-
+ </body>
</html>