| author | ymh <ymh.work@gmail.com> |
| Sun, 14 Jul 2024 22:00:08 +0200 | |
| changeset 666 | 9d6550026232 |
| parent 493 | 6f2ab1a72f4a |
| permissions | -rw-r--r-- |
|
150
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
127
diff
changeset
|
1 |
<!DOCTYPE html> |
|
224
0167b777ad15
remove deprecated warnings + fix date picker default langauge
ymh <ymh.work@gmail.com>
parents:
219
diff
changeset
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" th:lang="${#ctx.getLocale().toLanguageTag()}" > |
|
76
523f0647513e
add the count of project by spaces, add pagination, update libraries and add some more unit tests.
ymh <ymh.work@gmail.com>
parents:
71
diff
changeset
|
3 |
<head> |
| 51 | 4 |
<title>Renkan</title> |
5 |
||
6 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
7 |
<meta charset="utf-8"/> |
|
8 |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/> |
|
9 |
||
| 127 | 10 |
<link rel="shortcut icon" href="../../static/img/favicon.ico" th:href="@{/static/img/favicon.ico}" /> |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
11 |
|
| 350 | 12 |
<script th:remove="all" type="text/javascript" src="../../static/lib/jquery/jquery.js"></script> |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
13 |
<script th:remove="all" type="text/javascript" src="../../static/js/thymol.js"></script> |
| 123 | 14 |
|
| 350 | 15 |
<script src="../../lib/jquery/jquery.js" th:src="@{/static/lib/jquery/jquery.js}" ></script> |
16 |
<script src="../../lib/underscore/underscore.js" th:src="@{/static/lib/underscore/underscore.js}" ></script> |
|
| 51 | 17 |
|
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
18 |
<link href="../../static/css/style.css" rel="stylesheet" th:href="@{/static/css/style.css}"/> |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
19 |
<link href="../../static/css/index.css" rel="stylesheet" th:href="@{/static/css/index.css}"/> |
|
76
523f0647513e
add the count of project by spaces, add pagination, update libraries and add some more unit tests.
ymh <ymh.work@gmail.com>
parents:
71
diff
changeset
|
20 |
</head> |
|
523f0647513e
add the count of project by spaces, add pagination, update libraries and add some more unit tests.
ymh <ymh.work@gmail.com>
parents:
71
diff
changeset
|
21 |
<body> |
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
22 |
<div id="container"> |
|
150
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
127
diff
changeset
|
23 |
<div id="wrapper" th:with="headerTitle=#{renkanIndex.renkan_spaces}"> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
127
diff
changeset
|
24 |
<header id="header" th:include="fragment/pageFragment :: headerFragment"> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
127
diff
changeset
|
25 |
<h1 th:text="#{renkanIndex.renkan_spaces}">Renkan Spaces</h1> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
127
diff
changeset
|
26 |
</header> |
| 51 | 27 |
<div id="inner"> |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
28 |
<div id="label" class="translate" th:text="#{renkanIndex.space_exp}">Create a Space</div> |
| 87 | 29 |
<form action="#" onsubmit="go2Title();return false;"> |
| 304 | 30 |
<fieldset id="form-fields"> |
31 |
<div id="title-field"><label th:text="#{renkanIndex.renkan_title}" for="renkantitle">title</label><input type="text" id="renkantitle" autofocus="autofocus" x-webkit-speech="x-webkit-speech"/></div> |
|
32 |
</fieldset> |
|
33 |
<div id="form-submit"><button type="submit">OK</button></div> |
|
| 51 | 34 |
</form> |
35 |
</div> |
|
| 71 | 36 |
<h2 th:text="#{renkanIndex.space_list}">Space list</h2> |
|
493
6f2ab1a72f4a
add search to space screen + new version
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
37 |
<div class="filter-container"> |
|
6f2ab1a72f4a
add search to space screen + new version
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
38 |
<form method="get"> |
|
6f2ab1a72f4a
add search to space screen + new version
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
39 |
<input type="text" id="space-filter" name="filter" placeholder="filter title" th:placeholder="#{renkanIndex.space_filter}" th:value="${param['filter']}?${param['filter'][0]}:''" /> |
|
6f2ab1a72f4a
add search to space screen + new version
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
40 |
<button type="submit">OK</button> |
|
6f2ab1a72f4a
add search to space screen + new version
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
41 |
</form> |
|
6f2ab1a72f4a
add search to space screen + new version
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
42 |
</div> |
| 87 | 43 |
<div th:include="fragment/paginationFragment :: paginationFragment" class="pagination-container"> |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
44 |
<div> |
| 298 | 45 |
<a href="#?p.page=1"><<</a> |
| 87 | 46 |
<a href="#?p.page=3"><</a> |
47 |
<span>...</span> |
|
48 |
<a href="#?p.page=2">2</a> |
|
49 |
<a href="#?p.page=3">3</a> |
|
50 |
<span>4</span> |
|
51 |
<a href="#?p.page=5">5</a> |
|
52 |
<a href="#?p.page=6">6</a> |
|
53 |
<span>...</span> |
|
54 |
<a href="#?p.page=5">></a> |
|
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
55 |
<a href="#?p.page=7">>></a> |
| 87 | 56 |
</div> |
57 |
</div> |
|
| 51 | 58 |
<table> |
59 |
<thead> |
|
60 |
<tr> |
|
|
76
523f0647513e
add the count of project by spaces, add pagination, update libraries and add some more unit tests.
ymh <ymh.work@gmail.com>
parents:
71
diff
changeset
|
61 |
<th th:text="#{renkanIndex.space_name}">Name</th> |
|
523f0647513e
add the count of project by spaces, add pagination, update libraries and add some more unit tests.
ymh <ymh.work@gmail.com>
parents:
71
diff
changeset
|
62 |
<th th:text="#{renkanIndex.space_creation}">Creation</th> |
| 81 | 63 |
<th th:text="#{renkanIndex.space_proj_count}">Project count</th> |
|
219
885f09f3462b
No longer test headers for images (was failing in new Chrome version)
ymh <ymh.work@gmail.com>
parents:
150
diff
changeset
|
64 |
<th th:text="#{renkanIndex.space_open}">Open</th> |
| 51 | 65 |
</tr> |
66 |
</thead> |
|
67 |
<tbody> |
|
|
76
523f0647513e
add the count of project by spaces, add pagination, update libraries and add some more unit tests.
ymh <ymh.work@gmail.com>
parents:
71
diff
changeset
|
68 |
<tr th:each="space: ${page.content}"> |
| 71 | 69 |
<th th:text="${space.title}">title</th> |
70 |
<td th:text="${#dates.format(space.created, #messages.msg('date.format'))}">date</td> |
|
|
76
523f0647513e
add the count of project by spaces, add pagination, update libraries and add some more unit tests.
ymh <ymh.work@gmail.com>
parents:
71
diff
changeset
|
71 |
<td th:text="${#maps.containsKey(projectsCount, space.id)}? ${projectsCount[space.id]} : 0">nb. proj</td> |
| 71 | 72 |
<td><a href="#" th:href="@{'/s/'+${space.id}}" th:text="#{renkanIndex.space_open_link}">Open space</a></td> |
| 51 | 73 |
</tr> |
74 |
</tbody> |
|
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
75 |
</table> |
| 51 | 76 |
</div> |
| 127 | 77 |
<footer id="footer" th:include="fragment/pageFragment :: footerFragment"> |
| 257 | 78 |
<div id="version">© <span class="version-date">2014</span> <a href="http://www.iri.centrepompidou.fr" target="_blanck">IRI</a> - Version <span class="version-version">0.0</span></div> |
| 127 | 79 |
</footer> |
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
80 |
</div> |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
81 |
<script th:inline="javascript" > |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
82 |
/*<![CDATA[*/ |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
83 |
|
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
84 |
function go2Title() |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
85 |
{ |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
86 |
var renkantitle = $("#renkantitle").val(); |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
87 |
if(renkantitle.length == 0) { |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
88 |
var alert_message = /*[[#{renkanIndex.js.empty_name_error}]]*/"Please enter a title"; |
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
89 |
alert(alert_message); |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
90 |
return false; |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
91 |
} |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
92 |
|
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
93 |
new_space = { |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
94 |
title: renkantitle, |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
95 |
description: "(empty description)", |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
96 |
uri: null |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
97 |
}; |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
98 |
|
|
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
99 |
var post_url = /*[[@{/rest/spaces/}]]*/"/rest/spaces/"; |
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
100 |
$.ajax(post_url, { |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
101 |
data:JSON.stringify(new_space), |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
102 |
type: "POST", |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
103 |
dataType: "json", |
| 257 | 104 |
contentType: "application/json; charset=UTF-8" |
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
105 |
}).done(function(space){ |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
106 |
var template_url = /*[[@{'/s/<%=space_id%>'}]]*/"s/<%=space_id%>"; |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
107 |
window.location = _.template(template_url)({space_id: space.id}); |
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
108 |
}); |
|
435
e529b633c339
Add shape management, correction on shape manip[ulation on the client, correct 404 error on space creation, increment version
ymh <ymh.work@gmail.com>
parents:
350
diff
changeset
|
109 |
|
|
97
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
110 |
//? window.location = "p/" + renkantitle : alert(/*[[#{renkanIndex.js.empty_name_error}]]*/"Please enter a name"); |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
111 |
} |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
112 |
|
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
113 |
/*]]>*/ |
|
f7d611f50e58
add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
114 |
</script> |
|
76
523f0647513e
add the count of project by spaces, add pagination, update libraries and add some more unit tests.
ymh <ymh.work@gmail.com>
parents:
71
diff
changeset
|
115 |
</body> |
| 51 | 116 |
</html> |