UI: Wrap Dashboard and Top Controls in seperate cards

This commit is contained in:
johnnyq
2024-02-15 18:05:37 -05:00
parent b4c50a9cd8
commit 66d118c1f2
+40 -36
View File
@@ -38,48 +38,49 @@ $sql_years_select = mysqli_query(
); );
?> ?>
<div class="card card-body">
<form class="form-inline">
<input type="hidden" name="enable_financial" value="0">
<input type="hidden" name="enable_technical" value="0">
<form class="form-inline"> <select onchange="this.form.submit()" class="form-control mr-sm-3 col-sm-2" name="year">
<input type="hidden" name="enable_financial" value="0"> <?php
<input type="hidden" name="enable_technical" value="0">
<select onchange="this.form.submit()" class="form-control mb-3 mr-sm-3 col-sm-2" name="year"> while ($row = mysqli_fetch_array($sql_years_select)) {
<?php $year_select = $row['all_years'];
if (empty($year_select)) {
$year_select = date('Y');
}
?>
<option <?php if ($year == $year_select) {
echo "selected";
} ?>> <?php echo $year_select; ?></option>
while ($row = mysqli_fetch_array($sql_years_select)) { <?php
$year_select = $row['all_years'];
if (empty($year_select)) {
$year_select = date('Y');
} }
?> ?>
<option <?php if ($year == $year_select) { </select>
echo "selected";
} ?>> <?php echo $year_select; ?></option>
<?php <?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
} <div class="custom-control custom-switch mr-sm-3">
?> <input type="checkbox" onchange="this.form.submit()" class="custom-control-input" id="customSwitch1" name="enable_financial" value="1" <?php if ($user_config_dashboard_financial_enable == 1) {
</select> echo "checked";
} ?>>
<label class="custom-control-label" for="customSwitch1">Toggle Financial</label>
</div>
<?php } ?>
<?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?> <?php if ($session_user_role >= 2 && $config_module_enable_ticketing == 1) { ?>
<div class="custom-control custom-switch mr-sm-3 mb-3"> <div class="custom-control custom-switch">
<input type="checkbox" onchange="this.form.submit()" class="custom-control-input" id="customSwitch1" name="enable_financial" value="1" <?php if ($user_config_dashboard_financial_enable == 1) { <input type="checkbox" onchange="this.form.submit()" class="custom-control-input" id="customSwitch2" name="enable_technical" value="1" <?php if ($user_config_dashboard_technical_enable == 1) {
echo "checked"; echo "checked";
} ?>> } ?>>
<label class="custom-control-label" for="customSwitch1">Toggle Financial</label> <label class="custom-control-label" for="customSwitch2">Toggle Technical</label>
</div> </div>
<?php } ?> <?php } ?>
<?php if ($session_user_role >= 2 && $config_module_enable_ticketing == 1) { ?> </form>
<div class="custom-control custom-switch mb-3"> </div>
<input type="checkbox" onchange="this.form.submit()" class="custom-control-input" id="customSwitch2" name="enable_technical" value="1" <?php if ($user_config_dashboard_technical_enable == 1) {
echo "checked";
} ?>>
<label class="custom-control-label" for="customSwitch2">Toggle Technical</label>
</div>
<?php } ?>
</form>
<?php <?php
@@ -193,7 +194,7 @@ if ($user_config_dashboard_financial_enable == 1) {
$vendors_added = intval($row['vendors_added']); $vendors_added = intval($row['vendors_added']);
?> ?>
<div class="card card-body">
<!-- Icon Cards--> <!-- Icon Cards-->
<div class="row"> <div class="row">
<div class="col-lg-4 col-md-6 col-sm-12"> <div class="col-lg-4 col-md-6 col-sm-12">
@@ -568,6 +569,7 @@ if ($user_config_dashboard_financial_enable == 1) {
</div> </div>
</div> </div>
</div> <!-- row --> </div> <!-- row -->
</div> <!--card -->
<?php } ?> <?php } ?>
@@ -656,6 +658,7 @@ if ($user_config_dashboard_technical_enable == 1) {
?> ?>
<div class="card card-body">
<!-- Icon Cards--> <!-- Icon Cards-->
<div class="row"> <div class="row">
@@ -851,6 +854,7 @@ if ($user_config_dashboard_technical_enable == 1) {
</div> </div>
</div> </div>
</div> <!-- Card -->
<?php } ?> <?php } ?>