Files
ShrinkVertically/Template/config/show.php

42 lines
2.3 KiB
PHP
Raw Permalink Normal View History

2026-06-28 17:03:37 -03:00
<div class="page-header">
<h2><?= t('Shrink Vertically') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('ConfigController', 'save', array('plugin' => 'ShrinkVertically')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<fieldset>
<?= $this->form->label(t('Vertical offset in pixels'), 'shrink_vertically_offset') ?>
<?= $this->form->number('shrink_vertically_offset', $values, $errors) ?>
<p class="form-help">
<?= t('Pixels reserved above and below the vertically collapsed board columns (page header, column header and the horizontal scrollbar). A larger value makes the columns shorter. Default: 240.') ?>
</p>
<?= $this->form->checkbox('shrink_vertically_auto', t('Auto adjust (fit columns to the screen automatically)'), 1, isset($values['shrink_vertically_auto']) && $values['shrink_vertically_auto'] == 1, '', array('id' => 'form-shrink_vertically_auto')) ?>
<p class="form-help">
<?= t('When enabled, the collapsed column height is measured live on the board to fit the screen, so the right-side vertical scrollbar is not needed. The pixel offset above is then ignored (shown dimmed).') ?>
</p>
2026-06-28 17:03:37 -03:00
</fieldset>
<fieldset>
2026-07-01 10:00:33 -03:00
<?= $this->form->label(t('Top Horizontal Scrollbar thickness in pixels'), 'shrink_vertically_bar_size') ?>
<?= $this->form->number('shrink_vertically_bar_size', $values, $errors) ?>
<p class="form-help">
2026-07-01 10:06:10 -03:00
<?= t('Thickness of the top horizontal scrollbar. Default: 25.') ?>
</p>
</fieldset>
2026-06-28 17:19:04 -03:00
<fieldset>
<?= $this->form->checkbox('shrink_vertically_top_scrollbar', t('Add a top horizontal scrollbar to the board'), 1, isset($values['shrink_vertically_top_scrollbar']) && $values['shrink_vertically_top_scrollbar'] == 1) ?>
2026-06-28 17:19:04 -03:00
<p class="form-help">
<?= t('Adds a second horizontal scrollbar above the columns, mirrored with the board scrollbar, so you do not have to scroll to the bottom to move sideways.') ?>
2026-06-28 17:19:04 -03:00
</p>
</fieldset>
2026-06-28 17:03:37 -03:00
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>
<?php /* The "Auto adjust" checkbox dims/disables the offset input via Asset/js/shrink-vertically.js
(loaded globally). An inline <script> here would be blocked by Kanboard's CSP. */ ?>