mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Added an option to hide the calendar on the shopping list (closes #531)
This commit is contained in:
@@ -392,6 +392,9 @@
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item discrete-link" href="{{ $U('/stocksettings') }}"><i class="fas fa-box"></i> {{ $__t('Stock settings') }}</a>
|
||||
@if(GROCY_FEATURE_FLAG_SHOPPINGLIST)
|
||||
<a class="dropdown-item discrete-link" href="{{ $U('/shoppinglistsettings') }}"><i class="fas fa-shopping-cart"></i> {{ $__t('Shopping list settings') }}</a>
|
||||
@endif
|
||||
@if(GROCY_FEATURE_FLAG_CHORES)
|
||||
<a class="dropdown-item discrete-link" href="{{ $U('/choressettings') }}"><i class="fas fa-home"></i> {{ $__t('Chores settings') }}</a>
|
||||
@endif
|
||||
|
@@ -94,7 +94,7 @@
|
||||
</div>
|
||||
|
||||
<div id="shoppinglist-main" class="row d-print-none">
|
||||
<div class="col-xs-12 col-md-8 pb-3">
|
||||
<div class="@if(boolval($userSettings['shopping_list_show_calendar'])) col-xs-12 col-md-8 @else col-12 @endif pb-3">
|
||||
<a id="shopping-list-normal-view-button" class="btn btn-outline-dark btn-block switch-view-mode-button d-none" href="#">
|
||||
<i class="fas fa-expand-arrows-alt"></i> {{ $__t('Normal view') }}
|
||||
</a>
|
||||
@@ -157,11 +157,13 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if(boolval($userSettings['shopping_list_show_calendar']))
|
||||
<div class="col-xs-12 col-md-4 mt-md-2 d-print-none">
|
||||
@include('components.calendarcard')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-xs-12 col-md-8 d-print-none pt-2">
|
||||
<div class="@if(boolval($userSettings['shopping_list_show_calendar'])) col-xs-12 col-md-8 @else col-12 @endif d-print-none pt-2">
|
||||
<div class="form-group">
|
||||
<label class="text-larger font-weight-bold" for="notes">{{ $__t('Notes') }}</label>
|
||||
<a id="save-description-button" class="btn btn-success btn-sm ml-1 mb-2" href="#">{{ $__t('Save') }}</a>
|
||||
|
33
views/shoppinglistsettings.blade.php
Normal file
33
views/shoppinglistsettings.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title', $__t('Shopping list settings'))
|
||||
|
||||
@section('viewJsName', 'shoppinglistsettings')
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<h1>@yield('title')</h1>
|
||||
|
||||
<h4 class="mt-2">{{ $__t('Shopping list') }}</h4>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="shopping-list-show-calendar">
|
||||
<input type="checkbox" class="user-setting-control" id="shopping-list-show-calendar" name="shopping-list-show-calendar" data-setting-key="shopping_list_show_calendar"> {{ $__t('Show a month-view calendar') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="mt-2">{{ $__t('Shopping list to stock workflow') }}</h4>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="shopping-list-to-stock-workflow-auto-submit-when-prefilled">
|
||||
<input type="checkbox" class="user-setting-control" id="shopping-list-to-stock-workflow-auto-submit-when-prefilled" name="shopping-list-to-stock-workflow-auto-submit-when-prefilled" data-setting-key="shopping_list_to_stock_workflow_auto_submit_when_prefilled"> {{ $__t('Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{{ $U('/shoppinglist') }}" class="btn btn-success">{{ $__t('OK') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
@@ -75,18 +75,6 @@
|
||||
'additionalCssClasses' => 'user-setting-control'
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_SHOPPINGLIST)
|
||||
<h4 class="mt-2">{{ $__t('Shopping list to stock workflow') }}</h4>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="shopping-list-to-stock-workflow-auto-submit-when-prefilled">
|
||||
<input type="checkbox" class="user-setting-control" id="shopping-list-to-stock-workflow-auto-submit-when-prefilled" name="shopping-list-to-stock-workflow-auto-submit-when-prefilled" data-setting-key="shopping_list_to_stock_workflow_auto_submit_when_prefilled"> {{ $__t('Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<a href="{{ $U('/stockoverview') }}" class="btn btn-success">{{ $__t('OK') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user