Commits

Johnny Goodnow  committed a568561

* Added initial save button and fixed not in cache checking bug.

  • Participants
  • Parent commits ca8b4ea

Comments (0)

Files changed (3)

File geolocator/views.py

                 queryList = models.Person.objects.filter(pid__icontains=query['term'])
             elif query['filter_type'] == 'displayName':
                 queryList = models.Person.objects.filter(display_name__icontains=query['term'])
-            if len(queryList) > 0:
+            if queryList != None:
                 return render_to_response('index.html', {'form': form, 'results': queryList},
                                             context_instance=RequestContext(request))                                
             else:

File resources/database/hokiefinderdb.sqlite3

Binary file modified.

File resources/templates/index.html

             {% for result in results %}
                 latlng = new google.maps.LatLng({{ result.latitude }}, {{ result.longitude }});
                 contentString = '<div id="info">'+
-                    '<div id="siteNotice">'+
-                    '</div>'+
                     '<h1 id="firstHeading" class="firstHeading">{{ result.display_name }}</h1>'+
-                    '<div id="bodyContent">'+
+                    '<div id="infoBody">'+
                     '<p>{{ result.address }}</p>'+
                     {% if result.phone_number %}
                     '<p>Phone: {{ result.display_number }}</p>'+
                     '<p>Email: {{ result.pid }}@vt.edu</p>'+
                     '<p>Major: {% if result.major %}{{ result.major }}{% else %}Not Listed{% endif %}</p>'+
                     '</div>'+
+                    '<div id="infoSubmit">' +
+                    '<form id="save_form" action_method="post">' +
+                    '<input type="submit" value="Save">' + 
+                    '</form>' +
+                    '</div>' +
                     '</div>';
                 marker = new google.maps.Marker({
                     position: latlng,