server/java/renkan-web/src/main/webapp/WEB-INF/templates/renkanIndex.html
author ymh <ymh.work@gmail.com>
Sun, 14 Jul 2024 22:00:08 +0200
changeset 666 9d6550026232
parent 493 6f2ab1a72f4a
permissions -rw-r--r--
Added tag V00.13.04 for changeset 69d13e7dd286
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
        <title>Renkan</title>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
        <meta charset="utf-8"/>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
127
906fed13c1e1 space admin edit.
ymh <ymh.work@gmail.com>
parents: 123
diff changeset
    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
0b6f2883a67b update path to the new lib folders
rougeronj
parents: 316
diff changeset
    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
daa99448319d first step for site administration
ymh <ymh.work@gmail.com>
parents: 97
diff changeset
    14
350
0b6f2883a67b update path to the new lib folders
rougeronj
parents: 316
diff changeset
    15
        <script src="../../lib/jquery/jquery.js" th:src="@{/static/lib/jquery/jquery.js}" ></script>
0b6f2883a67b update path to the new lib folders
rougeronj
parents: 316
diff changeset
    16
        <script src="../../lib/underscore/underscore.js" th:src="@{/static/lib/underscore/underscore.js}" ></script>
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    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
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    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
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    29
                <form action="#" onsubmit="go2Title();return false;">
304
8ad1734d9d8a add export link on project
ymh <ymh.work@gmail.com>
parents: 298
diff changeset
    30
                    <fieldset id="form-fields">
8ad1734d9d8a add export link on project
ymh <ymh.work@gmail.com>
parents: 298
diff changeset
    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>
8ad1734d9d8a add export link on project
ymh <ymh.work@gmail.com>
parents: 298
diff changeset
    32
                    </fieldset>
8ad1734d9d8a add export link on project
ymh <ymh.work@gmail.com>
parents: 298
diff changeset
    33
                    <div id="form-submit"><button type="submit">OK</button></div>
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
                </form>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
            </div>
71
9af0874ce43f First version of space level.
ymh <ymh.work@gmail.com>
parents: 51
diff changeset
    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
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    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
2f35c2ae7de8 export + import renkans
ymh <ymh.work@gmail.com>
parents: 257
diff changeset
    45
                    <a href="#?p.page=1">&lt;&lt;</a>
87
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    46
                    <a href="#?p.page=3">&lt;</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    47
                    <span>...</span>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    48
                    <a href="#?p.page=2">2</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    49
                    <a href="#?p.page=3">3</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    50
                    <span>4</span>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    51
                    <a href="#?p.page=5">5</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    52
                    <a href="#?p.page=6">6</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    53
                    <span>...</span>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    54
                    <a href="#?p.page=5">&gt;</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">&gt;&gt;</a>
87
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    56
                </div>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    57
            </div>
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
            <table>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
              <thead>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    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
555a094e2000 Changed CSS
veltr
parents: 76
diff changeset
    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
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
                </tr>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
              </thead>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    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
9af0874ce43f First version of space level.
ymh <ymh.work@gmail.com>
parents: 51
diff changeset
    69
                  <th th:text="${space.title}">title</th>
9af0874ce43f First version of space level.
ymh <ymh.work@gmail.com>
parents: 51
diff changeset
    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
9af0874ce43f First version of space level.
ymh <ymh.work@gmail.com>
parents: 51
diff changeset
    72
                  <td><a href="#" th:href="@{'/s/'+${space.id}}" th:text="#{renkanIndex.space_open_link}">Open space</a></td>
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
                </tr>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    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
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
        </div>
127
906fed13c1e1 space admin edit.
ymh <ymh.work@gmail.com>
parents: 123
diff changeset
    77
        <footer id="footer" th:include="fragment/pageFragment :: footerFragment">
257
6bf1126c5add add header to go back to space
ymh <ymh.work@gmail.com>
parents: 224
diff changeset
    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
906fed13c1e1 space admin edit.
ymh <ymh.work@gmail.com>
parents: 123
diff changeset
    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
6bf1126c5add add header to go back to space
ymh <ymh.work@gmail.com>
parents: 224
diff changeset
   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
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
</html>