0005395: Fix sort on date in citation list view
svn: r18538
This commit is contained in:
parent
df723409a1
commit
264e15b6fd
@ -94,6 +94,17 @@ class CitationBaseModel(object):
|
||||
return retval
|
||||
return u''
|
||||
|
||||
def citation_sort_date(self, data):
|
||||
if data[COLUMN_DATE]:
|
||||
citation = gen.lib.Citation()
|
||||
citation.unserialize(data)
|
||||
retval = "%09d" % citation.get_date_object().get_sort_value()
|
||||
if not DateHandler.get_date_valid(citation):
|
||||
return INVALID_DATE_FORMAT % retval
|
||||
else:
|
||||
return retval
|
||||
return u''
|
||||
|
||||
def citation_id(self, data):
|
||||
return unicode(data[COLUMN_ID])
|
||||
|
||||
|
@ -79,7 +79,7 @@ class CitationListModel(CitationBaseModel, FlatBaseModel):
|
||||
self.smap = [
|
||||
self.citation_page,
|
||||
self.citation_id,
|
||||
self.citation_date,
|
||||
self.citation_sort_date,
|
||||
self.citation_confidence,
|
||||
self.citation_sort_change,
|
||||
self.citation_src_title,
|
||||
|
Loading…
Reference in New Issue
Block a user