mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
Move advanced button to new column
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
"submit-button": {
|
||||
"label": "Set permissions"
|
||||
},
|
||||
"advanced-button": {
|
||||
"label": "Advanced"
|
||||
},
|
||||
"set-permissions-successful": "Permissions set successfully"
|
||||
},
|
||||
"advanced": {
|
||||
|
||||
@@ -148,6 +148,7 @@ class Permissions extends React.Component<Props> {
|
||||
</th>
|
||||
<th>{t("permission.type")}</th>
|
||||
<th />
|
||||
<th />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -91,12 +91,19 @@ class SinglePermission extends React.Component<Props, State> {
|
||||
|
||||
render() {
|
||||
const { role, permission, showAdvancedDialog } = this.state;
|
||||
const { availablePermissions, loading, namespace, repoName } = this.props;
|
||||
const {
|
||||
t,
|
||||
availablePermissions,
|
||||
loading,
|
||||
namespace,
|
||||
repoName
|
||||
} = this.props;
|
||||
const availableRoleNames = availablePermissions.availableRoles.map(
|
||||
r => r.name
|
||||
);
|
||||
const typeSelector =
|
||||
this.props.permission._links && this.props.permission._links.update ? (
|
||||
<>
|
||||
<td>
|
||||
<TypeSelector
|
||||
handleTypeChange={this.handleTypeChange}
|
||||
@@ -104,13 +111,19 @@ class SinglePermission extends React.Component<Props, State> {
|
||||
type={role}
|
||||
loading={loading}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<Button
|
||||
label={"..."}
|
||||
label={t("form.advanced-button.label")}
|
||||
action={this.handleDetailedPermissionsPressed}
|
||||
/>
|
||||
</td>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<td>{role}</td>
|
||||
<td />
|
||||
</>
|
||||
);
|
||||
|
||||
const advancedDialg = showAdvancedDialog ? (
|
||||
|
||||
Reference in New Issue
Block a user