From b41754563a8318ae8840574261c503bbf4e7e413 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 2 May 2014 16:09:55 -0400 Subject: [PATCH] Change My Tickets repository link to the repository tickets page --- .../com/gitblit/wicket/panels/TicketListPanel.html | 2 +- .../com/gitblit/wicket/panels/TicketListPanel.java | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.html b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.html index 6e6d2091..30f50367 100644 --- a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.html +++ b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.html @@ -22,7 +22,7 @@
-
[repository link]
+
[tickets link]
diff --git a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java index fc0431fb..395200c1 100644 --- a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java @@ -32,6 +32,7 @@ import com.gitblit.Constants; import com.gitblit.models.RepositoryModel; import com.gitblit.models.UserModel; import com.gitblit.tickets.QueryResult; +import com.gitblit.tickets.TicketIndexer.Lucene; import com.gitblit.tickets.TicketLabel; import com.gitblit.utils.ArrayUtils; import com.gitblit.utils.BugtraqProcessor; @@ -40,7 +41,6 @@ import com.gitblit.wicket.GitBlitWebSession; import com.gitblit.wicket.TicketsUI; import com.gitblit.wicket.TicketsUI.Indicator; import com.gitblit.wicket.WicketUtils; -import com.gitblit.wicket.pages.SummaryPage; import com.gitblit.wicket.pages.TicketsPage; import com.gitblit.wicket.pages.UserPage; @@ -73,16 +73,19 @@ public class TicketListPanel extends BasePanel { WicketUtils.setCssStyle(item, MessageFormat.format("border-left: 2px solid {0};", color)); } - PageParameters rp = WicketUtils.newRepositoryParameter(ticket.repository); PageParameters tp = WicketUtils.newObjectParameter(ticket.repository, "" + ticket.number); if (showRepository) { String name = StringUtils.stripDotGit(ticket.repository); - LinkPanel link = new LinkPanel("repositoryLink", null, name, SummaryPage.class, rp); + PageParameters rp = new PageParameters(WicketUtils.newRepositoryParameter(ticket.repository)); + for (String state : TicketsUI.openStatii) { + rp.add(Lucene.status.name(), state); + } + LinkPanel link = new LinkPanel("ticketsLink", null, name, TicketsPage.class, rp); WicketUtils.setCssBackground(link, name); item.add(link); } else { - item.add(new Label("repositoryLink").setVisible(false)); + item.add(new Label("ticketsLink").setVisible(false)); } item.add(TicketsUI.getStateIcon("state", ticket.type, ticket.status)); -- 2.39.5