Implement pagination in branch list screen

Branch list screen should have the same pagination as Project and Group
list screens. When a branch is created, a confirmation message should be
shown letting the user know that it was successful. The branch is
displayed in the current table if the page size limit has not yet been
reached.

Change-Id: Idaa2c48b02aa018727561e86d4bc208380f47ae6
This commit is contained in:
Janice Agustin
2015-01-23 08:51:26 -05:00
parent c2ceaccd55
commit 45143df6c9
8 changed files with 232 additions and 46 deletions

View File

@@ -846,6 +846,11 @@ public class Dispatcher {
return new NotFoundScreen();
}
int q = rest.lastIndexOf('?');
if (q > 0 && rest.lastIndexOf(',', q) > 0) {
c = rest.substring(0, q - 1).lastIndexOf(',');
}
Project.NameKey k = Project.NameKey.parse(rest.substring(0, c));
String panel = rest.substring(c + 1);
@@ -853,7 +858,8 @@ public class Dispatcher {
return new ProjectInfoScreen(k);
}
if (ProjectScreen.BRANCH.equals(panel)) {
if (ProjectScreen.BRANCH.equals(panel)
|| matchPrefix(ProjectScreen.BRANCH, panel)) {
return new ProjectBranchesScreen(k);
}