Project

General

Profile

0002-backoffice-display-some-news-in-the-homepage-sidebar.patch

pour auquo - Frédéric Péters (absent jusqu’au 12/12), 04 Oct 2012 02:36 PM

Download (1.92 KB)

View differences:

Subject: [PATCH 2/2] backoffice: display some news in the homepage sidebar
 (#1681)

 extra/auquotidien.py         |    4 ++++
 extra/modules/backoffice.ptl |    4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)
extra/auquotidien.py
21 21

  
22 22
get_publisher_class().register_translation_domain('auquotidien')
23 23
get_publisher_class().default_configuration_path = 'au-quotidien-wcs-settings.xml'
24
get_publisher_class().backoffice_feed_url = {
25
    'fr': 'http://www.au-quotidien.com/fr/backoffice.atom'
26
}
27

  
24 28

  
25 29
def check_visibility(target):
26 30
    user = get_request().user
extra/modules/backoffice.ptl
1 1
import os
2 2

  
3
from quixote import get_publisher, redirect
3
from quixote import get_publisher, redirect, get_request, get_response
4 4
from quixote.directory import Directory
5 5

  
6 6
from qommon.publisher import get_publisher_class
......
14 14
from qommon import get_cfg
15 15
from qommon.form import *
16 16

  
17

  
17 18
class BackofficeRootDirectory(wcs.backoffice.root.RootDirectory):
18 19
    _q_exports = ['', 'home']
19 20

  
......
32 33
        from qommon.backoffice.menu import html_top
33 34
        html_top('home', _('Pending Forms'))
34 35
        get_response().breadcrumb[-1:] = [('home', _('Pending Forms'))]
36
        get_response().filter['sidebar'] = self.get_sidebar()
35 37

  
36 38
    def _q_lookup(self, component):
37 39
        return FormPage(component)
38
-