The Unified and Autonomous Development Platform
Preparation work of request overview page css adjustment.
robin shine5c3490f76c97
diff --git a/commons.wicket/src/main/java/com/pmease/commons/wicket/component/LabelLink.java b/commons.wicket/src/main/java/com/pmease/commons/wicket/component/LabelLink.javaindex b03a64bf72..91bc6122fe 100644--- a/commons.wicket/src/main/java/com/pmease/commons/wicket/component/LabelLink.java+++ b/commons.wicket/src/main/java/com/pmease/commons/wicket/component/LabelLink.java@@ -1,7 +1,5 @@package com.pmease.commons.wicket.component;-import org.apache.wicket.markup.ComponentTag;-import org.apache.wicket.markup.MarkupStream;import org.apache.wicket.markup.html.link.Link;import org.apache.wicket.model.IModel;@@ -18,29 +16,15 @@ public abstract class LabelLink<T> extends Link<T> {super(id, linkModel);this.labelModel = labelModel;}-+@Override- public void onComponentTagBody(final MarkupStream markupStream,- final ComponentTag openTag) {-- // Draw anything before the body?- if (!isLinkEnabled() && (getBeforeDisabledLink() != null)) {- getResponse().write(getBeforeDisabledLink());- }-- replaceComponentTagBody(markupStream, openTag, labelModel.getObject());-- // Draw anything after the body?- if (!isLinkEnabled() && (getAfterDisabledLink() != null)) {- getResponse().write(getAfterDisabledLink());- }+ public IModel<?> getBody() {+ return labelModel;}-+@Overridepublic void onDetach() {- if (labelModel != null) {- labelModel.detach();- }+ labelModel.detach();super.onDetach();}diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/CommentPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/CommentPanel.htmlindex 9f5bb0b861..ba77a791c5 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/CommentPanel.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/CommentPanel.html@@ -1,17 +1,17 @@<wicket:panel><div class="comment">- <div wicket:id="info" class="info">+ <div wicket:id="head" class="head"><span wicket:id="user" class="user"></span> commented <span wicket:id="age"></span><span class="actions"><a wicket:id="edit" title="Edit comment"><span class="fa fa-pencil"></span></a><a wicket:id="delete" title="Delete comment"><span class="fa fa-times"></span></a><a wicket:id="resolve"></a><span wicket:id="resolved" class="fa fa-check" title="This comment is marked as resolved"></span>- <span wicket:id="additionalActions"></span>+ <span wicket:id="additionalOperations"></span></span><a wicket:id="anchor"></a></div>- <div wicket:id="content" class="content"></div>+ <div wicket:id="body" class="body"></div><div class="replies"><table><tbody>@@ -20,16 +20,16 @@<div wicket:id="avatar"></div></td><td class="detail">- <div class="info">+ <div class="head"><span wicket:id="user" class="user"></span> replied <span wicket:id="age"></span>- <span class="actions">+ <span class="operations"><a wicket:id="edit" title="Edit reply"><span class="fa fa-pencil"></span></a><a wicket:id="delete" title="Delete reply"><span class="fa fa-times"></span></a>- <span wicket:id="additionalActions"></span>+ <span wicket:id="additionalOperations"></span></span><a wicket:id="anchor"></a></div>- <div wicket:id="content" class="content"></div>+ <div wicket:id="body" class="body"></div></td></tr></tbody>@@ -46,7 +46,6 @@<div wicket:id="feedback"></div><div class="actions"><button wicket:id="save" class="btn btn-sm btn-primary dirty-aware">Save</button>- <button wicket:id="cancel" class="btn btn-sm btn-default">Cancel</button></div></form>diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/CommentPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/CommentPanel.javaindex 6e7f4906fc..1bfe18b38b 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/CommentPanel.java+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/CommentPanel.java@@ -49,6 +49,12 @@ import com.pmease.gitplex.web.model.UserModel;@SuppressWarnings("serial")public class CommentPanel extends Panel {+ private static final String HEAD_ID = "head";++ private static final String BODY_ID = "body";++ private static final String CONTENT_ID = "content";+private static final String ADD_REPLY_ID = "addReply";private RepeatingView repliesView;@@ -80,7 +86,7 @@ public class CommentPanel extends Panel {}private Fragment renderForView(String content) {- Fragment fragment = new Fragment("content", "viewFrag", this);+ Fragment fragment = new Fragment(BODY_ID, "viewFrag", this);fragment.add(new MarkdownPanel("comment", Model.of(content)));fragment.setOutputMarkupId(true);return fragment;@@ -90,18 +96,18 @@ public class CommentPanel extends Panel {protected void onInitialize() {super.onInitialize();- final WebMarkupContainer info = new WebMarkupContainer("info");- info.setOutputMarkupId(true);- add(info);+ final WebMarkupContainer head = new WebMarkupContainer(HEAD_ID);+ head.setOutputMarkupId(true);+ add(head);- info.add(new UserLink("user", new UserModel(getComment().getUser()), AvatarMode.NAME));- info.add(new Label("age", DateUtils.formatAge(getComment().getDate())));+ head.add(new UserLink("user", new UserModel(getComment().getUser()), AvatarMode.NAME));+ head.add(new Label("age", DateUtils.formatAge(getComment().getDate())));- info.add(new AjaxLink<Void>("edit") {+ head.add(new AjaxLink<Void>("edit") {@Overridepublic void onClick(AjaxRequestTarget target) {- Fragment fragment = new Fragment("content", "editFrag", CommentPanel.this);+ Fragment fragment = new Fragment(BODY_ID, "editFrag", CommentPanel.this);Form<?> form = new Form<Void>("form");fragment.add(form);@@ -155,7 +161,7 @@ public class CommentPanel extends Panel {});- info.add(new AjaxLink<Void>("delete") {+ head.add(new AjaxLink<Void>("delete") {@Overridepublic void onClick(AjaxRequestTarget target) {@@ -173,7 +179,7 @@ public class CommentPanel extends Panel {}.add(new ConfirmBehavior("Deleting this comment will also delete all its replies. Do you really want to continue?")));AjaxLink<Void> resolveLink;- info.add(resolveLink = new AjaxLink<Void>("resolve") {+ head.add(resolveLink = new AjaxLink<Void>("resolve") {@Overridepublic void onClick(AjaxRequestTarget target) {@@ -181,7 +187,7 @@ public class CommentPanel extends Panel {if (getComment().isResolved())send(CommentPanel.this, Broadcast.BUBBLE, new CommentCollapsing(target, getComment()));if (findPage() != null) // only render this checkbox if the whole comment panel is not replaced- target.add(info);+ target.add(head);}@Override@@ -207,7 +213,7 @@ public class CommentPanel extends Panel {});resolveLink.setOutputMarkupId(true);- info.add(new WebMarkupContainer("resolved") {+ head.add(new WebMarkupContainer("resolved") {@Overrideprotected void onConfigure() {@@ -218,7 +224,7 @@ public class CommentPanel extends Panel {});- info.add(newAdditionalCommentActions("additionalActions", new AbstractReadOnlyModel<Comment>() {+ head.add(newAdditionalCommentOperations("additionalOperations", new AbstractReadOnlyModel<Comment>() {@Overridepublic Comment getObject() {@@ -227,11 +233,11 @@ public class CommentPanel extends Panel {}));- info.add(new WebMarkupContainer("anchor").add(AttributeModifier.replace("name", "comment" + getComment().getId())));+ head.add(new WebMarkupContainer("anchor").add(AttributeModifier.replace("name", "comment" + getComment().getId())));add(renderForView(getComment().getContent()));- add(newAddReplyRow());+ add(newAddReply());setOutputMarkupId(true);}@@ -265,21 +271,21 @@ public class CommentPanel extends Panel {}}- private Component newAddReplyRow() {+ private Component newAddReply() {WebMarkupContainer addReplyRow = new WebMarkupContainer(ADD_REPLY_ID);addReplyRow.setOutputMarkupId(true);addReplyRow.setVisible(GitPlex.getInstance(UserManager.class).getCurrent() != null);- Fragment fragment = new Fragment("content", "addFrag", this);- fragment.add(new AjaxLink<Void>("addReply") {+ Fragment fragment = new Fragment(CONTENT_ID, "addFrag", this);+ fragment.add(new AjaxLink<Void>(ADD_REPLY_ID) {@Overridepublic void onClick(AjaxRequestTarget target) {- final WebMarkupContainer row = new WebMarkupContainer("addReply");+ final WebMarkupContainer row = new WebMarkupContainer(ADD_REPLY_ID);row.setOutputMarkupId(true);- Fragment fragment = new Fragment("content", "editFrag", CommentPanel.this);+ Fragment fragment = new Fragment(CONTENT_ID, "editFrag", CommentPanel.this);row.add(fragment);Form<?> form = new Form<Void>("form");@@ -295,9 +301,9 @@ public class CommentPanel extends Panel {@Overrideprotected void onSubmit(AjaxRequestTarget target, Form<?> form) {- Component addReplyRow = newAddReplyRow();- CommentPanel.this.replace(addReplyRow);- target.add(addReplyRow);+ Component addReply = newAddReply();+ CommentPanel.this.replace(addReply);+ target.add(addReply);CommentReply reply;InheritableThreadLocalData.set(new PageId(pageId));@@ -308,7 +314,7 @@ public class CommentPanel extends Panel {}Component newReplyRow = newReplyRow(repliesView.newChildId(), reply);repliesView.add(newReplyRow);- String script = String.format("$('#%s>.replies>table>tbody').append(\"<tr id='%s' class='reply'></tr>\");",+ String script = String.format("$('#%s>.comment>.replies>table>tbody').append(\"<tr id='%s' class='reply'></tr>\");",CommentPanel.this.getMarkupId(), newReplyRow.getMarkupId());target.prependJavaScript(script);target.add(newReplyRow);@@ -326,9 +332,9 @@ public class CommentPanel extends Panel {@Overridepublic void onClick(AjaxRequestTarget target) {- Component addReplyRow = newAddReplyRow();- CommentPanel.this.replace(addReplyRow);- target.add(addReplyRow);+ Component addReply = newAddReply();+ CommentPanel.this.replace(addReply);+ target.add(addReply);}}.add(new DirtyIgnoreBehavior()));@@ -373,7 +379,7 @@ public class CommentPanel extends Panel {@Overridepublic void onClick(AjaxRequestTarget target) {- Fragment fragment = new Fragment("content", "editFrag", CommentPanel.this);+ Fragment fragment = new Fragment(BODY_ID, "editFrag", CommentPanel.this);Form<?> form = new Form<Void>("form");fragment.add(form);@@ -448,7 +454,7 @@ public class CommentPanel extends Panel {}.add(new ConfirmBehavior("Do you really want to delete this reply?")));- row.add(newAdditionalReplyActions("additionalActions", (CommentReply) row.getDefaultModelObject()));+ row.add(newAdditionalReplyOperations("additionalOperations", (CommentReply) row.getDefaultModelObject()));row.add(new WebMarkupContainer("anchor").add(AttributeModifier.replace("name", "reply" + reply.getId())));row.add(renderForView(reply.getContent()));@@ -462,11 +468,11 @@ public class CommentPanel extends Panel {return row;}- protected Component newAdditionalCommentActions(String id, IModel<Comment> comment) {+ protected Component newAdditionalCommentOperations(String id, IModel<Comment> comment) {return new WebMarkupContainer(id);}- protected Component newAdditionalReplyActions(String id, CommentReply reply) {+ protected Component newAdditionalReplyOperations(String id, CommentReply reply) {return new WebMarkupContainer(id);}diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/UpdateChangesLink.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/UpdateChangesLink.javanew file mode 100644index 0000000000..d6e71f4a77--- /dev/null+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/UpdateChangesLink.java@@ -0,0 +1,32 @@+package com.pmease.gitplex.web.page.repository.pullrequest.requestdetail;++import org.apache.wicket.markup.html.link.BookmarkablePageLink;+import org.apache.wicket.model.IModel;+import org.apache.wicket.model.Model;+import org.apache.wicket.request.mapper.parameter.PageParameters;++import com.pmease.gitplex.core.model.PullRequest;+import com.pmease.gitplex.core.model.PullRequestUpdate;+import com.pmease.gitplex.web.page.repository.pullrequest.requestdetail.compare.RequestComparePage;++@SuppressWarnings("serial")+public class UpdateChangesLink extends BookmarkablePageLink<Void> {++ public UpdateChangesLink(String id, PullRequestUpdate update) {+ super(id, RequestComparePage.class, paramsOf(update));++ setEscapeModelStrings(false);+ }++ private static PageParameters paramsOf(PullRequestUpdate update) {+ PullRequest request = update.getRequest();+ PageParameters params = RequestComparePage.paramsOf(+ request, null, update.getBaseCommitHash(), update.getHeadCommitHash(), null);+ return params;+ }++ public IModel<?> getBody() {+ return Model.of("<i class='fa fa-ext fa-file-diff'></i>");+ }++}diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/ApproveActivityPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/ApproveActivityPanel.htmlindex ffbea53f84..711df89afd 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/ApproveActivityPanel.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/ApproveActivityPanel.html@@ -1,6 +1,6 @@<wicket:panel><div class="approve"><span class="icon fa fa-arrow-up"></span> <span wicket:id="user" class="user"></span>- approved pull request <span wicket:id="age"></span> <span class="actions"><span wicket:id="changes"></span></span>+ approved pull request <span wicket:id="age"></span> <span class="operations"><span wicket:id="changes"></span></span></div></wicket:panel>\ No newline at end of filediff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/CommentActivityPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/CommentActivityPanel.htmlindex 5adc3c73eb..8d0a6f1222 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/CommentActivityPanel.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/CommentActivityPanel.html@@ -1,6 +1,6 @@<wicket:panel><div wicket:id="content" class="comment"></div>- <wicket:fragment wicket:id="actionsFrag">+ <wicket:fragment wicket:id="operationsFrag"><a wicket:id="collapse" class="fa fa-compress" title="Collapse this comment"></a><span wicket:id="changes"></span></wicket:fragment>diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/CommentActivityPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/CommentActivityPanel.javaindex 17d29a2556..5e29282bbc 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/CommentActivityPanel.java+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/CommentActivityPanel.java@@ -34,8 +34,8 @@ class CommentActivityPanel extends Panel {add(new CommentPanel("content", commentModel) {@Override- protected Component newAdditionalCommentActions(String id, final IModel<Comment> commentModel) {- Fragment fragment = new Fragment(id, "actionsFrag", CommentActivityPanel.this) {+ protected Component newAdditionalCommentOperations(String id, final IModel<Comment> commentModel) {+ Fragment fragment = new Fragment(id, "operationsFrag", CommentActivityPanel.this) {@Overrideprotected void onDetach() {@@ -77,7 +77,7 @@ class CommentActivityPanel extends Panel {}@Override- protected Component newAdditionalReplyActions(String id, CommentReply reply) {+ protected Component newAdditionalReplyOperations(String id, CommentReply reply) {return new SinceChangesLink(id, new AbstractReadOnlyModel<PullRequest>() {@Overridediff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/DisapproveActivityPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/DisapproveActivityPanel.htmlindex c126f3afc5..31e9216dee 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/DisapproveActivityPanel.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/DisapproveActivityPanel.html@@ -1,6 +1,6 @@<wicket:panel><div class="disapprove"><span class="icon fa fa-arrow-down"></span> <span wicket:id="user" class="user"></span>- disapproved pull request <span wicket:id="age"></span> <span class="actions"><span wicket:id="changes"></span></span>+ disapproved pull request <span wicket:id="age"></span> <span class="operations"><span wicket:id="changes"></span></span></div></wicket:panel>\ No newline at end of filediff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/InlineCommentActivityPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/InlineCommentActivityPanel.htmlindex 2424c752e9..acb3624f02 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/InlineCommentActivityPanel.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/InlineCommentActivityPanel.html@@ -7,7 +7,7 @@<div class="inline-comment panel panel-default"><div class="panel-heading"><span wicket:id="file"></span>- <span class="actions">+ <span class="operations"><a wicket:id="compareView" class="fa fa-file-text" title="View full context"></a></span></div>diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/InlineCommentActivityPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/InlineCommentActivityPanel.javaindex 8792e5ccef..2a7206e71d 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/InlineCommentActivityPanel.java+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/InlineCommentActivityPanel.java@@ -206,7 +206,7 @@ class InlineCommentActivityPanel extends Panel {add(new CommentPanel("comment", commentModel) {@Override- protected Component newAdditionalCommentActions(String id, IModel<Comment> comment) {+ protected Component newAdditionalCommentOperations(String id, IModel<Comment> comment) {Fragment fragment = new Fragment(id, "actionsFrag", InlineCommentActivityPanel.this);fragment.add(new AjaxLink<Void>("collapse") {diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/OpenActivityPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/OpenActivityPanel.htmlindex 87d066a755..ed5db708da 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/OpenActivityPanel.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/OpenActivityPanel.html@@ -14,7 +14,6 @@<textarea wicket:id="input" class="form-conrol focusable" rows="10"></textarea><div class="actions"><button wicket:id="save" class="btn btn-sm btn-primary dirty-aware">Save</button>- <button wicket:id="cancel" class="btn btn-sm btn-default">Cancel</button></div></form>diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/RequestOverviewPage.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/RequestOverviewPage.htmlindex fba73c3662..ed7b57d875 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/RequestOverviewPage.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/RequestOverviewPage.html@@ -5,7 +5,7 @@<table><tr wicket:id="requestActivities" class="activity"><td wicket:id="avatar" class="avatar"><div wicket:id="avatar"></div></td>- <td wicket:id="activity" class="activity"></td>+ <td wicket:id="detail" class="detail"></td></tr></table><div wicket:id="addComment" class="add-comment">@@ -16,9 +16,9 @@</form></div></td>- <td class="others">+ <td class="info"><div class="well">- <div wicket:id="basicInfo" class="basic-info">+ <div wicket:id="basicInfo" class="basic"><div class="submitter"><label>Submitted By: </label> <span wicket:id="submitter" class="avatar"></span></div>@@ -70,14 +70,16 @@</tr></table><wicket:fragment wicket:id="collapsedCommentFrag">- <div class="summary">- <span wicket:id="user" class="user"></span> <span wicket:id="activity"></span> <span wicket:id="age"></span>- <span class="actions">- <span class="fa fa-check" title="This comment is marked as resolved"></span>- <a wicket:id="expand" class="fa fa-expand" title="Expand this comment"></a>- </span>+ <div class="collapsed comment">+ <div class="head">+ <span wicket:id="user" class="user"></span> <span wicket:id="action"></span> <span wicket:id="age"></span>+ <span class="operations">+ <span class="fa fa-check" title="This comment is marked as resolved"></span>+ <a wicket:id="expand" class="fa fa-expand" title="Expand this comment"></a>+ </span>+ </div>+ <div wicket:id="body" class="body"></div></div>- <div wicket:id="detail" class="detail"></div></wicket:fragment><wicket:fragment wicket:id="assigneeEditFrag"><label>Assigned To: <span wicket:id="help" class="fa fa-question-circle pointer small"></span></label>diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/RequestOverviewPage.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/RequestOverviewPage.javaindex ef01d898bd..371d030497 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/RequestOverviewPage.java+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/RequestOverviewPage.java@@ -85,6 +85,8 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.components.TooltipConfig@SuppressWarnings("serial")public class RequestOverviewPage extends RequestDetailPage {+ private static final String DETAIL_ID = "detail";+private static final String ASSIGNEE_HELP = "Assignee has write permission to the "+ "repository and is resonsible for integrating the pull request into "+ "target branch after it passes gate keeper check.";@@ -143,23 +145,23 @@ public class RequestOverviewPage extends RequestDetailPage {if (commentActivity != null && commentActivity.isCollapsed()) {PullRequestComment comment = commentActivity.getComment();- Fragment fragment = new Fragment("activity", "collapsedCommentFrag", RequestOverviewPage.this);+ Fragment fragment = new Fragment(DETAIL_ID, "collapsedCommentFrag", RequestOverviewPage.this);fragment.add(new UserLink("user", new UserModel(comment.getUser()), AvatarMode.NAME));if (comment.getInlineInfo() != null)- fragment.add(new Label("activity", "added inline comment on file '" + comment.getBlobIdent().path + "'"));+ fragment.add(new Label("action", "added inline comment on file '" + comment.getBlobIdent().path + "'"));else- fragment.add(new Label("activity", "commented"));+ fragment.add(new Label("action", "commented"));fragment.add(new Label("age", DateUtils.formatAge(comment.getDate())));- fragment.add(new Label("detail", comment.getContent()));+ fragment.add(new Label("body", comment.getContent()));fragment.add(new AjaxLink<Void>("expand") {@Overridepublic void onClick(AjaxRequestTarget target) {RenderableActivity activity = (RenderableActivity) row.getDefaultModelObject();- row.replace(activity.render("activity"));+ row.replace(activity.render(DETAIL_ID));commentActivity.setCollapsed(false);target.add(row);}@@ -174,15 +176,13 @@ public class RequestOverviewPage extends RequestDetailPage {avatarColumn.add(new UserLink("avatar", new UserModel(activity.getUser()), AvatarMode.AVATAR));row.add(avatarColumn);- if (row.get("activity") == null)- row.add(activity.render("activity"));+ if (row.get(DETAIL_ID) == null)+ row.add(activity.render(DETAIL_ID));if (activity instanceof OpenPullRequest || activity instanceof CommentPullRequest)- row.add(AttributeAppender.append("class", " discussion non-update"));- else if (activity instanceof UpdatePullRequest)- row.add(AttributeAppender.append("class", " non-discussion update"));+ row.add(AttributeAppender.append("class", " discussion"));else- row.add(AttributeAppender.append("class", " non-discussion non-update"));+ row.add(AttributeAppender.append("class", " non-discussion"));PullRequestManager pullRequestManager = GitPlex.getInstance(PullRequestManager.class);final Date lastVisitDate = pullRequestManager.getLastVisitDate(getPullRequest());diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UndoReviewActivityPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UndoReviewActivityPanel.htmlindex b6c9f61510..f4a6e83eda 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UndoReviewActivityPanel.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UndoReviewActivityPanel.html@@ -1,6 +1,6 @@<wicket:panel><div class="undo-review"><span class="fa fa-minus"></span> <span wicket:id="user" class="user"></span>- removed review <span wicket:id="age"></span> <span class="actions"><span wicket:id="changes"></span></span>+ removed review <span wicket:id="age"></span> <span class="operations"><span wicket:id="changes"></span></span></div></wicket:panel>\ No newline at end of filediff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UpdateActivityPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UpdateActivityPanel.htmlindex 79c0e2148f..55848f4a35 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UpdateActivityPanel.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UpdateActivityPanel.html@@ -3,7 +3,7 @@<div class="info"><span class="fa fa-ext fa-repo-push"></span>Update #<span wicket:id="updateNo"></span> pushed <span wicket:id="age"></span>- <span class="actions"><span wicket:id="changes"></span></span>+ <span class="actions"><a wicket:id="changes" title="Changes of this update"></a></span></div><div class="commits"><div wicket:id="tooManyCommits" class="alert alert-warning"></div>diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UpdateActivityPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UpdateActivityPanel.javaindex 874f0a4f57..8216b5389b 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UpdateActivityPanel.java+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/UpdateActivityPanel.java@@ -30,6 +30,7 @@ import com.pmease.gitplex.web.component.commitmessage.CommitMessagePanel;import com.pmease.gitplex.web.component.personlink.PersonLink;import com.pmease.gitplex.web.component.pullrequest.verificationstatus.VerificationStatusPanel;import com.pmease.gitplex.web.page.repository.file.RepoFilePage;+import com.pmease.gitplex.web.page.repository.pullrequest.requestdetail.UpdateChangesLink;import de.agilecoders.wicket.core.markup.html.bootstrap.components.TooltipConfig;@@ -64,6 +65,9 @@ class UpdateActivityPanel extends Panel {PullRequestUpdate update = updateModel.getObject();add(new Label("updateNo", update.getRequest().getSortedUpdates().indexOf(update)+1));add(new Label("age", DateUtils.formatAge(update.getDate())));++ add(new UpdateChangesLink("changes", update));+String tooManyMessage = "Too many commits, displaying recent " + Constants.MAX_DISPLAY_COMMITS;add(new Label("tooManyCommits", tooManyMessage) {diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/request-overview.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/request-overview.cssindex b8081d1f8f..8b34a59dd6 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/request-overview.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/overview/request-overview.css@@ -109,69 +109,6 @@#request-detail .activities .activity.new>.avatar {background: #FCF6D6;}--#request-detail .others>div>div {- border-bottom: 1px dotted #BBB;- margin-bottom: 16px;- padding-bottom: 16px;- font-size: 13px;- color: #666;-}-#request-detail .others>div>div:last-child {- border-bottom: none;- margin-bottom: 0;- padding-bottom: 0;-}-#request-detail .others .help-block {- margin-bottom: 0;- color: #888;-}-#request-detail .others .fa.small {- font-size: 14px;- vertical-align: middle;-}-#request-detail .others label {- margin-right: 4px;- font-weight: normal;-}-#request-detail .others .select2-container {- width: 100%;-}-#request-detail .others .avatar {- width: 24px;- height: 24px;-}-#request-detail .others .select2-container .avatar {- width: 20px;- height: 20px;-}--#request-detail .others .basic-info .submitter, #request-detail .others .basic-info .target {- margin-bottom: 4px;-}-#request-detail .others .basic-info span, #request-detail .others .basic-info a {- white-space: nowrap;-}-#request-detail .others .basic-info .source>a {- margin-left: 4px;-}--#request-detail .others .reviewers ul {- margin-bottom: 0;-}-#request-detail .others .reviewers li {- margin-right: 20px;- margin-bottom: 10px;- position: relative;-}-#request-detail .others .reviewers li a:hover {- text-decoration: none;-}--#request-detail .others .reviewers .review-result {- top: 12px;-}-#request-detail .activities .table-diff>tbody>.line.comments>td {padding: 12px;}@@ -234,3 +171,65 @@margin-left: -20px;margin-right: 7px;}++#request-detail .info>div>div {+ border-bottom: 1px dotted #BBB;+ margin-bottom: 16px;+ padding-bottom: 16px;+ font-size: 13px;+ color: #666;+}+#request-detail .info>div>div:last-child {+ border-bottom: none;+ margin-bottom: 0;+ padding-bottom: 0;+}+#request-detail .info .help-block {+ margin-bottom: 0;+ color: #888;+}+#request-detail .info .fa.small {+ font-size: 14px;+ vertical-align: middle;+}+#request-detail .info label {+ margin-right: 4px;+ font-weight: normal;+}+#request-detail .info .select2-container {+ width: 100%;+}+#request-detail .info .avatar {+ width: 24px;+ height: 24px;+}+#request-detail .info .select2-container .avatar {+ width: 20px;+ height: 20px;+}++#request-detail .info .basic .submitter, #request-detail .info .basic .target {+ margin-bottom: 4px;+}+#request-detail .info .basic span, #request-detail .info .basic a {+ white-space: nowrap;+}+#request-detail .info .basic .source>a {+ margin-left: 4px;+}++#request-detail .info .reviewers ul {+ margin-bottom: 0;+}+#request-detail .info .reviewers li {+ margin-right: 20px;+ margin-bottom: 10px;+ position: relative;+}+#request-detail .info .reviewers li a:hover {+ text-decoration: none;+}++#request-detail .info .reviewers .review-result {+ top: 12px;+}diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/updates/RequestUpdatesPage.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/updates/RequestUpdatesPage.htmlindex 598973b6d1..5fb7490a8b 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/updates/RequestUpdatesPage.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/updates/RequestUpdatesPage.html@@ -4,7 +4,7 @@<div class="summary"><em>Update #<span wicket:id="updateNo"></span></em>, pushed <span wicket:id="age"></span><span class="actions">- <a wicket:id="compare"><span class="fa fa-ext fa-file-diff"></span></a>+ <a wicket:id="changes" title="Changes of this update"></a></span><span wicket:id="reviews" class="reviews"><span wicket:id="reviews" class="review">diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/updates/RequestUpdatesPage.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/updates/RequestUpdatesPage.javaindex f30a72a197..0b248c241c 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/updates/RequestUpdatesPage.java+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/updates/RequestUpdatesPage.java@@ -17,7 +17,6 @@ import org.apache.wicket.markup.head.IHeaderResponse;import org.apache.wicket.markup.html.WebMarkupContainer;import org.apache.wicket.markup.html.basic.Label;import org.apache.wicket.markup.html.link.BookmarkablePageLink;-import org.apache.wicket.markup.html.link.Link;import org.apache.wicket.markup.html.list.ListItem;import org.apache.wicket.markup.html.list.ListView;import org.apache.wicket.model.AbstractReadOnlyModel;@@ -48,7 +47,7 @@ import com.pmease.gitplex.web.event.PullRequestChanged;import com.pmease.gitplex.web.model.UserModel;import com.pmease.gitplex.web.page.repository.file.RepoFilePage;import com.pmease.gitplex.web.page.repository.pullrequest.requestdetail.RequestDetailPage;-import com.pmease.gitplex.web.page.repository.pullrequest.requestdetail.compare.RequestComparePage;+import com.pmease.gitplex.web.page.repository.pullrequest.requestdetail.UpdateChangesLink;import com.pmease.gitplex.web.page.repository.pullrequest.requestlist.RequestListPage;@SuppressWarnings("serial")@@ -94,17 +93,9 @@ public class RequestUpdatesPage extends RequestDetailPage {List<PullRequestUpdate> updates = update.getRequest().getSortedUpdates();int updateNo = updates.indexOf(update) + 1;updateItem.add(new Label("updateNo", updateNo));- PageParameters params = RequestComparePage.paramsOf(- update.getRequest(), null, update.getBaseCommitHash(), update.getHeadCommitHash(), null);-updateItem.add(new Label("age", DateUtils.formatAge(update.getDate())));-- Link<Void> compareLink = new BookmarkablePageLink<Void>("compare", RequestComparePage.class, params);- if (updateNo == 1)- compareLink.add(AttributeAppender.append("title", "Compare with request base"));- else- compareLink.add(AttributeAppender.append("title", "Compare with previous update"));- updateItem.add(compareLink);++ updateItem.add(new UpdateChangesLink("changes", update));final WebMarkupContainer reviewsContainer = new WebMarkupContainer("reviews");reviewsContainer.setOutputMarkupId(true);