Display 'Others' when max displayed reached
This commit is contained in:
@@ -56,6 +56,12 @@ class IWLADisplayTopDownloads(IPlugin):
|
||||
for (uri, entrance) in new_list:
|
||||
table.appendRow([generateHTMLLink(uri), entrance])
|
||||
total_entrance[1] += entrance
|
||||
if self.max_downloads:
|
||||
others = 0
|
||||
for (uri, entrance) in top_downloads[self.max_downloads:]:
|
||||
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