server/src/main/webapp/WEB-INF/templates/projectIndex.html
changeset 137 efc0fce30814
parent 136 a822178766ce
child 150 5b62100b8562
--- a/server/src/main/webapp/WEB-INF/templates/projectIndex.html	Thu Apr 04 15:35:15 2013 +0200
+++ b/server/src/main/webapp/WEB-INF/templates/projectIndex.html	Thu Apr 04 18:20:59 2013 +0200
@@ -30,46 +30,54 @@
                     <button type="submit">OK</button>
                 </form>
             </div>
-            <h2 th:text="#{renkanIndex.project_list}">Project list</h2>
-            <div th:include="fragment/paginationFragment :: paginationFragment" class="pagination-container">
-                <div>               
-                    <a href="#?p.page=1">&lt;&lt;</a>                    
-                    <a href="#?p.page=3">&lt;</a>
-                    <span>...</span>
-                    <a href="#?p.page=2">2</a>
-                    <a href="#?p.page=3">3</a>
-                    <span>4</span>
-                    <a href="#?p.page=5">5</a>
-                    <a href="#?p.page=6">6</a>
-                    <span>...</span>
-                    <a href="#?p.page=5">&gt;</a>
-                    <a href="#?p.page=7">&gt;&gt;</a> 
-                </div>
-            </div>
-            <table th:with="columnSort=${param['p.sort']}?${param['p.sort'][0]}:'updated',sortDir=${param['p.sort.dir']}?${param['p.sort.dir'][0]}:'desc'">
-              <thead th:with="sortDirInv=${sortDir}=='desc'?'asc':'desc'">
-                <tr>
-                    <th th:with="sorted=(${columnSort}=='title')"><span th:text="#{renkanIndex.project_name}">Name</span><form method="get" class="proj-sort-form"><input type="hidden" name="p.sort" value="title"/><input type="hidden" name="p.sort.dir" th:value="${sorted}?${sortDirInv}:'desc'"/><input type="submit" class="proj-sortable-col" th:class="${sorted}?'proj-sort-'+${sortDir}+'-col':'proj-sortable-col'" value=""/></form></th>
-                    <th th:with="sorted=(${columnSort}=='updated')"><span th:text="#{renkanIndex.project_updated}">Updated</span><form method="get" class="proj-sort-form"><input type="hidden" name="p.sort" value="updated"/><input type="hidden" name="p.sort.dir" th:value="(${sorted})?${sortDirInv}:'desc'"/><input type="submit" class="proj-sort-desc-col" th:class="${sorted}?'proj-sort-'+${sortDir}+'-col':'proj-sortable-col'" value=""/></form></th>
-                    <th th:with="sorted=(${columnSort}=='created')"><span th:text="#{renkanIndex.project_creation}" >Creation</span><form method="get" class="proj-sort-form"><input type="hidden" name="p.sort" value="created"/><input type="hidden" name="p.sort.dir" th:value="${sorted}?${sortDirInv}:'desc'"/><input type="submit" class="proj-sort-asc-col" th:class="${sorted}?'proj-sort-'+${sortDir}+'-col':'proj-sortable-col'" value=""/></form></th>
-                    <th th:text="#{renkanIndex.project_edit}">Edit</th>
-                    <th th:text="#{renkanIndex.project_copy}">Copy</th>
-                    <th th:text="#{renkanIndex.project_delete}">Del.</th>
-                    <th th:text="#{renkanIndex.project_render}">View</th>
-                </tr>
-              </thead>
-              <tbody>
-                <tr th:each="project: ${page}">
-                  <th th:text="${project.title}">title</th>
-                  <td th:text="${project.updated}?${#dates.format(project.updated, #messages.msg('date.format'))}:''">update</td>
-                  <td th:text="${#dates.format(project.created, #messages.msg('date.format'))}">date</td>
-                  <td><a href="#" th:href="@{'/p/'+${project.id}(cowebkey=${project.getKey(2)})}" th:text="#{renkanIndex.project_edit_link}">Edit project</a></td>
-                  <td><a href="#" th:text="#{renkanIndex.project_copy_link}" th:attr="data-project_id=${project.id}" class="copy_project">Copy project</a></td>
-                  <td><a href="#" th:text="#{renkanIndex.project_delete_link}" th:attr="data-project_id=${project.id},data-project_title=${project.title}" class="delete_project">Delete project</a></td>
-                  <td><a href="#" th:href="@{'/p/pub/'+${project.id}(cowebkey=${project.getKey(1)})}" th:text="#{renkanIndex.project_render_link}">View project</a></td>
-                </tr>
-              </tbody>
-            </table>            
+            <div id="project-list-container">
+              <h2 th:text="#{renkanIndex.project_list}">Project list</h2>
+              <div id="project-filter-container">
+                  <form method="get"> 
+                      <input type="text" id="project-filter" name="filter" placeholder="filter title" th:placeholder="#{renkanIndex.project_filter}" th:value="${param['filter']}?${param['filter'][0]}:''" /> 
+                      <button type="submit">OK</button>
+                  </form>                            
+              </div>
+              <div th:include="fragment/paginationFragment :: paginationFragment" class="pagination-container">
+                  <div>               
+                      <a href="#?p.page=1">&lt;&lt;</a>                    
+                      <a href="#?p.page=3">&lt;</a>
+                      <span>...</span>
+                      <a href="#?p.page=2">2</a>
+                      <a href="#?p.page=3">3</a>
+                      <span>4</span>
+                      <a href="#?p.page=5">5</a>
+                      <a href="#?p.page=6">6</a>
+                      <span>...</span>
+                      <a href="#?p.page=5">&gt;</a>
+                      <a href="#?p.page=7">&gt;&gt;</a> 
+                  </div>
+              </div>
+              <table th:with="columnSort=${param['p.sort']}?${param['p.sort'][0]}:'updated',sortDir=${param['p.sort.dir']}?${param['p.sort.dir'][0]}:'desc'">
+                <thead th:with="sortDirInv=${sortDir}=='desc'?'asc':'desc'">
+                  <tr>
+                      <th th:with="sorted=(${columnSort}=='title')"><span th:text="#{renkanIndex.project_name}">Name</span><form method="get" class="proj-sort-form"><input type="hidden" name="p.sort" value="title"/><input type="hidden" name="p.sort.dir" th:value="${sorted}?${sortDirInv}:'desc'"/><input th:if="${param['filter']}" name="filter" type="hidden" th:value="${param['filter'][0]}"/><input type="submit" class="proj-sortable-col" th:class="${sorted}?'proj-sort-'+${sortDir}+'-col':'proj-sortable-col'" value=""/></form></th>
+                      <th th:with="sorted=(${columnSort}=='updated')"><span th:text="#{renkanIndex.project_updated}">Updated</span><form method="get" class="proj-sort-form"><input type="hidden" name="p.sort" value="updated"/><input type="hidden" name="p.sort.dir" th:value="(${sorted})?${sortDirInv}:'desc'"/><input th:if="${param['filter']}" name="filter" type="hidden" th:value="${param['filter'][0]}"/><input type="submit" class="proj-sort-desc-col" th:class="${sorted}?'proj-sort-'+${sortDir}+'-col':'proj-sortable-col'" value=""/></form></th>
+                      <th th:with="sorted=(${columnSort}=='created')"><span th:text="#{renkanIndex.project_creation}" >Creation</span><form method="get" class="proj-sort-form"><input type="hidden" name="p.sort" value="created"/><input type="hidden" name="p.sort.dir" th:value="${sorted}?${sortDirInv}:'desc'"/><input th:if="${param['filter']}" name="filter" type="hidden" th:value="${param['filter'][0]}"/><input type="submit" class="proj-sort-asc-col" th:class="${sorted}?'proj-sort-'+${sortDir}+'-col':'proj-sortable-col'" value=""/></form></th>
+                      <th th:text="#{renkanIndex.project_edit}">Edit</th>
+                      <th th:text="#{renkanIndex.project_copy}">Copy</th>
+                      <th th:text="#{renkanIndex.project_delete}">Del.</th>
+                      <th th:text="#{renkanIndex.project_render}">View</th>
+                  </tr>
+                </thead>
+                <tbody>
+                  <tr th:each="project: ${page}">
+                    <th th:text="${project.title}">title</th>
+                    <td th:text="${project.updated}?${#dates.format(project.updated, #messages.msg('date.format'))}:''">update</td>
+                    <td th:text="${#dates.format(project.created, #messages.msg('date.format'))}">date</td>
+                    <td><a href="#" th:href="@{'/p/'+${project.id}(cowebkey=${project.getKey(2)})}" th:text="#{renkanIndex.project_edit_link}">Edit project</a></td>
+                    <td><a href="#" th:text="#{renkanIndex.project_copy_link}" th:attr="data-project_id=${project.id}" class="copy_project">Copy project</a></td>
+                    <td><a href="#" th:text="#{renkanIndex.project_delete_link}" th:attr="data-project_id=${project.id},data-project_title=${project.title}" class="delete_project">Delete project</a></td>
+                    <td><a href="#" th:href="@{'/p/pub/'+${project.id}(cowebkey=${project.getKey(1)})}" th:text="#{renkanIndex.project_render_link}">View project</a></td>
+                  </tr>
+                </tbody>
+              </table>
+            </div>            
         </div>
         <footer id="footer" th:include="fragment/pageFragment :: footerFragment">
             <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>