mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Make it possible to merge products (closes #243)
This commit is contained in:
@@ -136,6 +136,13 @@
|
||||
title="{{ $__t('Copy this item') }}">
|
||||
<i class="fas fa-copy"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary btn-sm merge-products-button"
|
||||
href="#"
|
||||
data-product-id="{{ $product->id }}"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Merge this product with another one') }}">
|
||||
<i class="fas fa-compress-alt"></i>
|
||||
</a>
|
||||
<a class="btn btn-danger btn-sm product-delete-button"
|
||||
href="#"
|
||||
data-product-id="{{ $product->id }}"
|
||||
@@ -193,4 +200,53 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade"
|
||||
id="merge-products-modal"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content text-center">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title w-100">{{ $__t('Merge products') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="merge-products-keep">{{ $__t('Product to keep') }} <i class="fas fa-question-circle text-muted"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('After merging, this product will be kept') }}"></i>
|
||||
</label>
|
||||
<select class="custom-control custom-select"
|
||||
id="merge-products-keep">
|
||||
<option></option>
|
||||
@foreach($products as $product)
|
||||
<option value="{{ $product->id }}">{{ $product->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="merge-products-remove">{{ $__t('Product to remove') }} <i class="fas fa-question-circle text-muted"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('After merging, all occurences of this product will be replaced by "Product to keep" (means this product will not exist anymore)') }}"></i>
|
||||
</label>
|
||||
<select class="custom-control custom-select"
|
||||
id="merge-products-remove">
|
||||
<option></option>
|
||||
@foreach($products as $product)
|
||||
<option value="{{ $product->id }}">{{ $product->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button"
|
||||
class="btn btn-secondary"
|
||||
data-dismiss="modal">{{ $__t('Cancel') }}</button>
|
||||
<button id="merge-products-save-button"
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
data-dismiss="modal">{{ $__t('OK') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
Reference in New Issue
Block a user