gb.labels = labels
gb.reviewers = reviewers
gb.voters = voters
-gb.mentions = mentions
\ No newline at end of file
+gb.mentions = mentions
+gb.canNotProposePatchset = can not propose a patchset
+gb.repositoryIsMirror = This repository is a read-only mirror.
+gb.repositoryIsFrozen = This repository is frozen.
+gb.repositoryDoesNotAcceptPatchsets = This repository does not accept patchsets.
+gb.serverDoesNotAcceptPatchsets = This server does not accept patchsets.
+gb.ticketIsClosed = This ticket is closed.
\ No newline at end of file
</wicket:fragment>\r
\r
\r
+<!-- CAN NOT PROPOSE FRAGMENT -->\r
+<wicket:fragment wicket:id="canNotProposeFragment">\r
+ <div class="featureWelcome">\r
+ <div class="row">\r
+ <div class="icon span2 hidden-phone"><i class="fa fa-ban"></i></div>\r
+ <div class="span9"> \r
+ <h1><wicket:message key="gb.canNotProposePatchset"></wicket:message></h1>\r
+ <div class="markdown">\r
+ <p><span wicket:id="reason"></span></p>\r
+ </div>\r
+ </div>\r
+ </div>\r
+ </div>\r
+</wicket:fragment>\r
+\r
+\r
<!-- PATCHSET FRAGMENT -->\r
<wicket:fragment wicket:id="patchsetFragment">\r
<div class="row" style="padding: 0px 0px 20px;">\r
changeIdFrag.add(new Label("gitWorkflowSteps", getProposeWorkflow("propose_git.md", repoUrl, ticket.number)).setEscapeModelStrings(false));\r
add(changeIdFrag);\r
} else {\r
- // ticket is resolved OR repository is rejecting new patchsets\r
- add(new Label("patchset").setVisible(false));\r
+ // explain why you can't propose a patchset\r
+ Fragment fragment = new Fragment("patchset", "canNotProposeFragment", this);\r
+ String reason = "";\r
+ if (ticket.isClosed()) {\r
+ reason = getString("gb.ticketIsClosed");\r
+ } else if (repository.isMirror) {\r
+ reason = getString("gb.repositoryIsMirror");\r
+ } else if (repository.isFrozen) {\r
+ reason = getString("gb.repositoryIsFrozen");\r
+ } else if (!repository.acceptNewPatchsets) {\r
+ reason = getString("gb.repositoryDoesNotAcceptPatchsets");\r
+ } else {\r
+ reason = getString("gb.serverDoesNotAcceptPatchsets");\r
+ }\r
+ fragment.add(new Label("reason", reason));\r
+ add(fragment);\r
}\r
} else {\r
// show current patchset\r