Changeset 5576


Ignore:
Timestamp:
08/20/14 09:39:14 (10 years ago)
Author:
Twan Goosen
Message:

Title link to actual app home page
Refs #594

Location:
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/pages
Files:
2 edited

Legend:

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

    r5575 r5576  
    2626                            <span class="icon-bar"></span>
    2727                        </button>
    28                         <a class="navbar-brand" href="/"><header>Virtual Collection Registry</header></a>
     28                        <a class="navbar-brand" wicket:id="homelink"><header>Virtual Collection Registry</header></a>
    2929                    </div>
    3030
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/pages/BasePage.java

    r5506 r5576  
    88import org.apache.wicket.WicketRuntimeException;
    99import org.apache.wicket.markup.html.WebPage;
     10import org.apache.wicket.markup.html.link.BookmarkablePageLink;
    1011import org.apache.wicket.markup.html.panel.FeedbackPanel;
    1112import org.apache.wicket.model.IModel;
     
    1718    @SpringBean
    1819    private AdminUsersService adminUsersService;
    19 
     20   
    2021    protected BasePage(IModel<?> model) {
    2122        super(model);
     
    4041       
    4142        add(new FeedbackPanel("feedback"));
     43       
     44        add(new BookmarkablePageLink("homelink", getApplication().getHomePage())
     45                .setAutoEnable(false));
    4246    }
    43 
     47   
    4448    protected BasePage() {
    4549        this(null);
    4650    }
    47 
     51   
    4852    @Override
    4953    protected void onBeforeRender() {
    5054        // skip lazy auto-auth for login page
    5155        if (!this.getClass().isInstance(LoginPage.class)) {
    52             final HttpServletRequest request =
    53                 getWebRequestCycle().getWebRequest().getHttpServletRequest();
    54             final ApplicationSession session =
    55                 (ApplicationSession) getSession();
     56            final HttpServletRequest request
     57                    = getWebRequestCycle().getWebRequest().getHttpServletRequest();
     58            final ApplicationSession session
     59                    = (ApplicationSession) getSession();
    5660            if (!session.isSignedIn()) {
    5761                if (request.getAuthType() != null) {
     
    7882        super.onBeforeRender();
    7983    }
    80 
     84   
    8185    protected Principal getUser() {
    8286        ApplicationSession session = (ApplicationSession) getSession();
     
    98102    }
    99103   
    100    
    101 
    102104} // class BasePage
Note: See TracChangeset for help on using the changeset viewer.