Remove S# text, set severity in tooltip
| | |
| | | public static final String [] closedStatii = new String [] { "!" + Status.New.name().toLowerCase(), "!" + Status.Open.name().toLowerCase() }; |
| | | |
| | | public static Label getStateIcon(String wicketId, TicketModel ticket) { |
| | | return getStateIcon(wicketId, ticket.type, ticket.status); |
| | | return getStateIcon(wicketId, ticket.type, ticket.status, ticket.severity); |
| | | } |
| | | |
| | | public static Label getStateIcon(String wicketId, Type type, Status state) { |
| | | public static Label getStateIcon(String wicketId, Type type, Status state, Severity severity) { |
| | | Label label = new Label(wicketId); |
| | | if (type == null) { |
| | | type = Type.defaultType; |
| | |
| | | // standard ticket |
| | | WicketUtils.setCssClass(label, "fa fa-ticket fa-fw"); |
| | | } |
| | | WicketUtils.setHtmlTooltip(label, getTypeState(type, state)); |
| | | WicketUtils.setHtmlTooltip(label, getTypeState(type, state, severity)); |
| | | |
| | | return label; |
| | | } |
| | |
| | | return String.format("severity-%s", severity); |
| | | } |
| | | |
| | | public static String getTypeState(Type type, Status state) { |
| | | public static String getTypeState(Type type, Status state, Severity severity) { |
| | | if (Severity.Unrated == severity) { |
| | | return state.toString() + " " + type.toString(); |
| | | } |
| | | return state.toString() + " " + type.toString() + ", " + severity.toString(); |
| | | } |
| | | |
| | | public static String getLozengeClass(Status status, boolean subtle) { |
| | | if (status == null) { |
| | |
| | | item.add(new Label("ticketsLink").setVisible(false)); |
| | | } |
| | | |
| | | Label icon = TicketsUI.getStateIcon("state", ticket.type, ticket.status); |
| | | Label icon = TicketsUI.getStateIcon("state", ticket.type, ticket.status, ticket.severity); |
| | | WicketUtils.addCssClass(icon, TicketsUI.getSeverityClass(ticket.severity)); |
| | | item.add(icon); |
| | | |
| | |
| | | }
|
| | | .severity-catastrophic:after {
|
| | | font-family: Helvetica,arial,freesans,clean,sans-serif ;
|
| | | content: "S5\a●●●●●";
|
| | | content: "●●●●●";
|
| | | font-weight:900;
|
| | | font-size:.45em;
|
| | | font-variant:small-caps;
|
| | |
| | | }
|
| | | .severity-critical:after {
|
| | | font-family: Helvetica,arial,freesans,clean,sans-serif ;
|
| | | content: "S4\a●●●●";
|
| | | content: "●●●●";
|
| | | font-weight:900;
|
| | | font-size:.45em;
|
| | | font-variant:small-caps;
|
| | |
| | | }
|
| | | .severity-serious:after {
|
| | | font-family: Helvetica,arial,freesans,clean,sans-serif ;
|
| | | content: " S3\a ●●●";
|
| | | content: " ●●●";
|
| | | font-weight:900;
|
| | | font-size:.45em;
|
| | | font-variant:small-caps;
|
| | |
| | | }
|
| | | .severity-minor:after {
|
| | | font-family: Helvetica,arial,freesans,clean,sans-serif ;
|
| | | content: " S2\a ●●";
|
| | | content: " ●●";
|
| | | font-weight:900;
|
| | | font-size:.45em;
|
| | | font-variant:small-caps;
|
| | |
| | | }
|
| | | .severity-negligible:after {
|
| | | font-family: Helvetica,arial,freesans,clean,sans-serif ;
|
| | | content: " S1\a ●";
|
| | | content: " ●";
|
| | | font-weight:900;
|
| | | font-size:.45em;
|
| | | font-variant:small-caps;
|