Encyclopedia: Fix regression in web page.
This commit is contained in:
@ -24,7 +24,7 @@ import supybot
|
||||
import supybot.world as world
|
||||
from importlib import reload
|
||||
|
||||
__version__ = "3.7.0"
|
||||
__version__ = "3.8.0"
|
||||
__author__ = supybot.Author("Krytarik Raido", "krytarik", "krytarik@gmail.com")
|
||||
__contributors__ = {
|
||||
supybot.Author("Dennis Kaarsemaker", "Seveas", "dennis@kaarsemaker.net"): ['Original Author'],
|
||||
|
@ -87,14 +87,14 @@ else:
|
||||
total = cur.fetchall()[0][0]
|
||||
|
||||
# Pagination links
|
||||
plink = ' <a href="factoids.cgi?db=%s&search=%s&order=%%s&page=%%s">%%s</a>' % (database, utils.web.urlquote(search))
|
||||
plink = ' <a href="factoids.cgi?db=%s&search=%s&order={}&page={}">{}</a>' % (database, utils.web.urlquote(search))
|
||||
npages = int(math.ceil(float(total) / NUM_PER_PAGE))
|
||||
print(' ·\n'.join(list(map(lambda x: plink % (order_url, x, x) if x != page else str(x), range(1, npages+1)))))
|
||||
print(' ·\n'.join(list(map(lambda x: plink.format(order_url, x, x) if x != page else str(x), range(1, npages+1)))))
|
||||
|
||||
print(' <br />Order by<br />');
|
||||
print(' ·\n'.join([plink % ('name|ASC', 1, 'Name +'), plink % ('name|DESC', 1, 'Name -'),
|
||||
plink % ('popularity|ASC', 1, 'Popularity +'), plink % ('popularity|DESC', 1, 'Popularity -'),
|
||||
plink % ('added|ASC', 1, 'Date added +'), plink % ('added|DESC', 1, 'Date added -')]))
|
||||
print(' ·\n'.join([plink.format('name|ASC', 1, 'Name +'), plink.format('name|DESC', 1, 'Name -'),
|
||||
plink.format('popularity|ASC', 1, 'Popularity +'), plink.format('popularity|DESC', 1, 'Popularity -'),
|
||||
plink.format('added|ASC', 1, 'Date added +'), plink.format('added|DESC', 1, 'Date added -')]))
|
||||
|
||||
print('''\
|
||||
<table style="border-collapse: collapse;">
|
||||
|
Reference in New Issue
Block a user