Ignore:
Timestamp:
08/22/14 08:16:18 (10 years ago)
Author:
Twan Goosen
Message:

Created an 'about' page
Fixes #617

File:
1 edited

Legend:

Unmodified
Added
Removed
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/pages/BasePage.java

    r5576 r5592  
    1515
    1616public class BasePage extends WebPage {
    17    
     17
    1818    @SpringBean
    1919    private AdminUsersService adminUsersService;
    20    
     20
    2121    protected BasePage(IModel<?> model) {
    2222        super(model);
     
    3939                AdminPage.class));
    4040        add(menu);
    41        
     41
    4242        add(new FeedbackPanel("feedback"));
    43        
     43
    4444        add(new BookmarkablePageLink("homelink", getApplication().getHomePage())
    4545                .setAutoEnable(false));
     46        add(new BookmarkablePageLink("aboutlink", AboutPage.class)
     47                .setAutoEnable(false));
     48
    4649    }
    47    
     50
    4851    protected BasePage() {
    4952        this(null);
    5053    }
    51    
     54
    5255    @Override
    5356    protected void onBeforeRender() {
     
    8285        super.onBeforeRender();
    8386    }
    84    
     87
    8588    protected Principal getUser() {
    8689        ApplicationSession session = (ApplicationSession) getSession();
     
    9194        return principal;
    9295    }
    93    
     96
    9497    protected boolean isUserAdmin() {
    9598        final String userName = getUser().getName();
    9699        return userName != null && adminUsersService.isAdmin(userName);
    97100    }
    98    
     101
    99102    @Override
    100103    public ApplicationSession getSession() {
    101104        return (ApplicationSession) super.getSession();
    102105    }
    103    
     106
    104107} // class BasePage
Note: See TracChangeset for help on using the changeset viewer.