* PATCHSET TAB\r
*/\r
if (currentPatchset == null) {\r
- // no patchset yet, show propose fragment\r
- String repoUrl = getRepositoryUrl(user, repository);\r
- Fragment changeIdFrag = new Fragment("patchset", "proposeFragment", this);\r
- changeIdFrag.add(new Label("proposeInstructions", MarkdownUtils.transformMarkdown(getString("gb.proposeInstructions"))).setEscapeModelStrings(false));\r
- changeIdFrag.add(new Label("ptWorkflow", MessageFormat.format(getString("gb.proposeWith"), "Barnum")));\r
- changeIdFrag.add(new Label("ptWorkflowSteps", getProposeWorkflow("propose_pt.md", repoUrl, ticket.number)).setEscapeModelStrings(false));\r
- changeIdFrag.add(new Label("gitWorkflow", MessageFormat.format(getString("gb.proposeWith"), "Git")));\r
- changeIdFrag.add(new Label("gitWorkflowSteps", getProposeWorkflow("propose_git.md", repoUrl, ticket.number)).setEscapeModelStrings(false));\r
- add(changeIdFrag);\r
+ // no patchset available\r
+ if (ticket.isOpen() && app().tickets().isAcceptingNewPatchsets(repository)) {\r
+ // ticket & repo will accept a proposal patchset\r
+ // show the instructions for proposing a patchset\r
+ String repoUrl = getRepositoryUrl(user, repository);\r
+ Fragment changeIdFrag = new Fragment("patchset", "proposeFragment", this);\r
+ changeIdFrag.add(new Label("proposeInstructions", MarkdownUtils.transformMarkdown(getString("gb.proposeInstructions"))).setEscapeModelStrings(false));\r
+ changeIdFrag.add(new Label("ptWorkflow", MessageFormat.format(getString("gb.proposeWith"), "Barnum")));\r
+ changeIdFrag.add(new Label("ptWorkflowSteps", getProposeWorkflow("propose_pt.md", repoUrl, ticket.number)).setEscapeModelStrings(false));\r
+ changeIdFrag.add(new Label("gitWorkflow", MessageFormat.format(getString("gb.proposeWith"), "Git")));\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
+ }\r
} else {\r
// show current patchset\r
Fragment patchsetFrag = new Fragment("patchset", "patchsetFragment", this);\r