NIHVIVO-2894: Updated account templates to enable search and account total. Working on filter by role,

This commit is contained in:
manolobevia 2011-07-14 03:21:01 +00:00
parent 3e30283d6b
commit 331e8c5bfa
2 changed files with 20 additions and 17 deletions

View file

@ -44,24 +44,25 @@
</p> </p>
</section> </section>
</#if> </#if>
<form method="POST" action="${formUrls.list}" class="customForm" role="filter by roles">
<section id="filter-roles"> <section id="filter-roles">
<select name="roleFilterUri" id=""> <select name="roleFilterUri" id="roleFilterUri">
<option value="" <#if roleFilterUri = "">selected</#if> >Filter by roles</option> <option value="" <#if roleFilterUri = "">selected</#if> >Filter by roles</option>
<#list roles as role> <#list roles as role>
<option value="${role.uri}" <#if roleFilterUri = role.uri>selected</#if> >${role.label}</option> <option value="${role.uri}" <#if roleFilterUri = role.uri>selected</#if> >${role.label}</option>
</#list> </#list>
<!-- <!--
When roleFilterUri or searchTerm changes, When roleFilterUri or searchTerm changes,
pageIndex should be set to 1. When any of these changes (including pageIndex), the form pageIndex should be set to 1. When any of these changes (including pageIndex), the form
should be submitted. should be submitted.
--> -->
</select> </select>
</section> </section>
</form>
<form method="POST" action="${formUrls.list}" class="customForm" role="search accounts"> <form method="POST" action="${formUrls.list}" class="customForm" role="search accounts">
<section id="search-accounts"> <section id="search-accounts">
<input type="text" name="" /> <input type="text" name="searchTerm" />
<input class="submit" type="submit" value="Search accounts"/> <input class="submit" type="submit" value="Search accounts"/>
<!-- <!--
When searchTerm changes, When searchTerm changes,

View file

@ -5,6 +5,7 @@
and delete function. and delete function.
------------------------------------------------------------------------------> ------------------------------------------------------------------------------>
<#assign counts=[25, 50, 100] /> <#-- accounts per page--> <#assign counts=[25, 50, 100] /> <#-- accounts per page-->
<#macro accountsNav accountsCount=counts> <#macro accountsNav accountsCount=counts>
@ -17,12 +18,13 @@
--> -->
<nav class="display-tools"> <nav class="display-tools">
<span>| n accounts | </span> <span>| ${total} accounts | </span>
<select name="accountsPerPage" class="accounts-per-page"> <select name="accountsPerPage" class="accounts-per-page">
<#list accountsCount as count> <#list accountsCount as count>
<option value="${count}" <#if accountsPerPage= count>selected</#if> >${count}</option> <option value="${count}" <#if accountsPerPage=count>selected</#if> >${count}</option>
</#list> </#list>
<option value="${total}" <#if accountsPerPage=total>selected</#if> >All</option>
<!-- <!--
When accountsPerPage changes, When accountsPerPage changes,
set pageIndex to 1 set pageIndex to 1