server/src/main/webapp/WEB-INF/templates/renkanIndex.html
author ymh <ymh.work@gmail.com>
Thu, 24 Oct 2013 13:40:35 +0200
branchuser_management
changeset 227 0877747b0213
parent 224 0167b777ad15
child 257 6bf1126c5add
permissions -rw-r--r--
put password encoder where it can be injected
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}" />
123
daa99448319d first step for site administration
ymh <ymh.work@gmail.com>
parents: 97
diff changeset
    11
        
daa99448319d first step for site administration
ymh <ymh.work@gmail.com>
parents: 97
diff changeset
    12
        <script th:remove="all" type="text/javascript" src="../../static/lib/jquery.min.js"></script>
daa99448319d first step for site administration
ymh <ymh.work@gmail.com>
parents: 97
diff changeset
    13
        <script th:remove="all" type="text/javascript" src="../../static/js/thymol.js"></script> 
daa99448319d first step for site administration
ymh <ymh.work@gmail.com>
parents: 97
diff changeset
    14
81
555a094e2000 Changed CSS
veltr
parents: 76
diff changeset
    15
        <script src="../../lib/jquery.min.js" th:src="@{/static/lib/jquery.min.js}" ></script>
555a094e2000 Changed CSS
veltr
parents: 76
diff changeset
    16
        <script src="../../lib/underscore-min.js" th:src="@{/static/lib/underscore-min.js}" ></script>
555a094e2000 Changed CSS
veltr
parents: 76
diff changeset
    17
        <script src="../../js/main.js" th:src="@{/static/js/main.js}" ></script>
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
97
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    19
        <link href="../../static/css/style.css" rel="stylesheet" th:href="@{/static/css/style.css}"/>
81
555a094e2000 Changed CSS
veltr
parents: 76
diff changeset
    20
        <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
    21
    </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
    22
    <body>
97
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    23
      <div id="container">
150
5b62100b8562 - replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents: 127
diff changeset
    24
        <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
    25
            <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
    26
                <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
    27
            </header>
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
            <div id="inner">
87
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    29
                <div id="label" class="translate" th:text="#{renkanIndex.space_exp}">Create a Space</div> 
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    30
                <form action="#" onsubmit="go2Title();return false;">
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
    31
                    <input type="text" id="renkantitle" autofocus="autofocus"/> 
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
                    <button type="submit">OK</button>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
                </form>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
            </div>
71
9af0874ce43f First version of space level.
ymh <ymh.work@gmail.com>
parents: 51
diff changeset
    35
            <h2 th:text="#{renkanIndex.space_list}">Space list</h2>
87
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    36
            <div th:include="fragment/paginationFragment :: paginationFragment" class="pagination-container">
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    37
                <div>               
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    38
                    <a href="#?p.page=1">&lt;&lt;</a>                    
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    39
                    <a href="#?p.page=3">&lt;</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    40
                    <span>...</span>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    41
                    <a href="#?p.page=2">2</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    42
                    <a href="#?p.page=3">3</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    43
                    <span>4</span>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    44
                    <a href="#?p.page=5">5</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    45
                    <a href="#?p.page=6">6</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    46
                    <span>...</span>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    47
                    <a href="#?p.page=5">&gt;</a>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    48
                    <a href="#?p.page=7">&gt;&gt;</a> 
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    49
                </div>
6c810f746837 Externalize properties
ymh <ymh.work@gmail.com>
parents: 81
diff changeset
    50
            </div>
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
            <table>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
              <thead>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
                <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
    54
                    <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
    55
                    <th th:text="#{renkanIndex.space_creation}">Creation</th>
81
555a094e2000 Changed CSS
veltr
parents: 76
diff changeset
    56
                    <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
    57
                    <th th:text="#{renkanIndex.space_open}">Open</th>
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
                </tr>
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
              <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
    61
                <tr th:each="space: ${page.content}">
71
9af0874ce43f First version of space level.
ymh <ymh.work@gmail.com>
parents: 51
diff changeset
    62
                  <th th:text="${space.title}">title</th>
9af0874ce43f First version of space level.
ymh <ymh.work@gmail.com>
parents: 51
diff changeset
    63
                  <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
    64
                  <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
    65
                  <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
    66
                </tr>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
              </tbody>
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
            </table>            
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
        </div>
127
906fed13c1e1 space admin edit.
ymh <ymh.work@gmail.com>
parents: 123
diff changeset
    70
        <footer id="footer" th:include="fragment/pageFragment :: footerFragment">
97
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    71
            <div id="version">© <span class="version-date">2013</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
    72
        </footer>
97
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    73
      </div>
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    74
      <script th:inline="javascript" >
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    75
      /*<![CDATA[*/
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    76
    
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    77
          function go2Title()
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    78
          {
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    79
              var renkantitle = $("#renkantitle").val();
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    80
              if(renkantitle.length == 0) {
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    81
              	var alert_message = /*[[#{renkanIndex.js.empty_name_error}]]*/"Please enter a title"; 
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    82
              	alert(alert_message);
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    83
              	return false;
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    84
              }
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
              new_space = {
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    87
              	title: renkantitle,
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    88
              	description: "(empty description)",
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    89
              	uri: null
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    90
              };
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    91
              
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    92
              var post_url = /*[[@{/rest/spaces/}]]*/"/rest/spaces/"; 
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    93
              $.ajax(post_url, {
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    94
                  data:JSON.stringify(new_space),
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    95
                  type: "POST",
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    96
                  dataType: "json",
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    97
                  contentType: "application/json; charset=UTF-8"                    
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    98
              }).done(function(space){
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
    99
              	var template_url = /*[[@{'/s/<%=space_id%>'}]]*/"s/<%=space_id%>";
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
   100
              	window.location = _.template(template_url, {space_id: space.id});
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
   101
              });
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
   102
              
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
   103
              //? 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
   104
          }
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
   105
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
   106
      /*]]>*/
f7d611f50e58 add version str + improver css + new version
ymh <ymh.work@gmail.com>
parents: 87
diff changeset
   107
      </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
   108
    </body>
51
3247fccfbd3f update on renkan
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
</html>