]> source.dussan.org Git - gitblit.git/commitdiff
More changes
authorEddy Young <jeyoung@priscimon.com>
Tue, 19 May 2015 20:02:46 +0000 (21:02 +0100)
committerEddy Young <jeyoung@priscimon.com>
Tue, 19 May 2015 20:02:46 +0000 (21:02 +0100)
src/main/java/com/gitblit/wicket/pages/MyTicketsPage.html
src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java

index d4dd3bc031eecf8e50ccbd67fb9dce35283e803e..f9062e939dc813ab8cd962d5e59c1f8b161e4b81 100644 (file)
@@ -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">
index 6adf394cc6972234d4614e8b14697548d192d477..6b372993087688e383d6239bbca191cf3f561fec 100644 (file)
@@ -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);