improved search forms
This commit is contained in:
@@ -34,10 +34,8 @@
|
||||
<p>
|
||||
<form id="searchform" action=""
|
||||
method="get" accept-charset="utf-8">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
{{ searchform }}
|
||||
<input type="submit" value="GO"></input>
|
||||
</form>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -32,10 +32,8 @@
|
||||
<p>
|
||||
<form id="searchform" action=""
|
||||
method="get" accept-charset="utf-8">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
{{ searchform }}
|
||||
<input type="submit" value="GO"></input>
|
||||
</form>
|
||||
</p>
|
||||
<p>
|
||||
@@ -49,7 +47,7 @@
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
</p>
|
||||
<input name='daterange' class="button green" type="submit" value="Submit"> </form>
|
||||
<input name='daterange' type="submit" value="Submit"> </form>
|
||||
</li>
|
||||
<li class="grid_3">
|
||||
<h1>Fuse this workout with data from:</h1>
|
||||
|
||||
@@ -60,14 +60,12 @@
|
||||
<p>
|
||||
<form id="searchform" action="/rowers/list-courses/"
|
||||
method="get" accept-charset="utf-8">
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
{{ searchform }}
|
||||
<input type="submit" value="GO"></input>
|
||||
</form>
|
||||
</p>
|
||||
<p>
|
||||
<a class="button small green" href="/rowers/courses/upload">Add Courses</a>
|
||||
<a href="/rowers/courses/upload">Add Courses</a>
|
||||
</p>
|
||||
{% if announcements %}
|
||||
<h3>What's New?</h3>
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
<li class="grid_2">
|
||||
<form id="searchform" action="."
|
||||
method="get" accept-charset="utf-8">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
{{ searchform }}
|
||||
<input type="submit" value="GO"></input>
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
|
||||
@@ -103,10 +103,8 @@
|
||||
<form id="searchform"
|
||||
action=""
|
||||
method="get" accept-charset="utf-8">
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
{{ searchform }}
|
||||
<input type="submit" value="GO"></input>
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2 maxheight">
|
||||
@@ -133,7 +131,7 @@
|
||||
</table>
|
||||
</p>
|
||||
<p>
|
||||
<input name="chartform" class="button green" type="submit" value="Compare">
|
||||
<input name="chartform" type="submit" value="Compare">
|
||||
</p>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
{{ chartform.as_table }}
|
||||
</table>
|
||||
<p>
|
||||
<input name='workoutselectform' class="button green" type="submit" value="Submit">
|
||||
<input name='workoutselectform' type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
</li>
|
||||
@@ -118,16 +118,14 @@
|
||||
{{ optionsform.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input name='optionsform' class="button green" type="submit" value="Submit">
|
||||
<input name='optionsform' type="submit" value="Submit">
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<form id="searchform" action=""
|
||||
method="get" accept-charset="utf-8">
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
{{ searchform }}
|
||||
<input type="submit" value="GO"></input>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -92,16 +92,14 @@
|
||||
{{ modalityform.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input name='modalityform' class="button green" type="submit" value="Filter">
|
||||
<input name='modalityform' type="submit" value="Filter">
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<form id="searchform" action=""
|
||||
method="get" accept-charset="utf-8">
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
{{ searchform }}
|
||||
<input type="submit" value="GO"></input>
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2 maxheight">
|
||||
@@ -122,7 +120,7 @@
|
||||
{{ chartform.as_table }}
|
||||
</table>
|
||||
<p>
|
||||
<input name='workoutselectform' class="button green" type="submit" value="Create Chart">
|
||||
<input name='workoutselectform' type="submit" value="Create Chart">
|
||||
</p>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</table>
|
||||
<p>
|
||||
{% csrf_token %}
|
||||
<input name='workoutselectform' class="button green" type="submit" value="Submit">
|
||||
<input name='workoutselectform' type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
</li>
|
||||
@@ -106,7 +106,7 @@
|
||||
</table>
|
||||
<p>
|
||||
{% csrf_token %}
|
||||
<input name='daterange' class="button green" type="submit" value="Submit">
|
||||
<input name='daterange' type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
</li>
|
||||
@@ -121,7 +121,7 @@
|
||||
</table>
|
||||
<p>
|
||||
{% csrf_token %}
|
||||
<input name='modalityform' class="button green" type="submit" value="Submit">
|
||||
<input name='modalityform' type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
</li>
|
||||
@@ -133,10 +133,8 @@
|
||||
<form id="searchform" action="/rowers/workouts-join-select/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
||||
method="get" accept-charset="utf-8">
|
||||
{% endif %}
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
{{ searchform }}
|
||||
<input type="submit" value="GO"></input>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -5336,6 +5336,9 @@ def workouts_join_select(request,
|
||||
reduce(operator.and_,
|
||||
(Q(notes__icontains=q) for q in query_list))
|
||||
)
|
||||
searchform = SearchForm(initial={'q':query})
|
||||
else:
|
||||
searchform = SearchForm()
|
||||
|
||||
form = WorkoutMultipleCompareForm()
|
||||
form.fields["workouts"].queryset = workouts
|
||||
@@ -5358,6 +5361,7 @@ def workouts_join_select(request,
|
||||
return render(request, 'workout_join_select.html',
|
||||
{'workouts': workouts,
|
||||
'dateform':dateform,
|
||||
'searchform':searchform,
|
||||
'startdate':startdate,
|
||||
'enddate':enddate,
|
||||
'active':'nav-workouts',
|
||||
@@ -5510,6 +5514,9 @@ def team_comparison_select(request,
|
||||
reduce(operator.and_,
|
||||
(Q(notes__icontains=q) for q in query_list))
|
||||
)
|
||||
searchform = SearchForm(initial={'q':query})
|
||||
else:
|
||||
searchform = SearchForm()
|
||||
|
||||
if id:
|
||||
firstworkout = get_workout(id)
|
||||
@@ -5573,6 +5580,7 @@ def team_comparison_select(request,
|
||||
'startdate':startdate,
|
||||
'enddate':enddate,
|
||||
'team':theteam,
|
||||
'searchform':searchform,
|
||||
'form':form,
|
||||
'rower':r,
|
||||
'breadcrumbs':breadcrumbs,
|
||||
@@ -5921,6 +5929,9 @@ def user_multiflex_select(request,
|
||||
reduce(operator.and_,
|
||||
(Q(notes__icontains=q) for q in query_list))
|
||||
)
|
||||
searchform = SearchForm(initial={'q':query})
|
||||
else:
|
||||
searchform = SearchForm()
|
||||
|
||||
form = WorkoutMultipleCompareForm()
|
||||
form.fields["workouts"].queryset = workouts
|
||||
@@ -5975,6 +5986,7 @@ def user_multiflex_select(request,
|
||||
'rower':r,
|
||||
'form':form,
|
||||
'chartform':chartform,
|
||||
'searchform':searchform,
|
||||
'modalityform':modalityform,
|
||||
'teams':get_my_teams(request.user),
|
||||
})
|
||||
@@ -6551,6 +6563,9 @@ def user_boxplot_select(request,
|
||||
reduce(operator.and_,
|
||||
(Q(notes__icontains=q) for q in query_list))
|
||||
)
|
||||
searchform = SearchForm(initial={'q':query})
|
||||
else:
|
||||
searchform = SearchForm()
|
||||
|
||||
form = WorkoutMultipleCompareForm()
|
||||
form.fields["workouts"].queryset = workouts
|
||||
@@ -6592,6 +6607,7 @@ def user_boxplot_select(request,
|
||||
'form':form,
|
||||
'active':'nav-analysis',
|
||||
'chartform':chartform,
|
||||
'searchform':searchform,
|
||||
'optionsform':optionsform,
|
||||
'teams':get_my_teams(request.user),
|
||||
})
|
||||
@@ -6834,10 +6850,14 @@ def courses_view(request):
|
||||
reduce(operator.and_,
|
||||
(Q(notes__icontains=q) for q in query_list))
|
||||
)
|
||||
searchform = SearchForm(initial={'q':query})
|
||||
else:
|
||||
searchform = SearchForm()
|
||||
|
||||
return render(request,'list_courses.html',
|
||||
{'courses':courses,
|
||||
'active':'nav-racing',
|
||||
'searchform':searchform,
|
||||
'rower':r,
|
||||
})
|
||||
|
||||
@@ -7108,6 +7128,9 @@ def workout_comparison_list(request,id=0,message='',successmessage='',
|
||||
reduce(operator.and_,
|
||||
(Q(notes__icontains=q) for q in query_list))
|
||||
)
|
||||
searchform = SearchForm(initial={'q':query})
|
||||
else:
|
||||
searchform = SearchForm()
|
||||
|
||||
paginator = Paginator(workouts,15) # show 25 workouts per page
|
||||
page = request.GET.get('page')
|
||||
@@ -7130,6 +7153,7 @@ def workout_comparison_list(request,id=0,message='',successmessage='',
|
||||
'workouts': workouts,
|
||||
'last_name':u.last_name,
|
||||
'first_name':u.first_name,
|
||||
'searchform':searchform,
|
||||
'dateform':dateform,
|
||||
'startdate':startdate,
|
||||
'enddate':enddate,
|
||||
@@ -7190,6 +7214,9 @@ def workout_fusion_list(request,id=0,message='',successmessage='',
|
||||
reduce(operator.and_,
|
||||
(Q(notes__icontains=q) for q in query_list))
|
||||
)
|
||||
searchform = SearchForm(initial={'q':query})
|
||||
else:
|
||||
searchform = SearchForm()
|
||||
|
||||
paginator = Paginator(workouts,15) # show 25 workouts per page
|
||||
page = request.GET.get('page')
|
||||
@@ -7225,6 +7252,7 @@ def workout_fusion_list(request,id=0,message='',successmessage='',
|
||||
{'id':int(id),
|
||||
'workout':row,
|
||||
'rower':r,
|
||||
'searchform':searchform,
|
||||
'active':'nav-workouts',
|
||||
'breadcrumbs':breadcrumbs,
|
||||
'workouts': workouts,
|
||||
@@ -12067,6 +12095,9 @@ def graphs_view(request):
|
||||
reduce(operator.and_,
|
||||
(Q(notes__icontains=q) for q in query_list))
|
||||
)
|
||||
searchform = SearchForm(initial={'q':query})
|
||||
else:
|
||||
searchform = SearchForm()
|
||||
|
||||
g = GraphImage.objects.filter(workout__in=workouts).order_by("-creationdatetime")
|
||||
|
||||
@@ -12083,6 +12114,7 @@ def graphs_view(request):
|
||||
|
||||
return render(request, 'list_graphs.html',
|
||||
{'graphs': g,
|
||||
'searchform':searchform,
|
||||
'active':'nav-workouts',
|
||||
'teams':get_my_teams(request.user),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user