Subversion Repositories Sigmater

Rev

Blame | Last modification | View Log | Download | RSS feed

<#import "/template/srm/defaultLayout.ftl" as layout>

<@layout.myLayout  title="Monitoraggio Utenti" tipoMenu="menu4" scripts=["js/common.js","js/jquery-latest.js","js/jquery.tablesorter.min.js"] iCss=["css/srm.css","css/tablesorter.css"]>

        <script type="text/javascript">
        $(document).ready(function()
                {
                        $("#tabLista").tablesorter(
                                {headers: { 
                                                        0:{sorter: false},
                                                        4:{sorter: false},
                                }}
                        );
                }
        );
        </script>

    <div id="content-1colonna"> 
                <h3 align="center">Monitoraggio Utenti</h3>
                <hr>
                <@s.form action="listStats" method="post" cssClass="ricerca">
                        <@s.textfield label="Utente " name="utenteDaCercare.username" value=utenteDaCercare.username cssClass="rigaDispari" />
                    <@s.hidden id="indiceData" name="indiceData"/>
                    <@s.select label="Ente" list="enti" name="ente" headerKey="0" headerValue="Tutti gli enti"  listKey="idEnte" listValue="nomeComune" onchange="javascript:inviaForm('listStats','listStats.do');" cssClass="rigaPari"/>

                    <@s.hidden id="username" name="username"/>
                    <@s.hidden id="idEnte" name="idEnte"/>
                        <@s.select label="Periodo" list="listaScelte" name="giorni" listKey="nGiorni" listValue="descrizione" onchange="javascript:inviaForm('listStats','listStats.do');" cssClass="rigaDispari"/>
                        <#if monitoraggio??>
                                <@s.hidden id="strData" name="strData" value='${dataCorrente?string("yyyy-MM-dd")}'/>
                        </#if>
                <tr><td>
                        <div class="pulsante"><a  class="button icon search" href="javascript:%20inviaForm('listStats','/srmAdmin/listStats.do')">cerca</a></div>
                </td></tr>
                </@s.form>
                <hr>
                <#if monitoraggio??>
                         <#if (date?? )  >
                                <#if (date?size = indiceData+1) >
                                        <#assign primoRecord = "disabled='disabled'">
                                <#else>
                                        <#assign primoRecord = "">
                                </#if>
                                <#if (indiceData = 0) > 
                                        <#assign ultimoRecord = "disabled='disabled'">
                                <#else>
                                        <#assign ultimoRecord = "">
                                </#if>
                         </#if>
                                        <table class="calendario">
                                        <tr>
                                                <td class="foglietto">
                                                        <p class="calendar">${dataCorrente?string("dd")} <em>${dataCorrente?string("MMMM")}</em></p>
                                                </td>
                                                <td colspan="4" > 
                                                        <span class="pulsante">
                                                        <ul class="button-group">
                                                                <input type="button" class="button pill" value="&lt;" onClick="inviaForm2('listStats','listStats.do' ,'indiceData','${indiceData+1}')"  ${primoRecord} />
                                                                <input type="button" class="button pill" value="&gt;" onClick="inviaForm2('listStats','listStats.do' ,'indiceData','${indiceData-1}')"  ${ultimoRecord} />
                                                        </ul>
                                                        </span>
                                                  </td>
                                        </tr>
                                        </table>
                                <span class='paginazione' >
                                        <#if (date?? )  >
                                                N. giorni trovati: ${date?size}
                                        </#if>
                                </span>
                                <table class="ricerca" id="tabLista">
                                        <thead>
                                        <tr>
                                                <th> </th>
                                                <th>Ente</th>
                                                <th>Utente</th>
                                                <th>N. interrogazioni effettuate</th>
                                                <th> </th>
                                        </tr>   
                                        </thead>
                                        <tbody>
                                                <#assign conta = 1 />
                                                <@s.iterator value="monitoraggio" status="monStatus" >
                                                <tr     class="<@s.if test="#monStatus.odd == true ">rigaPari</@s.if><@s.else>rigaDispari</@s.else>">
                                                        <td>${conta}</td>
                                                        <td><@s.property value="nomeEnte" /></td>
                                                        <td><@s.property value="nomeUtente" /></td>
                                                        <td><@s.property value="numeroInterrogazioni" /></td>
                                                        <td>
                                                                <a class="button icon mini arrowright" href="javascript: inviaForm3('listStats','dettaglioStats.do','idEnte','${idEnte}','username','${nomeUtente}')">
                                                                dettaglio</a>
                                                        </td>
                                                        <#assign conta = conta +1 />
                                                </tr>
                                                </@s.iterator>
                                        </tbody>
                                        <tfoot> 
                                        <tr>
                                                <td colspan=5> 
                                                        <span class="pulsante">
                                                        <ul class="button-group">
                                                                <li><input type="button" class="button pill" value="Primo giorno" onClick="inviaForm2('listStats','listStats.do' ,'indiceData','${date?size-1}')"  ${primoRecord} /></li>               
                                                                <li><input type="button" class="button pill " value="Giorno precedente" onClick="inviaForm2('listStats','listStats.do' ,'indiceData','${indiceData+1}')"  ${primoRecord} /></li>
                                                                <li><input type="button" class="button pill " value="Giorno seguente" onClick="inviaForm2('listStats','listStats.do' ,'indiceData','${indiceData-1}')"  ${ultimoRecord} /></li>
                                                                <li><input type="button" class="button pill " value="Ultimo giorno" onClick="inviaForm2('listStats','listStats.do' ,'indiceData','0')"  ${ultimoRecord} /></li>
                                                        </ul>
                                                        </span>
                                                  </td>
                                        </tr>
                                        </tfoot>        
                                </table>
                </#if>
</div>
<div id="content-right"> 
                

                <@s.actionmessage/> 
                <@s.fielderror />
                <@s.actionerror/> 
        <@s.fielderror>
                <@s.param>id</@s.param>
                </@s.fielderror>
        </div> 
</@layout.myLayout>