Reports use new UI

merge-requests/27/head
Mike Koch 8 years ago
parent af8af9b241
commit f1d4a69f61

@ -37,6 +37,7 @@ require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php'); require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/reporting_functions.inc.php'); require(HESK_PATH . 'inc/reporting_functions.inc.php');
require(HESK_PATH . 'inc/mail_functions.inc.php');
hesk_load_database_functions(); hesk_load_database_functions();
hesk_session_start(); hesk_session_start();
@ -214,15 +215,8 @@ require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
/* Print main manage users page */ /* Print main manage users page */
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?> ?>
<section class="content">
<div class="row move-down-20"> <div class="box">
<div align="left" class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<?php echo $hesklang['reports_tab']; ?> <a href="#"
onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['reports_intro']); ?>')"><i
class="fa fa-question-circle settingsquestionmark"></i></a>
</div>
<?php if (hesk_checkPermission('can_export', 0)) { <?php if (hesk_checkPermission('can_export', 0)) {
$canExport = true; $canExport = true;
$panelMargin = '-15px'; $panelMargin = '-15px';
@ -230,16 +224,28 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
$canExport = false; $canExport = false;
} }
?> ?>
<div class="panel-body" <?php if ($canExport) echo 'style="margin-top: -15px";'; ?>> <div class="box-header">
<h1 class="box-title">
<?php echo $hesklang['reports_tab']; ?> <a href="#"
onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['reports_intro']); ?>')"><i
class="fa fa-question-circle settingsquestionmark"></i></a>
</h1><br>
<?php <?php
// Show a link to export.php if user has permission to do so // Show a link to export.php if user has permission to do so
if ($canExport) { if ($canExport) {
echo '<small><a title="' . $hesklang['export'] . '" href="export.php">' . $hesklang['export'] . '</a></small><div class="blankSpace"></div>'; echo '<small><a title="' . $hesklang['export'] . '" href="export.php">' . $hesklang['export'] . '</a></small><div class="blankSpace"></div>';
} }
?> ?>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse">
<i class="fa fa-minus"></i>
</button>
</div>
</div>
<div class="box-body">
<form action="reports.php" method="get" name="form1" role="form"> <form action="reports.php" method="get" name="form1" role="form">
<div class="form-group"> <div class="form-group">
<label for="dtrg" class="control-label"><?php echo $hesklang['dtrg']; ?></b>:</label> <label for="dtrg" class="control-label"><?php echo $hesklang['dtrg']; ?>:</label>
<div class="radio move-right-20"> <div class="radio move-right-20">
<input type="radio" name="w" value="0" id="w0" <?php echo $selected['w'][0]; ?> /> <input type="radio" name="w" value="0" id="w0" <?php echo $selected['w'][0]; ?> />
@ -309,32 +315,37 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
value="4" <?php echo $selected['type'][4]; ?>><?php echo $hesklang['t4']; ?></option> value="4" <?php echo $selected['type'][4]; ?>><?php echo $hesklang['t4']; ?></option>
</select> </select>
</div> </div>
<div class="form-group text-center"> <div class="form-group">
<input type="submit" value="<?php echo $hesklang['dire']; ?>" class="btn btn-default"/> <input type="submit" value="<?php echo $hesklang['dire']; ?>" class="btn btn-default"/>
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/> <input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="box">
<div class="box-header">
<h1 class="box-title">
<?php
if ($date_from == $date_to) {
echo hesk_dateToString($date_from, 0);
} else {
echo hesk_dateToString($date_from, 0) . ' - ' . hesk_dateToString($date_to, 0);
}
?>
</h1>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse">
<i class="fa fa-minus"></i>
</button>
</div>
</div> </div>
<div class="col-sm-8"> <div class="box-body">
<?php <?php
/* This will handle error, success and notice messages */ /* This will handle error, success and notice messages */
hesk_handle_messages(); hesk_handle_messages();
?> ?>
<?php <?php
if ($date_from == $date_to) {
?>
<h3><?php echo hesk_dateToString($date_from, 0); ?></h3>
<div class="footerWithBorder blankSpace"></div>
<?php
} else {
?>
<h3><?php echo hesk_dateToString($date_from, 0); ?> - <?php echo hesk_dateToString($date_to, 0); ?></h3>
<div class="footerWithBorder blankSpace"></div>
<?php
}
// Show a note if reports are limited // Show a note if reports are limited
if (!$can_run_reports_full) { if (!$can_run_reports_full) {
@ -909,6 +920,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?> ?>
</div> </div>
</div> </div>
</section>
<?php <?php
require_once(HESK_PATH . 'inc/footer.inc.php'); require_once(HESK_PATH . 'inc/footer.inc.php');

Loading…
Cancel
Save