mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Advanced Logbook] Added duration as a column
This commit is contained in:
@@ -128,6 +128,7 @@
|
||||
\"frequency\":{\"show\":\"true\"},
|
||||
\"dcl\":{\"show\":\"true\"},
|
||||
\"last_modification\":{\"show\":\"false\"},
|
||||
\"duration\":{\"show\":\"false\"},
|
||||
}";
|
||||
}
|
||||
$current_opts = json_decode($options);
|
||||
@@ -240,6 +241,10 @@
|
||||
echo "\nvar o_template = { last_modification: {show: 'false'}};";
|
||||
echo "\nuser_options={...user_options, ...o_template};";
|
||||
}
|
||||
if (!isset($current_opts->duration)) {
|
||||
echo "\nvar o_template = { duration: {show: 'false'}};";
|
||||
echo "\nuser_options={...user_options, ...o_template};";
|
||||
}
|
||||
|
||||
foreach ($mapoptions as $mo) {
|
||||
if ($mo != null) {
|
||||
@@ -892,6 +897,9 @@ $options = json_decode($options);
|
||||
</th>
|
||||
<?php if (($options->datetime->show ?? "true") == "true") {
|
||||
echo '<th>' . __("Date/Time") . '</th>';
|
||||
} ?>
|
||||
<?php if (($options->duration->show ?? "false") == "true") {
|
||||
echo '<th>' . __("Duration") . '</th>';
|
||||
} ?>
|
||||
<?php if (($options->last_modification->show ?? "false") == "true") {
|
||||
echo '<th>' . __("Last modified") . '</th>';
|
||||
|
||||
@@ -22,6 +22,12 @@
|
||||
<label class="form-check-label" for="datetime"><?= __("Date/Time"); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" name="duration" type="checkbox" id="duration" <?php if (($options->duration->show ?? "false") == "true") { echo 'checked'; } ?>>
|
||||
<label class="form-check-label" for="duration"><?= __("Duration"); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" name="de" type="checkbox" id="de" <?php if (($options->de->show ?? "true") == "true") { echo 'checked'; } ?>>
|
||||
|
||||
Reference in New Issue
Block a user