Changeset 10098 for main


Ignore:
Timestamp:
24 Apr 2013, 05:52:18 (12 years ago)
Author:
Henrik Bettermann
Message:

Show containers by default. Only anonymous users must not see hidden containers.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r10097 r10098  
    102102    @property
    103103    def containers(self):
     104        if self.layout.isAuthenticated():
     105            return self.context.values()
    104106        return [value for value in self.context.values() if not value.hidden]
    105107
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r10097 r10098  
    263263        title = _(u'Hide container'),
    264264        required = False,
    265         default = True,
     265        default = False,
    266266        )
    267267
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r10097 r10098  
    222222    def test_hide_container(self):
    223223        self.browser.open(self.root_path)
     224        self.assertTrue(
     225            '<a href="http://localhost/app/applicants/app2011">'
     226            'This is the app2011 container</a>' in self.browser.contents)
     227        self.app['applicants']['app2011'].hidden = True
     228        self.browser.open(self.root_path)
     229        # Anonymous users can't see hidden containers
    224230        self.assertFalse(
    225231            '<a href="http://localhost/app/applicants/app2011">'
    226232            'This is the app2011 container</a>' in self.browser.contents)
    227         self.app['applicants']['app2011'].hidden = False
     233        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    228234        self.browser.open(self.root_path)
    229235        self.assertTrue(
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r10097 r10098  
    7676            'basic,0.0,dp2012,'
    7777            '"Some Description\nwith linebreak\n<<de>>man spriht deutsh",'
    78             '2012-01-31 23:00:00+00:00,1,,app,2012-01-01 12:00:00+00:00,1,'
     78            '2012-01-31 23:00:00+00:00,0,,app,2012-01-01 12:00:00+00:00,1,'
    7979            'General Studies 2012/13,2012\r\n'
    8080            )
Note: See TracChangeset for help on using the changeset viewer.