iwla

iwla Git Source Tree

Root/plugins/display/top_pages_diff.py

1# -*- coding: utf-8 -*-
2#
3# Copyright Grégory Soutadé 2018
4
5# This file is part of iwla
6
7# iwla is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# iwla is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with iwla. If not, see <http://www.gnu.org/licenses/>.
19#
20
21from iwla import IWLA
22from .istats_diff import IWLADisplayStatsDiff
23from display import *
24
25"""
26Display hook
27
28Enlight new and updated pages in in top_pages.html
29
30Plugin requirements :
31 display/top_pages
32
33Conf values needed :
34 None
35
36Output files :
37 None
38
39Statistics creation :
40 None
41
42Statistics update :
43 None
44
45Statistics deletion :
46 None
47"""
48
49class IWLADisplayTopPagesDiff(IWLADisplayStatsDiff):
50 def __init__(self, iwla):
51 super(IWLADisplayTopPagesDiff, self).__init__(iwla)
52 self.API_VERSION = 1
53 self.requires = ['IWLADisplayTopPages']
54 self.month_stats_key = u'top_pages'
55 self.filename = u'top_pages.html'
56 self.block_name = self.iwla._(u'All Pages')
57
58 def load(self):
59 if not self.iwla.getConfValue('create_all_pages_page', True):
60 return False
61 return super(IWLADisplayTopPagesDiff, self).load()

Archive Download this file

Branches

Tags