.form-group label for="name" = Kms::Product.human_attribute_name(:name) input#name.form-control type="text" ng-model="product.name" required="" .form-group label for="description" = Kms::Product.human_attribute_name(:description) textarea#description.form-control ng-model="product.description" rows="15" ng-if="currentUser.admin" ui-codemirror="{lineNumbers: true, mode:'htmlmixed'}" textarea#description.form-control ng-model="product.description" rows="15" ng-if="!currentUser.admin" ckeditor='editorOptions' .form-group label for="price" = Kms::Product.human_attribute_name(:price) input#price.form-control type="text" ng-model="product.price" .form-group label for="category_ids" = Kms::Product.human_attribute_name(:categories) /select#categories_ids.form-control.ui-select-multiple ng-model="category.categories_ids" ng-options="category.id as category.name for category in categories" required="" ui-select multiple="" ng-model="product.category_ids" theme="bootstrap" on-select="addCat($item, $model)" on-remove='removeCat($item, $model)' ui-select-match placeholder="Выберите категории..." | {{$item.name}} ui-select-choices repeat="category.id as category in categories" div ng-bind-html="category.name | highlight: $select.search" .form-group label for="image" = Kms::Product.human_attribute_name(:image) div flow-init="{singleFile: true, headers: setHeaders, fileParameterName: 'product[image]'}" flow-files-submitted="product.image = $flow.files[0].file" flow-file-added="!!{png:1,gif:1,jpg:1,jpeg:1}[$file.getExtension()]" flow-file-success="$file.msg = $message" input type="file" flow-btn="" ng-model='product.image' div class="thumbnail" ng-show="!$flow.files.length" img ng-src="{{product.image.url}}" div class="thumbnail" ng-show="$flow.files.length" img flow-img="$flow.files[0]" .form-group label for="preview_image" = Kms::Product.human_attribute_name(:preview_image) div flow-init="{singleFile: true, headers: setHeaders, fileParameterName: 'product[preview_image]'}" flow-files-submitted="product.preview_image = $flow.files[0].file" flow-file-added="!!{png:1,gif:1,jpg:1,jpeg:1}[$file.getExtension()]" flow-file-success="$file.msg = $message" input type="file" flow-btn="" ng-model='product.preview_image' div class="thumbnail" ng-show="!$flow.files.length" img ng-src="{{product.preview_image.url}}" div class="thumbnail" ng-show="$flow.files.length" img flow-img="$flow.files[0]"