From d3610b0ab57b8f8c0c092e93e077e10ff25e2dbe Mon Sep 17 00:00:00 2001 From: Jody Clements Date: Tue, 12 Jan 2016 09:46:37 -0500 Subject: [PATCH] Hides branch button if url missing admin=1 This adds the branch button to the interface, if the admin=1 parameter is present in the url. --- js/components/RepoDAG.react.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/components/RepoDAG.react.js b/js/components/RepoDAG.react.js index 87de711..c2884e7 100644 --- a/js/components/RepoDAG.react.js +++ b/js/components/RepoDAG.react.js @@ -344,6 +344,13 @@ var RepoDAGDisplay = React.createClass({ }, render: function() { + var admin = this.context.router.getCurrentQuery().admin; + + var branchButton = ''; + if (admin) { + branchButton = + } + return (

Version DAG (Nodes with thick borders are locked.)

@@ -353,7 +360,7 @@ var RepoDAGDisplay = React.createClass({ - + {branchButton}