]> source.dussan.org Git - gitblit.git/commitdiff
Do not show patchset details on closed tickets
authorJames Moger <james.moger@gitblit.com>
Wed, 16 Apr 2014 02:54:30 +0000 (22:54 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 16 Apr 2014 02:54:30 +0000 (22:54 -0400)
src/main/java/com/gitblit/wicket/pages/TicketPage.html
src/main/java/com/gitblit/wicket/pages/TicketPage.java

index a2f105d3f75c441e3acae906d8c86a3202824a66..aa52d8faad318d897a15cd7e82ea357810a876ae 100644 (file)
@@ -316,9 +316,10 @@ pt push</pre>
 \r
 <!-- PATCHSET FRAGMENT -->\r
 <wicket:fragment wicket:id="patchsetFragment">\r
-       <div class="row" style="padding: 0px 0px 20px;">\r
+       <div class="row" style="padding: 0px;">\r
                <div class="span12 attribution-border">\r
-                       <div wicket:id="panel"></div>           \r
+                       <div wicket:id="mergePanel" style="margin-bottom: 10px;"></div>\r
+                       <div wicket:id="panel"></div>\r
                </div>\r
        </div>\r
        \r
@@ -351,9 +352,8 @@ pt push</pre>
 \r
 <!-- COLLAPSIBLE PATCHSET (temp) -->\r
 <wicket:fragment wicket:id="collapsiblePatchsetFragment">\r
-<div wicket:id="mergePanel" style="margin-bottom: 10px;"></div>\r
 <div class="accordion" id="accordionPatchset" style="clear:both;margin: 0px;">\r
-<div class="patch-group">\r
+<div class="patch-group" style="margin-bottom: 20px;">\r
        <div class="accordion-heading">\r
                <div class="attribution-patch-pullright">       \r
                        <div style="padding-bottom: 2px;"> \r
index c8626c29bedd34bf6abbb71bf84fd43c6fceb29e..659acad06e406a5aafdfb8ea4cdddd11e10a9ee0 100644 (file)
@@ -774,12 +774,19 @@ public class TicketPage extends TicketBasePage {
                        Fragment patchsetFrag = new Fragment("patchset", "patchsetFragment", this);\r
                        patchsetFrag.add(new Label("commitsInPatchset", MessageFormat.format(getString("gb.commitsInPatchsetN"), currentPatchset.number)));\r
 \r
-                       // current revision\r
-                       MarkupContainer panel = createPatchsetPanel("panel", repository, user);\r
-                       patchsetFrag.add(panel);\r
-                       addUserAttributions(patchsetFrag, currentRevision, avatarWidth);\r
-                       addUserAttributions(panel, currentRevision, 0);\r
-                       addDateAttributions(panel, currentRevision);\r
+                       patchsetFrag.add(createMergePanel(user, repository));\r
+\r
+                       if (ticket.isOpen()) {\r
+                               // current revision\r
+                               MarkupContainer panel = createPatchsetPanel("panel", repository, user);\r
+                               patchsetFrag.add(panel);\r
+                               addUserAttributions(patchsetFrag, currentRevision, avatarWidth);\r
+                               addUserAttributions(panel, currentRevision, 0);\r
+                               addDateAttributions(panel, currentRevision);\r
+                       } else {\r
+                               // current revision\r
+                               patchsetFrag.add(new Label("panel").setVisible(false));\r
+                       }\r
 \r
                        // commits\r
                        List<RevCommit> commits = JGitUtils.getRevLog(getRepository(), currentPatchset.base, currentPatchset.tip);\r
@@ -1213,7 +1220,6 @@ public class TicketPage extends TicketBasePage {
 \r
                addPtCheckoutInstructions(user, repository, panel);\r
                addGitCheckoutInstructions(user, repository, panel);\r
-               panel.add(createMergePanel(user, repository));\r
 \r
                return panel;\r
        }\r