use of com.gitblit.models.NavLink.DropDownPageMenuNavLink 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