2013-03-25 11:12:08 -07:00
|
|
|
from . import skeleton
|
2010-12-04 06:48:52 -08:00
|
|
|
from WebStats.plugin import _
|
2010-11-20 08:51:23 -08:00
|
|
|
|
|
|
|
content = """
|
|
|
|
<h1>%s</h1>
|
|
|
|
"""
|
|
|
|
|
|
|
|
def get(useSkeleton, channels):
|
|
|
|
output = content
|
|
|
|
if len(channels) == 0:
|
|
|
|
output %= _('Stats available for no channels')
|
|
|
|
elif len(channels) == 1:
|
|
|
|
output %= _('Stats available for a channel:')
|
|
|
|
elif len(channels):
|
|
|
|
output %= _('Stats available for channels:')
|
|
|
|
output += '<ul class="chanslist">'
|
|
|
|
for channel in channels:
|
2011-06-24 07:38:59 -07:00
|
|
|
output += '<li><a href="/webstats/global/%s/" title="%s">%s</a></li>'%\
|
|
|
|
(channel[1:].replace('#', ' '), # Strip the leading #
|
2010-11-20 08:51:23 -08:00
|
|
|
_('View the stats for the %s channel') % channel,
|
|
|
|
channel)
|
|
|
|
output += '</ul>'
|
|
|
|
if useSkeleton:
|
|
|
|
output = ''.join([skeleton.start, output, skeleton.end])
|
|
|
|
return output
|