--- a/server/src/main/webapp/WEB-INF/templates/renkanIndex.html Fri Mar 01 19:14:30 2013 +0100
+++ b/server/src/main/webapp/WEB-INF/templates/renkanIndex.html Sat Mar 09 02:19:49 2013 +0100
@@ -126,25 +126,25 @@
<div id="wrapper">
<div id="inner">
- <div id="button" onclick="go2Random()" class="translate" th:utext="#{renkanIndex.new_renkan}">New Renkan</div>
+ <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>
<form action="#" onsubmit="go2Title();return false;">
<input type="text" id="renkantitle" autofocus="autofocus" x-webkit-speech="x-webkit-speech"/>
<button type="submit">OK</button>
</form>
</div>
- <h2 th:text="#{renkanIndex.project_list}">Project list</h2>
+ <h2 th:text="#{renkanIndex.space_list}">Space list</h2>
<table>
<thead>
<tr>
- <th th:text="#{renkanIndex.project_name}">Name</th><th th:text="#{renkanIndex.project_creation}">Creation</th><th th:text="#{renkanIndex.project_edit}">Edit</th>
+ <th th:text="#{renkanIndex.space_name}">Name</th><th th:text="#{renkanIndex.space_creation}">Creation</th><th th:text="#{renkanIndex.space_open}">Edit</th>
</tr>
</thead>
<tbody>
- <tr th:each="project: ${projects}">
- <th th:text="${project.title}">title</th>
- <td th:text="${#dates.format(project.created, #messages.msg('date.format'))}">date</td>
- <td><a href="#" th:href="@{'/p/'+${project.id}(cowebkey=${project.key})}" th:text="#{renkanIndex.project_edit_link}">Edit projet</a></td>
+ <tr th:each="space: ${spaces}">
+ <th th:text="${space.title}">title</th>
+ <td th:text="${#dates.format(space.created, #messages.msg('date.format'))}">date</td>
+ <td><a href="#" th:href="@{'/s/'+${space.id}}" th:text="#{renkanIndex.space_open_link}">Open space</a></td>
</tr>
</tbody>
</table>
@@ -167,15 +167,15 @@
uri: null
};
- var post_url = /*[[@{/rest/projects/}]]*/"/rest/projects/";
+ var post_url = /*[[@{/rest/spaces/}]]*/"/rest/spaces/";
$.ajax(post_url, {
data:JSON.stringify(new_renkan),
type: "POST",
dataType: "json",
contentType: "application/json; charset=UTF-8"
- }).done(function(project){
- var template_url = /*[[@{'/p/<%=project_id%>'(cowebkey='')}]]*/"p/<%=project_id%>?cowebkey=<%=project_key%>";
- window.location = _.template(template_url+'<%=project_key%>', {project_id: project.id, project_key: project.key});
+ }).done(function(space){
+ var template_url = /*[[@{'/s/<%=space_id%>'}]]*/"s/<%=space_id%>";
+ window.location = _.template(template_url, {space_id: space.id});
});
//? window.location = "p/" + renkantitle : alert(/*[[#{renkanIndex.js.empty_name_error}]]*/"Please enter a name");