aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js')
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js
index 6ce739b1ca4..bd538f0a2e0 100644
--- a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js
+++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import { Link } from 'react-router';
import difference from 'lodash/difference';
import Backbone from 'backbone';
import { PermissionTemplateType, CallbackType } from '../propTypes';
@@ -31,7 +32,12 @@ export default class ActionsCell extends React.Component {
static propTypes = {
permissionTemplate: PermissionTemplateType.isRequired,
topQualifiers: React.PropTypes.array.isRequired,
- refresh: CallbackType
+ refresh: CallbackType,
+ fromDetails: React.PropTypes.bool
+ };
+
+ static defaultProps = {
+ fromDetails: false
};
static contextTypes = {
@@ -138,12 +144,21 @@ export default class ActionsCell extends React.Component {
<button className="dropdown-toggle" data-toggle="dropdown">
{translate('actions')}
{' '}
- <i className="icon-dropdown"></i>
+ <i className="icon-dropdown"/>
</button>
<ul className="dropdown-menu dropdown-menu-right">
{this.renderSetDefaultsControl()}
+ {!this.props.fromDetails && (
+ <li>
+ <Link to={{ pathname: '/', query: { id: t.id } }}>
+ {this.renderDropdownIcon(<i className="icon-edit"/>)}
+ Edit Permissions
+ </Link>
+ </li>
+ )}
+
<li>
<a href="#"
className="js-update"