<style>
<!--
 #positionDTable th {
  padding:0px;
} 
-->
</style>

<div id="masterContent">
  <div class="breadcrumbRight">&nbsp;</div>
  <div id="breadcrumb" msgid="titlePortfolioList">Portfolio List</div>
  <div id="pageTitle" class="content" msgid="titlePortfolioList2">Portfolio List</div>
  
  <div class="content" style="padding-top: 0px;">
<!-- <div><label>Portfolio List</label></div> -->
<!-- <div class="dotLine"></div> -->
 <div id="portfolioComboboxDiv" WMD_Role="hasAnyRole('abcde')" style="height:35px;">
 
    <div class="ui-widget" style="float:left;">
      <label msgid="PortfolioListAccountNo">Account Number </label>
      <select id="combobox2">
        <option value="">Select one...</option>
      </select>
    </div>
    
      <div class="ui-widget" style="float:left;margin-left:25px;">
        <label msgid="PortfolioListPortfolioNo">Portfolio Number </label>
        <select id="combobox3">
          <option value="">Select one...</option>
        </select>
      </div>
      <button style="float:left;margin-left:35px;" id="portfolioSearchButton2" onclick="portfolioList.portfolioSearchButton2Click()" msgid="buttonSearch">Search</button>
      <div style="clear:both;"></div>
      
</div>
  
   <div id="date" style="padding-left: 8px;">
			<table width="100%">
				<tr>
					<td class="setDateTd">
						<span class="asOfDate" msgid="publicDate">As of Date</span> 
						<select
							id="portfolioListSelectAsofdate" class="AsOfDate dropDownStyle">
							{{each(i,selectDate) app.user.asOfDate}}
						  		<option>${selectDate}</option>
							{{/each}}
						</select>
					</td>
					<td class="tdDateLine">
						<div class="dateLine"></div>
					</td>
				</tr>
			</table>
		</div>

<p><div id="portfolioPagination1" class="paginationFooter"></div></p>

<table id="positionDTable" class="portfolioTable">
    <tr>
      <td colspan="5" class="netAssetValueTd"><span msgid="titlePortfolioList2">Portfolio List</span></td>
    </tr>
    <tr>    
      <th WMD_Role="hasAnyRole('abcde')" style="text-align:center">
        <table class="headerTable"><tr><td class="middle_center" msgid="PortfolioListTable_accountNo">Account No.</td>
          <td class="middle_left">
            <span style="cursor:pointer"><div id="bpIcon1" class="sortUpIcon" onClick="portfolioList.sort('bpKey','asc',this)"></div></span><br>
            <span style="cursor:pointer"><div id="bpIcon2" class="sortDownIcon" onClick="portfolioList.sort('bpKey','desc',this)"></div></span>
          </td></tr>
        </table>
      </th>
      <th style="text-align:center"><table class="headerTable"><tr><td class="middle_center" msgid="PortfolioListTable_portfolioNo">Portfolio Number</td>
          <td class="middle_left">
            <span style="cursor:pointer"><div id="pNumberIcon1" class="sortUpIcon" onClick="portfolioList.sort('portfolioNumber','asc',this)"></div></span><br>
            <span style="cursor:pointer"><div id="pNumberIcon2" class="sortDownIcon" onClick="portfolioList.sort('portfolioNumber','desc',this)"></div></span>
          </td></tr>
        </table>
      </th>
      <th style="text-align:left"><table class="headerTable"><tr><td class="middle_left" msgid="PortfolioListTable_portfolioName">Portfolio Name</td>
          <td class="middle_left">
            <span style="cursor:pointer"><div id="pNameIcon1" class="sortUpIcon"  onClick="portfolioList.sort('portfolioName','asc',this)"></div></span><br>
            <span style="cursor:pointer"><div id="pNameIcon2" class="sortDownIcon"  onClick="portfolioList.sort('portfolioName','desc',this)"></div></span>
          </td></tr>
        </table>
      </th>
      <th style="text-align:center"><table class="headerTable"><tr><td msgid="PortfolioListTable_currency">Currency</td>
          <td class="middle_left">
            <span style="cursor:pointer"><div id="currencyIcon1" class="sortUpIcon" onClick="portfolioList.sort('currency','asc',this)"></div></span><br>
            <span style="cursor:pointer"><div id="currencyIcon2" class="sortDownIcon" onClick="portfolioList.sort('currency','desc',this)"></div></span>
          </td></tr>
        </table>
      </th>
      <th style="text-align:right"><table class="headerTable"><tr><td class="middle_right" msgid="PortfolioListTable_netAssetValue">Net Asset Value</td>
          <td class="middle_left">
            <span style="cursor:pointer"><div id="netValueIcon1" class="sortUpIcon"  onClick="portfolioList.sort('netAssetValue','asc',this)"></div></span><br>
            <span style="cursor:pointer"><div id="netValueIcon2" class="sortDownIcon" onClick="portfolioList.sort('netAssetValue','desc',this)"></div></span>
          </td></tr>
        </table>
      </th>  
   </tr>

    {{each data.result}} 
    <tr>
      <td WMD_Role="hasAnyRole('abcde')" class="middle_center">${bpKey}</td>
      <td class="middle_center">${portfolioNumber}</td>
      <td width="40%" class="middle_left">${portfolioName}</td>
      <td class="middle_center">${currency}</td>
      <td class="middle_right">${formatMoney(netAssetValue)}</td>
    </tr>
    {{/each}} 
    
    {{if pagination == null || pagination.totalCount == 0}}
    	<tr><td colspan='5'>No portfolio available</td></tr>
    <!-- 	<tr WMD_Role="hasAnyRole('abcde')"><td colspan='5'>No portfolio available for the selected date</td></tr> -->
    {{/if}}
    
</table>
    <p>&nbsp;</p>
    <div id="portfolioPagination2" class="paginationFooter"></div>
    <input type="hidden" id="bpNumberHidden"/>
    <input type="hidden" id="portfolioNumberHidden"/>
    <input type="hidden" id="asofdateHidden"/>
    <input type="hidden" id="directionHidden"/>
    <input type="hidden" id="proprtieHidden"/>
  </div>
  <div class="footer"><img src="images/layout/bkg-content-base-right.gif?version=|||xxx|||"/></div>
</div>
