| | |
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.RestartResponseException;
|
| | | import org.apache.wicket.ajax.AjaxRequestTarget;
|
| | | import org.apache.wicket.behavior.IBehavior;
|
| | | import org.apache.wicket.behavior.SimpleAttributeModifier;
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.image.ContextImage;
|
| | |
| | | * TICKET METADATA
|
| | | */
|
| | | add(new Label("ticketType", ticket.type.toString()));
|
| | |
|
| | | add(new Label("priority", ticket.priority.toString()));
|
| | | add(new Label("severity", ticket.severity.toString()));
|
| | |
|
| | | if (StringUtils.isEmpty(ticket.topic)) {
|
| | | add(new Label("ticketTopic").setVisible(false));
|
| | | } else {
|
| | |
| | | String safeTopic = app().xssFilter().relaxed(topic);
|
| | | add(new Label("ticketTopic", safeTopic).setEscapeModelStrings(false));
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | /*
|
| | |
| | | Label status = new Label("statusChange", entry.getStatus().toString());
|
| | | String css = TicketsUI.getLozengeClass(entry.getStatus(), false);
|
| | | WicketUtils.setCssClass(status, css);
|
| | | for (IBehavior b : status.getBehaviors()) {
|
| | | if (b instanceof SimpleAttributeModifier) {
|
| | | SimpleAttributeModifier sam = (SimpleAttributeModifier) b;
|
| | | if ("class".equals(sam.getAttribute())) {
|
| | | status.add(new SimpleAttributeModifier("class", "status-change " + sam.getValue()));
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | frag.add(status);
|
| | | addUserAttributions(frag, entry, avatarWidth);
|
| | | addDateAttributions(frag, entry);
|
| | |
| | | Fragment mergePanel = new Fragment("mergePanel", "alreadyMergedFragment", this);
|
| | | mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetAlreadyMerged"), ticket.mergeTo)));
|
| | | return mergePanel;
|
| | | } else if (MergeStatus.MISSING_INTEGRATION_BRANCH == mergeStatus) {
|
| | | // target/integration branch is missing
|
| | | Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", this);
|
| | | mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetNotMergeable"), ticket.mergeTo)));
|
| | | mergePanel.add(new Label("mergeMore", MessageFormat.format(getString("gb.missingIntegrationBranchMore"), ticket.mergeTo)));
|
| | | return mergePanel;
|
| | | } else {
|
| | | // patchset can not be cleanly merged
|
| | | Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", this);
|
| | |
| | | */
|
| | | protected RepositoryUrl getRepositoryUrl(UserModel user, RepositoryModel repository) {
|
| | | HttpServletRequest req = ((WebRequest) getRequest()).getHttpServletRequest();
|
| | | List<RepositoryUrl> urls = app().gitblit().getRepositoryUrls(req, user, repository);
|
| | | List<RepositoryUrl> urls = app().services().getRepositoryUrls(req, user, repository);
|
| | | if (ArrayUtils.isEmpty(urls)) {
|
| | | return null;
|
| | | }
|