mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 10:14:39 +00:00
Show a calendar on the shopping list page (just for info purposes)
This commit is contained in:
@@ -144,6 +144,7 @@ return array(
|
|||||||
'A best before date is required and must be later than today' => 'Ein Mindesthaltbarkeitsdatum ist erforderlich und muss später als heute sein',
|
'A best before date is required and must be later than today' => 'Ein Mindesthaltbarkeitsdatum ist erforderlich und muss später als heute sein',
|
||||||
'Settings' => 'Einstellungen',
|
'Settings' => 'Einstellungen',
|
||||||
'This can only be before now' => 'Dies kann nur vor jetzt sein',
|
'This can only be before now' => 'Dies kann nur vor jetzt sein',
|
||||||
|
'Calendar' => 'Kalender',
|
||||||
|
|
||||||
//Constants
|
//Constants
|
||||||
'manually' => 'Manuell',
|
'manually' => 'Manuell',
|
||||||
|
40
public/viewjs/components/calendarcard.js
Normal file
40
public/viewjs/components/calendarcard.js
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
$('#calendar').datetimepicker(
|
||||||
|
{
|
||||||
|
format: 'L',
|
||||||
|
buttons: {
|
||||||
|
showToday: true,
|
||||||
|
showClose: false
|
||||||
|
},
|
||||||
|
calendarWeeks: true,
|
||||||
|
locale: moment.locale(),
|
||||||
|
icons: {
|
||||||
|
time: 'far fa-clock',
|
||||||
|
date: 'far fa-calendar',
|
||||||
|
up: 'fas fa-arrow-up',
|
||||||
|
down: 'fas fa-arrow-down',
|
||||||
|
previous: 'fas fa-chevron-left',
|
||||||
|
next: 'fas fa-chevron-right',
|
||||||
|
today: 'fas fa-calendar-check',
|
||||||
|
clear: 'far fa-trash-alt',
|
||||||
|
close: 'far fa-times-circle'
|
||||||
|
},
|
||||||
|
keepOpen: true,
|
||||||
|
inline: true,
|
||||||
|
keyBinds: {
|
||||||
|
up: function(widget) { },
|
||||||
|
down: function(widget) { },
|
||||||
|
'control up': function(widget) { },
|
||||||
|
'control down': function(widget) { },
|
||||||
|
left: function(widget) { },
|
||||||
|
right: function(widget) { },
|
||||||
|
pageUp: function(widget) { },
|
||||||
|
pageDown: function(widget) { },
|
||||||
|
enter: function(widget) { },
|
||||||
|
escape: function(widget) { },
|
||||||
|
'control space': function(widget) { },
|
||||||
|
t: function(widget) { },
|
||||||
|
'delete': function(widget) { }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#calendar').datetimepicker('show');
|
12
views/components/calendarcard.blade.php
Normal file
12
views/components/calendarcard.blade.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
@push('componentScripts')
|
||||||
|
<script src="{{ $U('/viewjs/components/calendarcard.js', true) }}?v={{ $version }}"></script>
|
||||||
|
@endpush
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<i class="fas fa-calendar"></i> {{ $L('Calendar') }}
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div id="calendar" data-target-input="nearest"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col-xs-12 col-md-8 pb-3">
|
||||||
<table id="shoppinglist-table" class="table table-sm table-striped dt-responsive">
|
<table id="shoppinglist-table" class="table table-sm table-striped dt-responsive">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -58,5 +58,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xs-12 col-md-4">
|
||||||
|
@include('components.calendarcard')
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@stop
|
@stop
|
||||||
|
Reference in New Issue
Block a user