blob: 97eda840315333d2954f1e55bc9da017ad12dad2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right"> <a href="{{ link_overview }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a> </div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
<div class="well">
<div class="row">
<div class="col-sm-5">
<div class="input-group date">
<input type="text" class="form-control" id="input-date-start" data-date-format="YYYY-MM-DD" placeholder="{{ entry_date_start }}" value="{{ date_start }}" name="filter_date_start">
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span> </div>
</div>
<div class="col-sm-5">
<div class="input-group date">
<input type="text" class="form-control" id="input-date-end" data-date-format="YYYY-MM-DD" placeholder="{{ entry_date_end }}" value="{{ date_end }}" name="filter_date_end">
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span> </div>
</div>
<div class="col-sm-2 text-right"> <a id="button-filter" class="btn btn-primary" data-toggle="tooltip" title="{{ button_filter }}"><i class="fa fa-filter"></i></a> </div>
</div>
</div>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th class="text-left">{{ column_ref }}</th>
<th class="text-left">{{ column_status }}</th>
<th class="text-left">{{ column_date_requested }}</th>
<th class="text-left">{{ column_date_updated }}</th>
<th class="text-center">{{ column_sku }}</th>
<th class="text-center">{{ column_stock }}</th>
</tr>
</thead>
<tbody>
{% if not table_data %}
<tr>
<td class="text-center" colspan="6">{{ text_empty }}</td>
</tr>
{% else %}
{% for ref, row in table_data %}
<tr>
<td class="text-left" rowspan="{{ row.data|length + 1 }}">{{ ref }}</td>
<td class="text-left" rowspan="{{ row.data|length + 1 }}">{{ row.status }}</td>
<td class="text-left" rowspan="{{ row.data|length + 1 }}">{{ row.date_requested }}</td>
<td class="text-left" rowspan="{{ row.data|length + 1 }}">{{ row.date_updated }}</td>
{% for data_row in row.data %}
<tr>
<td class="text-center">{{ data_row.sku }}</td>
<td class="text-center">{{ data_row.stock }}</td>
</tr>
{% endfor %}
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
</div>
<script type="text/javascript"><!--
$('#button-filter').on('click', function() {
var url = 'index.php?route=extension/openbay/amazonus/stockUpdates&user_token={{ user_token }}';
var filter_date_start = $('#input-date-start').val();
if (filter_date_start) {
url += '&filter_date_start=' + encodeURIComponent(filter_date_start);
}
var filter_date_end = $('#input-date-end').val();
if (filter_date_end) {
url += '&filter_date_end=' + encodeURIComponent(filter_date_end);
}
location = url;
});
$(document).ready(function() {
$('#input-date-start').datepicker({dateFormat: 'yy-mm-dd'});
$('#input-date-end').datepicker({dateFormat: 'yy-mm-dd'});
});
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
//--></script>
{{ footer }}
|