commit | author | age
|
a7571b
|
1 |
/*
|
JM |
2 |
* Copyright 2011 gitblit.com.
|
|
3 |
*
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5 |
* you may not use this file except in compliance with the License.
|
|
6 |
* You may obtain a copy of the License at
|
|
7 |
*
|
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9 |
*
|
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13 |
* See the License for the specific language governing permissions and
|
|
14 |
* limitations under the License.
|
|
15 |
*/
|
|
16 |
package com.gitblit.wicket.pages;
|
|
17 |
|
|
18 |
import org.apache.wicket.PageParameters;
|
|
19 |
import org.apache.wicket.markup.html.basic.Label;
|
|
20 |
|
94750e
|
21 |
import com.gitblit.utils.StringUtils;
|
JM |
22 |
|
d376ab
|
23 |
/**
|
JM |
24 |
* RootSubPage is a non-topbar navigable RootPage. It also has a page header.
|
|
25 |
*
|
|
26 |
* @author James Moger
|
|
27 |
*
|
|
28 |
*/
|
|
29 |
public abstract class RootSubPage extends RootPage {
|
|
30 |
|
|
31 |
public RootSubPage() {
|
a7571b
|
32 |
super();
|
JM |
33 |
}
|
|
34 |
|
d376ab
|
35 |
public RootSubPage(PageParameters params) {
|
a7571b
|
36 |
super(params);
|
JM |
37 |
}
|
|
38 |
|
d376ab
|
39 |
@Override
|
JM |
40 |
protected void setupPage(String pageName, String subName) {
|
a7571b
|
41 |
add(new Label("pageName", pageName));
|
94750e
|
42 |
if (!StringUtils.isEmpty(subName)) {
|
JM |
43 |
subName = "/ " + subName;
|
|
44 |
}
|
|
45 |
add(new Label("pageSubName", subName));
|
a7571b
|
46 |
super.setupPage("", pageName);
|
JM |
47 |
}
|
|
48 |
}
|