summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-15 22:54:30 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-15 22:54:30 -0400
commita0d5c865f8e7161f73d5e4420e662e81f1640acd (patch)
tree26cf2ab494007cd5d756567e3ab8c69c34a5bde5 /src/main/java/com/gitblit
parentbd7db1070e07cf1777a0c0ee6e770625f8734fb6 (diff)
downloadgitblit-a0d5c865f8e7161f73d5e4420e662e81f1640acd.tar.gz
gitblit-a0d5c865f8e7161f73d5e4420e662e81f1640acd.zip
Do not show patchset details on closed tickets
Diffstat (limited to 'src/main/java/com/gitblit')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketPage.html8
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketPage.java20
2 files changed, 17 insertions, 11 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/TicketPage.html b/src/main/java/com/gitblit/wicket/pages/TicketPage.html
index a2f105d3..aa52d8fa 100644
--- a/src/main/java/com/gitblit/wicket/pages/TicketPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.html
@@ -316,9 +316,10 @@ pt push</pre>
<!-- PATCHSET FRAGMENT -->
<wicket:fragment wicket:id="patchsetFragment">
- <div class="row" style="padding: 0px 0px 20px;">
+ <div class="row" style="padding: 0px;">
<div class="span12 attribution-border">
- <div wicket:id="panel"></div>
+ <div wicket:id="mergePanel" style="margin-bottom: 10px;"></div>
+ <div wicket:id="panel"></div>
</div>
</div>
@@ -351,9 +352,8 @@ pt push</pre>
<!-- COLLAPSIBLE PATCHSET (temp) -->
<wicket:fragment wicket:id="collapsiblePatchsetFragment">
-<div wicket:id="mergePanel" style="margin-bottom: 10px;"></div>
<div class="accordion" id="accordionPatchset" style="clear:both;margin: 0px;">
-<div class="patch-group">
+<div class="patch-group" style="margin-bottom: 20px;">
<div class="accordion-heading">
<div class="attribution-patch-pullright">
<div style="padding-bottom: 2px;">
diff --git a/src/main/java/com/gitblit/wicket/pages/TicketPage.java b/src/main/java/com/gitblit/wicket/pages/TicketPage.java
index c8626c29..659acad0 100644
--- a/src/main/java/com/gitblit/wicket/pages/TicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.java
@@ -774,12 +774,19 @@ public class TicketPage extends TicketBasePage {
Fragment patchsetFrag = new Fragment("patchset", "patchsetFragment", this);
patchsetFrag.add(new Label("commitsInPatchset", MessageFormat.format(getString("gb.commitsInPatchsetN"), currentPatchset.number)));
- // current revision
- MarkupContainer panel = createPatchsetPanel("panel", repository, user);
- patchsetFrag.add(panel);
- addUserAttributions(patchsetFrag, currentRevision, avatarWidth);
- addUserAttributions(panel, currentRevision, 0);
- addDateAttributions(panel, currentRevision);
+ patchsetFrag.add(createMergePanel(user, repository));
+
+ if (ticket.isOpen()) {
+ // current revision
+ MarkupContainer panel = createPatchsetPanel("panel", repository, user);
+ patchsetFrag.add(panel);
+ addUserAttributions(patchsetFrag, currentRevision, avatarWidth);
+ addUserAttributions(panel, currentRevision, 0);
+ addDateAttributions(panel, currentRevision);
+ } else {
+ // current revision
+ patchsetFrag.add(new Label("panel").setVisible(false));
+ }
// commits
List<RevCommit> commits = JGitUtils.getRevLog(getRepository(), currentPatchset.base, currentPatchset.tip);
@@ -1213,7 +1220,6 @@ public class TicketPage extends TicketBasePage {
addPtCheckoutInstructions(user, repository, panel);
addGitCheckoutInstructions(user, repository, panel);
- panel.add(createMergePanel(user, repository));
return panel;
}