Display 'Others' when max displayed reached
This commit is contained in:
@@ -55,6 +55,13 @@ class IWLADisplayTopHits(IPlugin):
|
||||
for (uri, entrance) in new_list:
|
||||
table.appendRow([generateHTMLLink(uri), entrance])
|
||||
total_hits[1] += entrance
|
||||
if self.max_hits:
|
||||
others = 0
|
||||
for (uri, entrance) in top_hits[self.max_hits:]:
|
||||
others += entrance
|
||||
table.appendRow([self.iwla._(u'Others'), others])
|
||||
table.setCellCSSClass(table.getNbRows()-1, 0, 'iwla_others')
|
||||
|
||||
page.appendBlock(table)
|
||||
|
||||
display.addPage(page)
|
||||
|
||||
Reference in New Issue
Block a user