From 7eb4b7bbb44f33f19f5275a64dc9fe0dbf4199fe Mon Sep 17 00:00:00 2001
From: Sanj
Date: Wed, 31 Aug 2011 15:21:03 +0530
Subject: [PATCH 1/4] authority record, time frame list displays
---
gazetteer/places/admin.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gazetteer/places/admin.py b/gazetteer/places/admin.py
index a367238..d16dec3 100644
--- a/gazetteer/places/admin.py
+++ b/gazetteer/places/admin.py
@@ -70,6 +70,7 @@ class relationsForm(forms.ModelForm):
class AuthorityRecordAdmin(admin.ModelAdmin):
form = authRecordForm
+ list_display = ('__unicode__', 'uri',)
search_fields = ['preferred_name']
class RelationshipAdmin(admin.ModelAdmin):
@@ -113,7 +114,7 @@ class TimeFrameAdmin(admin.ModelAdmin):
list_display = ('description', 'start_date', 'end_date', 'start_granularity', 'end_granularity',)
admin.site.register(Feature, FeatureAdmin)
-admin.site.register(TimeFrame)
+admin.site.register(TimeFrame, TimeFrameAdmin)
admin.site.register(FeatureType, FeatureTypeAdmin)
admin.site.register(Relationship, RelationshipAdmin)
admin.site.register(AuthorityRecord, AuthorityRecordAdmin)
From cafa78538cc6c6e13e1fbd2fc79b37f733b24192 Mon Sep 17 00:00:00 2001
From: Sanj
Date: Wed, 31 Aug 2011 15:26:36 +0530
Subject: [PATCH 2/4] make URL field longer; remove view similar
---
gazetteer/places/admin.py | 4 ++--
gazetteer/static/js/gazetteer.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gazetteer/places/admin.py b/gazetteer/places/admin.py
index d16dec3..04b23c1 100644
--- a/gazetteer/places/admin.py
+++ b/gazetteer/places/admin.py
@@ -43,7 +43,7 @@ class FeatureTypeFilter(SimpleListFilter):
'''
class authRecordForm(forms.ModelForm):
- uri = forms.CharField(label="URI", required=True, widget=forms.TextInput(attrs={'size': '40'}))
+ uri = forms.CharField(label="URI", required=True, widget=forms.TextInput(attrs={'size': '50'}))
class Meta:
model = AuthorityRecord
@@ -51,7 +51,7 @@ class authRecordForm(forms.ModelForm):
class featuresForm(forms.ModelForm):
url = forms.CharField(label='URI',
required=True,
- widget=forms.TextInput(attrs={'size': '40'}))
+ widget=forms.TextInput(attrs={'size': '50'}))
authority_record = AutoCompleteSelectField('authority_record', required=False)
time_frame = AutoCompleteSelectField('time_frame', required=False)
feature_type = AutoCompleteSelectField('feature_type', required=False)
diff --git a/gazetteer/static/js/gazetteer.js b/gazetteer/static/js/gazetteer.js
index 795d41c..d894dd5 100644
--- a/gazetteer/static/js/gazetteer.js
+++ b/gazetteer/static/js/gazetteer.js
@@ -39,8 +39,8 @@ $(function() {
function getRow(props) {
var $tr = $('');
var $one = $('