Skip to content

Commit

Permalink
Added nav
Browse files Browse the repository at this point in the history
  • Loading branch information
steveswinsburg committed Dec 10, 2014
1 parent 094a875 commit dcd2e11
Show file tree
Hide file tree
Showing 12 changed files with 147 additions and 95 deletions.
2 changes: 1 addition & 1 deletion tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

<build>
<resources>
<!-- include our HTML but not the Java source -->
<!-- include everything except the Java source -->
<resource>
<directory>src/java</directory>
<includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,83 +38,56 @@ protected void init() {

getRequestCycleListeners().add(new IRequestCycleListener() {

public void onBeginRequest()
{
// optionally do something at the beginning of the request
}

public void onEndRequest()
{
// optionally do something at the end of the request
}

public IRequestHandler onException(RequestCycle cycle, Exception ex)
{
// optionally do something here when there's an exception

// then, return the appropriate IRequestHandler, or "null"
// to let another listener handle the exception
//public void onBeginRequest() {
// optionally do something at the beginning of the request
//}

//public void onEndRequest() {
// optionally do something at the end of the request
//}

public IRequestHandler onException(RequestCycle cycle, Exception ex) {
// optionally do something here when there's an exception
// then, return the appropriate IRequestHandler, or "null"
// to let another listener handle the exception
ex.printStackTrace();
return null;
}

@Override
public void onBeginRequest(RequestCycle arg0) {
// TODO Auto-generated method stub

}

@Override
public void onDetach(RequestCycle arg0) {
// TODO Auto-generated method stub

}

@Override
public void onEndRequest(RequestCycle arg0) {
// TODO Auto-generated method stub

}

@Override
public void onExceptionRequestHandlerResolved(
RequestCycle arg0, IRequestHandler arg1, Exception arg2) {
// TODO Auto-generated method stub

public void onExceptionRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1, Exception arg2) {
}

@Override
public void onRequestHandlerExecuted(RequestCycle arg0,
IRequestHandler arg1) {
// TODO Auto-generated method stub

public void onRequestHandlerExecuted(RequestCycle arg0, IRequestHandler arg1) {
}

@Override
public void onRequestHandlerResolved(RequestCycle arg0,
IRequestHandler arg1) {
// TODO Auto-generated method stub

public void onRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1) {
}

@Override
public void onRequestHandlerScheduled(RequestCycle arg0,
IRequestHandler arg1) {
// TODO Auto-generated method stub

public void onRequestHandlerScheduled(RequestCycle arg0, IRequestHandler arg1) {
}

@Override
public void onUrlMapped(RequestCycle arg0,
IRequestHandler arg1, Url arg2) {
// TODO Auto-generated method stub

public void onUrlMapped(RequestCycle arg0,IRequestHandler arg1, Url arg2) {
}
});





//to put this app into deployment mode, see web.xml
}

Expand All @@ -133,8 +106,7 @@ public Class<GradebookPage> getHomePage() {
/**
* Constructor
*/
public GradebookNgApplication()
{
public GradebookNgApplication() {
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
app.title = GradebookNG

link.gradebook = Gradebook
link.gradebook.tooltip = Go to the gradebook
link.gradebook = Grades
link.gradebook.tooltip = Grades

link.settings = Settings
link.settings.tooltip = Settings

link.importexport = Import / Export
link.importexport.tooltip = Import / Export

link.permissions = Permissions
link.permissions.tooltip = Permissions
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@
<a wicket:id="gradebookPageLink" wicket:message="title:link.gradebook.tooltip">
<wicket:message key="link.gradebook" />
</a>
<a wicket:id="settingsPageLink" wicket:message="title:link.settings.tooltip">
<wicket:message key="link.settings" />
</a>
<a wicket:id="importExportPageLink" wicket:message="title:link.importexport.tooltip">
<wicket:message key="link.importexport" />
</a>
<a wicket:id="permissionsPageLink" wicket:message="title:link.permissions.tooltip">
<wicket:message key="link.permissions" />
</a>
</li>

</ul>

<span wicket:id="feedback">feedbackmessages will be put here</span>
<span wicket:id="feedback">Feedback messages go here</span>

<wicket:child />

Expand Down
52 changes: 32 additions & 20 deletions tool/src/java/org/sakaiproject/gradebookng/tool/pages/BasePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,53 @@ public class BasePage extends WebPage implements IHeaderContributor {
protected GradebookNgBusinessService businessService;

Link<Void> gradebookPageLink;
Link<Void> settingsPageLink;
Link<Void> importExportPageLink;
Link<Void> permissionsPageLink;


FeedbackPanel feedbackPanel;

public BasePage() {

log.debug("BasePage()");


//first link
//grades page
gradebookPageLink = new Link<Void>("gradebookPageLink") {
private static final long serialVersionUID = 1L;
public void onClick() {

setResponsePage(new GradebookPage());
}
};
add(gradebookPageLink);

//settings page
settingsPageLink = new Link<Void>("settingsPageLink") {
private static final long serialVersionUID = 1L;
public void onClick() {
setResponsePage(new SettingsPage());
}
};
add(settingsPageLink);

//settings page
importExportPageLink = new Link<Void>("importExportPageLink") {
private static final long serialVersionUID = 1L;
public void onClick() {
setResponsePage(new ImportExportPage());
}
};
add(importExportPageLink);

//permissions page
permissionsPageLink = new Link<Void>("permissionsPageLink") {
private static final long serialVersionUID = 1L;
public void onClick() {
setResponsePage(new PermissionsPage());
}
};
add(permissionsPageLink);

// Add a FeedbackPanel for displaying our messages
feedbackPanel = new FeedbackPanel("feedback"){

Expand Down Expand Up @@ -89,22 +118,6 @@ public void clearFeedback(FeedbackPanel f) {



















/**
* This block adds the required wrapper markup to style it like a Sakai tool.
* Add to this any additional CSS or JS references that you need.
Expand All @@ -117,7 +130,6 @@ public void renderHead(IHeaderResponse response) {
response.render(StringHeaderItem.forString((String)request.getAttribute("sakai.html.head")));
response.render(OnLoadHeaderItem.forScript("setMainFrameHeight( window.name )"));


//Tool additions (at end so we can override if required)
response.render(StringHeaderItem.forString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"));
//response.renderCSSReference("css/my_tool_styles.css");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
<body>
<wicket:extend>

<p>This is the second page</p>

<!-- note that the link below has it's i18n message directly embedded in the html, no Java required. -->
<a wicket:id="toThirdPageLink"><wicket:message key="goto.page.three" /></a>


</wicket:extend>
</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.sakaiproject.gradebookng.tool.pages;


/**
* Settings page
*
* @author Steve Swinsburg ([email protected])
*
*/
public class ImportExportPage extends BasePage {

private static final long serialVersionUID = 1L;

public ImportExportPage() {


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" >

<body>
<wicket:extend>


</wicket:extend>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.sakaiproject.gradebookng.tool.pages;


/**
* Permissions page
*
* @author Steve Swinsburg ([email protected])
*
*/
public class PermissionsPage extends BasePage {

private static final long serialVersionUID = 1L;

public PermissionsPage() {


}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" >

<body>
<wicket:extend>


</wicket:extend>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.sakaiproject.gradebookng.tool.pages;


/**
* Settings page
*
* @author Steve Swinsburg ([email protected])
*
*/
public class SettingsPage extends BasePage {

private static final long serialVersionUID = 1L;

public SettingsPage() {


}
}

0 comments on commit dcd2e11

Please sign in to comment.