summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/panels
diff options
context:
space:
mode:
authorPaul Martin <paul@paulsputer.com>2014-09-29 22:10:20 +0100
committerPaul Martin <paul@paulsputer.com>2014-10-20 22:54:54 +0100
commitf9c78c0ccc709509cdf7f83c45c898883d329db2 (patch)
tree50c89c4cf7756d9a80948c70b7eba8f14027d198 /src/main/java/com/gitblit/wicket/panels
parent5be2d394c28f12269ba1aa8e2bd4f9cbd5db9540 (diff)
downloadgitblit-f9c78c0ccc709509cdf7f83c45c898883d329db2.tar.gz
gitblit-f9c78c0ccc709509cdf7f83c45c898883d329db2.zip
Tickets - Priority, Severity options
+ Severity indicated via new character indicator and color of ticket icon on ticket list + Priority indicated via new priority icon and color on ticket list + Indexed as integers to provide sorting and maintain language neutral index + Colours and indicator text controlled through CSS classes priority-<x> & severity-<x> + UITicketTest created to generate tickets of all types to ease debugging
Diffstat (limited to 'src/main/java/com/gitblit/wicket/panels')
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TicketListPanel.html3
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TicketListPanel.java12
2 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.html b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.html
index 30f50367..659baeac 100644
--- a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.html
@@ -30,6 +30,9 @@
<td class="hidden-phone ticket-list-state">
<i wicket:message="title:gb.watching" style="color:#888;" class="fa fa-eye" wicket:id="watching"></i>
</td>
+ <td class="ticket-list-priority">
+ <div wicket:id="priority"></div>
+ </td>
<td class="ticket-list-state">
<div wicket:id="status"></div>
</td>
diff --git a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java
index cc0b57a8..b4c43cb8 100644
--- a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java
@@ -53,7 +53,7 @@ import com.gitblit.wicket.pages.UserPage;
public class TicketListPanel extends BasePanel {
private static final long serialVersionUID = 1L;
-
+
public TicketListPanel(String wicketId, List<QueryResult> list, final boolean showSwatch, final boolean showRepository) {
super(wicketId);
@@ -83,7 +83,10 @@ public class TicketListPanel extends BasePanel {
item.add(new Label("ticketsLink").setVisible(false));
}
- item.add(TicketsUI.getStateIcon("state", ticket.type, ticket.status));
+ Label icon = TicketsUI.getStateIcon("state", ticket.type, ticket.status);
+ WicketUtils.addCssClass(icon, TicketsUI.getSeverityClass(ticket.severity));
+ item.add(icon);
+
item.add(new Label("id", "" + ticket.number));
UserModel creator = app().users().getUserModel(ticket.createdBy);
if (creator != null) {
@@ -167,6 +170,11 @@ public class TicketListPanel extends BasePanel {
// watching indicator
item.add(new Label("watching").setVisible(ticket.isWatching(GitBlitWebSession.get().getUsername())));
+ // priority indicator
+ Label priorityIcon = TicketsUI.getPriorityIcon("priority", ticket.priority);
+ WicketUtils.addCssClass(priorityIcon, TicketsUI.getPriorityClass(ticket.priority));
+ item.add(priorityIcon.setVisible(true));
+
// status indicator
String css = TicketsUI.getLozengeClass(ticket.status, true);
Label l = new Label("status", ticket.status.toString());