diff options
author | Eddy Young <jeyoung@priscimon.com> | 2015-05-19 21:02:46 +0100 |
---|---|---|
committer | Eddy Young <jeyoung@priscimon.com> | 2015-05-19 21:02:46 +0100 |
commit | 531abe4fca6db8bd65279c9fc3d22a84cb930756 (patch) | |
tree | 9ec08cfe5dad653367a518c1fe08ec52e7d24b74 /src | |
parent | dcb6c5ac7494eddf7435d09353533cf605464bb5 (diff) | |
download | gitblit-531abe4fca6db8bd65279c9fc3d22a84cb930756.tar.gz gitblit-531abe4fca6db8bd65279c9fc3d22a84cb930756.zip |
More changes
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html | 1 | ||||
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html b/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html index d4dd3bc0..f9062e93 100644 --- a/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html +++ b/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html @@ -62,7 +62,6 @@ </ul> </div> - // TODO implement repositories list <div class="btn-group"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <wicket:message key="gb.repository"></wicket:message>: <span style="font-weight:bold;" wicket:id="currentRepository"></span> <span class="caret"></span></a> <ul class="dropdown-menu"> diff --git a/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java b/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java index 6adf394c..6b372993 100644 --- a/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java +++ b/src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java @@ -72,6 +72,7 @@ public class MyTicketsPage extends RootPage { final String[] statiiParam = (params == null) ? TicketsUI.openStatii : params.getStringArray(Lucene.status.name()); final String assignedToParam = (params == null) ? "" : params.getString(Lucene.responsible.name(), null); final String milestoneParam = (params == null) ? "" : params.getString(Lucene.milestone.name(), null); + // todo jeyoung add repository to this filter final String queryParam = (params == null || StringUtils.isEmpty(params.getString("q", null))) ? "watchedby:" + username : params.getString("q", null); final String searchParam = (params == null) ? "" : params.getString("s", null); final String sortBy = (params == null) ? "" : Lucene.fromString(params.getString("sort", Lucene.created.name())).name(); @@ -257,9 +258,7 @@ public class MyTicketsPage extends RootPage { add(sortMenu); // by repository - List<RepositoryModel> repositoryChoices = new ArrayList<RepositoryModel>(); - // todo add repository choices here - + List<RepositoryModel> repositoryChoices = getRepositoryModels(); RepositoryModel currentRepository = repositoryChoices.size() > 0 ? repositoryChoices.get(0) : null; for (RepositoryModel r : repositoryChoices) { if (r.name.equals(repository)) { @@ -269,6 +268,8 @@ public class MyTicketsPage extends RootPage { } add(new Label("currentRepository", currentRepository == null ? "none" : currentRepository.name)); + // todo insert a "none" option that will show tickets for all + // repositories ListDataProvider<RepositoryModel> repositoryChoicesDp = new ListDataProvider<RepositoryModel>(repositoryChoices); DataView<RepositoryModel> repositoryMenu = new DataView<RepositoryModel>("repository", repositoryChoicesDp) { private static final long serialVersionUID = 1L; @@ -304,6 +305,8 @@ public class MyTicketsPage extends RootPage { } } + // todo jeyoung specify repository name, similar to above + final String luceneQuery; if (qb.containsField(Lucene.createdby.name()) || qb.containsField(Lucene.responsible.name()) @@ -371,7 +374,7 @@ public class MyTicketsPage extends RootPage { params.add("direction", "asc"); } if (!StringUtils.isEmpty(repository)) { - params.add("repository", repository); + params.add(Lucene.repository.name(), repository); } if (page > 1) { params.add("pg", "" + page); |