Main menu now uses the TAB type, we might need to create a new type or fix the images used in the tabbed types to make this look decent.

This commit is contained in:
Robin Eklund 2011-08-01 11:57:41 +02:00
parent 356d71ac98
commit 665d558fef
4 changed files with 37 additions and 12 deletions

@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"
>
<body>
<wicket:panel>
<div wicket:id="menuContainer">
<ul>
<li wicket:id="menuList">
<a href=# wicket:id="menuItem">
<img wicket:id="linkImage" /><span wicket:id="linkText">[TabText]</span>
</a>
</li>
</ul>
</div>
</wicket:panel>
</body>
</html>

@ -0,0 +1,16 @@
package se.su.dsv.scipro.basepanels;
import org.apache.wicket.Page;
import se.su.dsv.scipro.components.AbstractMenuPanel;
public abstract class AbstractBaseMenuPanel extends AbstractMenuPanel {
private static final long serialVersionUID = 3738086567246191811L;
public AbstractBaseMenuPanel(final String id,final Class<? extends Page> menuContainerCommonSuperClass, final Class<? extends Page> containerClass) {
super(id,menuContainerCommonSuperClass,containerClass);
}
@Override
protected MenuType getMenuType() {
return MenuType.TAB;
}
}

@ -7,11 +7,10 @@ import org.apache.wicket.Page;
import se.su.dsv.scipro.HomePage;
import se.su.dsv.scipro.admin.pages.AdminStartPage;
import se.su.dsv.scipro.components.AbstractMenuPanel;
import se.su.dsv.scipro.project.pages.ProjectStartPage;
import se.su.dsv.scipro.supervisor.pages.SupervisorStartPage;
public class MainMenuPanel extends AbstractMenuPanel {
public class MainMenuPanel extends AbstractBaseMenuPanel {
private static final long serialVersionUID = 3738086567246191811L;
@ -26,8 +25,4 @@ public class MainMenuPanel extends AbstractMenuPanel {
list.add(new MenuItem(AdminStartPage.MAIN_MENU_LABEL,AdminStartPage.class));
return list;
}
@Override
protected MenuType getMenuType() {
return MenuType.HORIZONTAL;
}
}

@ -6,11 +6,10 @@ import java.util.List;
import org.apache.wicket.Page;
import se.su.dsv.scipro.basepages.MenuPage;
import se.su.dsv.scipro.components.AbstractMenuPanel;
import se.su.dsv.scipro.knol.resource.page.ResourcePage;
import se.su.dsv.scipro.message.pages.PrivateMessagesPage;
public class ServiceMenuPanel extends AbstractMenuPanel {
public class ServiceMenuPanel extends AbstractBaseMenuPanel {
private static final long serialVersionUID = 3738086567246191811L;
public ServiceMenuPanel(String id, Class<? extends Page> containerClass) {
super(id,MenuPage.class,containerClass);
@ -22,8 +21,4 @@ public class ServiceMenuPanel extends AbstractMenuPanel {
list.add(new MenuItem(PrivateMessagesPage.MAIN_MENU_LABEL,PrivateMessagesPage.class));
return list;
}
@Override
protected MenuType getMenuType() {
return MenuType.HORIZONTAL;
}
}