Commits

Matt Hampel  committed 5c2e3f0

Made it easier to add common governmentt entities when filling out submission form

  • Participants
  • Parent commits 3882c41

Comments (0)

Files changed (5)

File assets/css/base.css

 #page {
     line-height: 1.5;
     width: 920px;
-    margin: 0px auto;
+    margin: 0px auto 20px auto;
     clear: both;
     overflow: hidden;
 }
     width: 460px;
     font-size: 1.2em;
 }
+.entity-quicklinks {
+    cursor:pointer;
+}
 
 textarea {
     display: block;

File foialist/forms.py

     
     
 class EntryForm(forms.ModelForm):
-    govt_entity = forms.CharField(label="Gov't. entity")
+    govt_entity = forms.CharField(
+        help_text="<span>eg: <a class='entity-quicklinks'>Ann Arbor City Council</a>, <a class='entity-quicklinks'>City of Ann Arbor</a></span>", 
+        label="Gov't. entity")
     
     class Meta:
         model = Entry

File foialist/views.py

                 except: 
                     pass # la-ame!
         
-        
-        #if results.count() == 0:
-        #    return render_to_response('results.html', { 'results': results, 'query': q})
         results = list(set(results))
         return render_to_response('results.html', { 'results': results, 'query': q})
         

File templates/add.html

 			}		
    		});
  	});
+
+	$('.entity-quicklinks').click(function() {
+		$("#id_entries-govt_entity").val(this.text)
+	});
 	
 	
 {% endblock %}
 
 urlpatterns = patterns('',
     ('^$', home),
-    (r'^page/(?P<page_number>\d+)/$', page),
+    # for pagination of collections of documents:
+    (r'^page/(?P<page_number>\d+)/$', page), 
     
+    # upload a document
     ('^add/$', add),
-
-    # ('^file/$', f),
     
+    # browse collections of documents
     (r'^doc/(\d+)/$', page_by_id),
+    # and individual documents in a collection (uses scribd API)
     (r'^doc/(?P<eid>\d+)/view/(?P<did>\d+)/$', scribd_view),
         
- #  (r'^created/$', by_creation_date),
- #  (r'^submitted/$', by_submission_date),
-        
+    # list originating organizations
     (r'^origin/$', origins),
+    # browse by originitating organiztion (ex. City of Ann Arbor)
     (r'^origin/(?P<slug>[-\w]+)/$', by_origin),
     
+    # list all people who have submitted collections:
     (r'^submitter/$', posters),
+    # view collections from a specific person:
     (r'^submitter/(?P<slug>[-\w]+)/$', by_poster),
     
     ('^search/$', search),