From 777f41a16f58b18d71a7071e867f0c52a8a40927 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 31 Aug 2011 02:13:45 +0530 Subject: [PATCH] add URI to feature geojson, add to table in authority record admin page --- gazetteer/places/models.py | 1 + gazetteer/static/js/auth_record_admin.js | 1 + .../templates/admin/places/authorityrecord/change_form.html | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gazetteer/places/models.py b/gazetteer/places/models.py index 6aaedc0..1efc1de 100644 --- a/gazetteer/places/models.py +++ b/gazetteer/places/models.py @@ -70,6 +70,7 @@ class Feature(models.Model): properties = { 'id': self.id, + 'uri': self.url, 'preferred_name': self.preferred_name, 'feature_type': feature_type, 'admin1': self.admin1, diff --git a/gazetteer/static/js/auth_record_admin.js b/gazetteer/static/js/auth_record_admin.js index cc96844..fd8fe99 100644 --- a/gazetteer/static/js/auth_record_admin.js +++ b/gazetteer/static/js/auth_record_admin.js @@ -21,6 +21,7 @@ function getRow(props) { var $tr = $(''); var $one = $('').appendTo($tr); var $a = $('').attr("target", "_blank").attr("href", "/admin/places/feature/" + props.id).text(props.preferred_name).appendTo($one); + $('').text(props.uri).appendTo($tr); $('').text(props.feature_type).appendTo($tr); $('').text(props.admin2).appendTo($tr); $('').text(props.admin1).appendTo($tr); diff --git a/gazetteer/templates/admin/places/authorityrecord/change_form.html b/gazetteer/templates/admin/places/authorityrecord/change_form.html index 9818eff..d60ce2f 100644 --- a/gazetteer/templates/admin/places/authorityrecord/change_form.html +++ b/gazetteer/templates/admin/places/authorityrecord/change_form.html @@ -10,12 +10,13 @@ {% endblock %} {% block after_related_objects %} -
+

List of Features:

+
NameURI Type County State