use of com.gitblit.models.Menu.ParameterMenuItem in project gitblit by gitblit.
the class ProjectPage method addDropDownMenus.
@Override
protected void addDropDownMenus(List<NavLink> navLinks) {
PageParameters params = getPageParameters();
DropDownPageMenuNavLink menu = new DropDownPageMenuNavLink("gb.filters", ProjectPage.class);
// preserve time filter option on repository choices
menu.menuItems.addAll(getRepositoryFilterItems(params));
// preserve repository filter option on time choices
menu.menuItems.addAll(getTimeFilterItems(params));
if (menu.menuItems.size() > 0) {
// Reset Filter
menu.menuItems.add(new ParameterMenuItem(getString("gb.reset"), "p", WicketUtils.getProjectName(params)));
}
navLinks.add(menu);
DropDownPageMenuNavLink projects = new DropDownPageMenuNavLink("gb.projects", ProjectPage.class);
projects.menuItems.addAll(getProjectsMenu());
navLinks.add(projects);
}
use of com.gitblit.models.Menu.ParameterMenuItem in project gitblit by gitblit.
the class UserPage method addDropDownMenus.
@Override
protected void addDropDownMenus(List<NavLink> navLinks) {
PageParameters params = getPageParameters();
DropDownPageMenuNavLink menu = new DropDownPageMenuNavLink("gb.filters", UserPage.class);
// preserve time filter option on repository choices
menu.menuItems.addAll(getRepositoryFilterItems(params));
// preserve repository filter option on time choices
menu.menuItems.addAll(getTimeFilterItems(params));
if (menu.menuItems.size() > 0) {
// Reset Filter
menu.menuItems.add(new ParameterMenuItem(getString("gb.reset")));
}
navLinks.add(menu);
}
use of com.gitblit.models.Menu.ParameterMenuItem in project gitblit by gitblit.
the class ActivityPage method addDropDownMenus.
@Override
protected void addDropDownMenus(List<NavLink> navLinks) {
DropDownPageMenuNavLink filters = new DropDownPageMenuNavLink("gb.filters", ActivityPage.class);
PageParameters currentParameters = getPageParameters();
int daysBack = app().settings().getInteger(Keys.web.activityDuration, 7);
if (currentParameters != null && !currentParameters.containsKey("db")) {
currentParameters.put("db", daysBack);
}
// preserve time filter options on repository choices
filters.menuItems.addAll(getRepositoryFilterItems(currentParameters));
// preserve repository filter options on time choices
filters.menuItems.addAll(getTimeFilterItems(currentParameters));
if (filters.menuItems.size() > 0) {
// Reset Filter
filters.menuItems.add(new ParameterMenuItem(getString("gb.reset")));
}
navLinks.add(filters);
}
Aggregations