Files
crm.twinpol.com/modules/EcmReports/tpls/RaportAktywnosci.tpl

273 lines
11 KiB
Smarty
Raw Normal View History

2025-05-12 15:46:37 +00:00
<script>
{literal}
$(document).ready(function(){
$(".rowShowHide").hide();
$(".tablesShowHide").hide();
// Listener odpowiadający za akcje po kliknięciu na przycisk "Exportuj do programu Excel"
$(".showTables").bind("click",function(){
if($(this).attr("class")=="plusStyle showTables")
{
//pobieramy następny wiersz tabeli którą chcemy pokazac po czym go wyswietlamy
var nextTBody = $(this).parent().parent().parent().next();
while($(nextTBody).attr("id")!="stopTables")
{
//sprawdzamy czy kategoria
if($(nextTBody).attr("class")=="tablesorter-infoOnly tablesShowHide")
{
$(nextTBody).show();
}
nextTBody=$(nextTBody).next();
}
$(this).html("[-]");
$(this).attr("class","plusStyle hideTables");
}else if($(this).attr("class")=="plusStyle hideTables")
{
//pobieramy następny wiersz tabeli którą chcemy schowac po czym go chowamy
var nextTBody = $(this).parent().parent().parent().next();
while($(nextTBody).attr("id")!="stopTables")
{
//tu chowamy wszystko więc nie sprawdzamy kategori
$(nextTBody).hide();
var changePlusMinus = $(nextTBody).children().children();
if($(changePlusMinus[0]).children("a").attr("class")=="hideRows")
{
$(changePlusMinus[0]).children("a").attr("class","showRows");
$(changePlusMinus[0]).children("a").html("[+]");
}
nextTBody=$(nextTBody).next();
}
$(this).html("[+]");
$(this).attr("class","plusStyle showTables");
}
});
});
{/literal}
</script>
<h1>Raport aktywności użytkowników</h1>
<ul class="tablist" style="width:100%;"></ul>
<form action="index.php" method="get" name="RaportAktywnosci">
<input type="hidden" id="module" name="module" value="EcmReports"/>
<input type="hidden" id="action" name="action" value="RaportAktywnosci"/>
<input type="hidden" id="process" name="process" value="1"/>
<table class="tabForm" cellspacing="0" cellpadding="0" border="0" style="border-top: 0px none; margin-bottom: 4px;width:100%">
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data od: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="" value="{$date_from}" autocomplete="off">
<img id="date_from_trigger" border="0" align="absmiddle" alt="Enter Date" src="themes/default/images/jscalendar.gif">
<script language="JavaScript" type="text/javascript">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "%d.%m.%Y",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data do: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$date_to}" title="" tabindex="" size="11" maxlength="10" type="text">
<img src="themes/default/images/jscalendar.gif" alt="Enter Date" id="date_to_trigger" align="absmiddle" border="0">
<script language="JavaScript" type="text/javascript">
Calendar.setup ({ldelim}
inputField : "date_to",
daFormat : "%d.%m.%Y",
button : "date_to_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</tr>
</table>
<input type="submit" class="button" value="Wykonaj"/>
<input type="button" class="button" value="Wyczyść" onClick = "window.location='index.php?module=EcmReports&action=RaportAktywnosci'"/>
</form>
{if isset($lists)}
<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-table/jquery.appendGrid-1.3.1.css"/>
<link rel="stylesheet" type="text/css" href="include/jQuery/tablesorter/themes/blue/style.css"/>
<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-ui/themes/base/jquery-ui.css"/>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
.additionalColumn {
background-color: #87CCED;
border-top: 1px solid black;
}
.groupActive {
border-top: 1px solid black;
border-bottom: 1px solid black;
border-left: 1px solid black;
background-color: #87CCED;
}
.sumRow {
background-color: #BDC7B5;
}
.sumAll td{
background-color: #BDC7B5;
}
table.tablesorter tbody tr:hover td {
background: #E8E8E8;
color: #343432;
}
/* Extra selectors needed to override the default styling */
table.tablesorter tbody tr.normal-row td {
background: #EFEFF1;
color: #343432;
}
table.tablesorter tbody tr.alt-row td {
background: #FFF;
color: #343432;
}
/* Extra selectors needed to override the default styling */
table.tablesorter tbody tr.normal-row:hover td {
background: #E8E8E8;
color: #343432;
}
table.tablesorter tbody tr.alt-row:hover td {
background: #E8E8E8;
color: #343432;
}
table.tablesorter tbody tr.sumAll td {
background: #EBEBED;
color: black;
}
table.tablesorter tbody tr.sumAll:hover td {
background: #E0E0E2;
color: black;
font-weight: bold;
}
table.tablesorter .sumRow, .oddListRowS1 {
text-align: right;
}
table.tablesorter .alignLeft {
text-align: left;
}
table.tablesorter .subcategory .alignLeft {
padding-left: 20px;
}
table.tablesorter .contractor .alignLeft {
padding-left: 40px;
}
.plusStyle {
color: #abc3d7;
text-decoration: none;
cursor: pointer;
}
{/literal}
</style>
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="10%" class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="0" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Użytkownik</th>
{foreach from=$moduleLabels item=label key=labelkey name=loop}
<th width="{$colWidth}%" class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="0" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$label}</th>
{/foreach}
</tr>
</thead>
{foreach from=$lists item=list key=listkey name=loop}
{* Table headers *}
<tbody id="functions-core" class="tablesorter-infoOnly">
<tr class="static category">
<td class="oddListRowS1 alignLeft width="10%"><a class="plusStyle showTables">[+]</a> <b>{$users[$listkey].first_name} {$users[$listkey].last_name}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.accounts|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmproducts|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmquotes|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmsales|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecminvoiceouts|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmprepaymentinvoices|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmreceipts|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.notes|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.tasks|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.documents|@count}</b></td>
</tr>
</tbody>
<tbody aria-live="polite" aria-relevant="all" class="tablesorter-infoOnly tablesShowHide">
{foreach from=$OrderByDateList[$listkey] item=data name=loop2}
{if $smarty.foreach.loop2.index % 2 == 1}
<tr role="row" class="contractor">
{else}
<tr class="contractor" role="row">
{/if}
<td class="oddListRowS1 alignLeft" style="text-align:right;">
{$smarty.foreach.loop2.index+1}
</td>
<td class="oddListRowS1 alignLeft" style="text-align:right;">
{$data.date_entered|date_format:"%d.%m.%Y %H:%M:%S"}
</td>
<td class="oddListRowS1 alignLeft" style="text-align:right;" colspan="9">
{if $data.module=='accounts'}
Dodano nowego <a target="_blank" href="index.php?module=Accounts&action=DetailView&record={$data.id}">kontrahenta</a>
{/if}
{if $data.module=='ecmproducts'}
Dodano nowy <a target="_blank" href="index.php?module=EcmProducts&action=DetailView&record={$data.id}">produkt</a>
{/if}
{if $data.module=='ecmquotes'}
Dodano nową <a target="_blank" href="index.php?module=EcmQuotes&action=DetailView&record={$data.id}">ofertę</a>
{/if}
{if $data.module=='ecmsales'}
Dodano nowe <a target="_blank" href="index.php?module=EcmSales&action=DetailView&record={$data.id}">zamówienie</a>
{/if}
{if $data.module=='ecminvoiceouts'}
Dodano nową <a target="_blank" href="index.php?module=EcmInvoiceOuts&action=DetailView&record={$data.id}">fakturę</a>
{/if}
{if $data.module=='ecmprepaymentinvoices'}
Dodano nową <a target="_blank" href="index.php?module=EcmPrepaymentInvoices&action=DetailView&record={$data.id}">fakturę zaliczkową</a>
{/if}
{if $data.module=='ecmreceipts'}
Dodano nowy <a target="_blank" href="index.php?module=EcmReceipts&action=DetailView&record={$data.id}">paragon</a>
{/if}
{if $data.module=='notes'}
Dodano nową <a target="_blank" href="index.php?module=Notes&action=DetailView&record={$data.id}">notatkę</a>
{/if}
{if $data.module=='tasks'}
Dodano nowe <a target="_blank" href="index.php?module=Tasks&action=DetailView&record={$data.id}">zadanie</a>
{/if}
{if $data.module=='documents'}
Dodano nowy <a target="_blank" href="index.php?module=Documents&action=DetailView&record={$data.id}">dokument</a>
{/if}
</td>
{/foreach}
</tbody>
<tbody id="stopTables"></tbody>
{/foreach}
</table>
{/if}