Samuel Georges c5362652c1 Begin the process of refitting brand settings
Introduce secondary and accent colors
Switch some CSS to use the new storm utils
Other minor improvements
2016-04-05 20:04:11 +10:00

41 lines
2.5 KiB
HTML

<?php
$selectionModes = [
Cms\Widgets\MediaManager::SELECTION_MODE_NORMAL => trans('cms::lang.media.selection_mode_normal'),
Cms\Widgets\MediaManager::SELECTION_MODE_FIXED_RATIO => trans('cms::lang.media.selection_mode_fixed_ratio'),
Cms\Widgets\MediaManager::SELECTION_MODE_FIXED_SIZE => trans('cms::lang.media.selection_mode_fixed_size')
];
$sizeDisabledAttr = $currentSelectionMode == Cms\Widgets\MediaManager::SELECTION_MODE_NORMAL ? 'disabled="disabled"' : null;
?>
<div class="control-toolbar toolbar-padded">
<div class="toolbar-item toolbar-primary">
<div data-control="toolbar">
<label class="standalone"><?= e(trans('cms::lang.media.image_size')) ?> <span data-label="width"><?= $dimensions[0] ?></span> x <span data-label="height"><?= $dimensions[1] ?></span></label>
<div class="btn-group offset-right">
<button type="button" class="btn btn-primary standalone" data-command="resize"
><?= e(trans('cms::lang.media.resize')) ?></button>
<button type="button" class="btn btn-primary oc-icon-undo empty" data-command="undo-resizing"></button>
</div>
<label for="mmcropimagewidth"><?= e(trans('cms::lang.media.selection_mode')) ?></label>
<select name="selectionMode" class="form-control custom-select w-150" data-control="selection-mode">
<?php foreach ($selectionModes as $mode=>$name): ?>
<option <?= $mode == $currentSelectionMode ? 'selected="selected"' : null ?> value="<?= $mode ?>"><?= e($name) ?></option>
<?php endforeach ?>
</select>
<label for="mmcropimagewidth"><?= e(trans('cms::lang.media.width')) ?></label>
<input id="mmcropimagewidth" type="text" class="form-control w-50" data-control="crop-width-input" name="selectionWidth" value="<?= e($currentSelectionWidth) ?>" <?= $sizeDisabledAttr ?>/>
<label for="mmcropimageheight"><?= e(trans('cms::lang.media.height')) ?></label>
<input id="mmcropimageheight" type="text" class="form-control w-50" data-control="crop-height-input" name="selectionHeight" value="<?= e($currentSelectionHeight) ?>" <?= $sizeDisabledAttr ?>/>
<label class="standalone hide" data-label="selection-size"><?= e(trans('cms::lang.media.selected_size')) ?> <span data-label="selection-width"></span> x <span data-label="selection-height"></span></label>
</div>
</div>
</div>