mirror of https://github.com/jumpserver/jumpserver
[Update] 任务列表去掉日期
parent
6d65c967b1
commit
c84e984eae
|
@ -9,14 +9,6 @@
|
||||||
|
|
||||||
{% block table_search %}
|
{% block table_search %}
|
||||||
<form id="search_form" method="get" action="" class="pull-right form-inline">
|
<form id="search_form" method="get" action="" class="pull-right form-inline">
|
||||||
<div class="form-group" id="date">
|
|
||||||
<div class="input-daterange input-group" id="datepicker">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
<input type="text" class="input-sm form-control" style="width: 100px;" name="date_from" value="{{ date_from|date:'Y-m-d' }}">
|
|
||||||
<span class="input-group-addon">to</span>
|
|
||||||
<input type="text" class="input-sm form-control" style="width: 100px;" name="date_to" value="{{ date_to|date:'Y-m-d' }}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" class="form-control input-sm" name="keyword" placeholder="{% trans 'Search' %}" value="{{ keyword }}">
|
<input type="text" class="form-control input-sm" name="keyword" placeholder="{% trans 'Search' %}" value="{{ keyword }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -33,11 +33,6 @@ class TaskListView(AdminUserRequiredMixin, DatetimeSearchMixin, ListView):
|
||||||
queryset = queryset.filter(created_by='')
|
queryset = queryset.filter(created_by='')
|
||||||
|
|
||||||
self.keyword = self.request.GET.get('keyword', '')
|
self.keyword = self.request.GET.get('keyword', '')
|
||||||
queryset = queryset.filter(
|
|
||||||
date_created__gt=self.date_from,
|
|
||||||
date_created__lt=self.date_to
|
|
||||||
)
|
|
||||||
|
|
||||||
if self.keyword:
|
if self.keyword:
|
||||||
queryset = queryset.filter(
|
queryset = queryset.filter(
|
||||||
name__icontains=self.keyword,
|
name__icontains=self.keyword,
|
||||||
|
|
Loading…
Reference in New Issue