mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
added trans for permissionRoles
This commit is contained in:
@@ -6,6 +6,19 @@
|
|||||||
"errorTitle": "Fehler",
|
"errorTitle": "Fehler",
|
||||||
"errorSubtitle": "Unbekannter Einstellungen Fehler"
|
"errorSubtitle": "Unbekannter Einstellungen Fehler"
|
||||||
},
|
},
|
||||||
|
"roles": {
|
||||||
|
"navLink": "Berechtigungsrollen",
|
||||||
|
"title": "Berechtigungsrollen",
|
||||||
|
"noPermissionRoles": "Keine Berechtigungsrollen gefunden.",
|
||||||
|
"createButton": "Berechtigungsrolle erstellen",
|
||||||
|
"form": {
|
||||||
|
"name": "Name",
|
||||||
|
"system": "System",
|
||||||
|
"permissions": "Berechtigungen",
|
||||||
|
"subtitle": "Berechtigungsrolle bearbeiten",
|
||||||
|
"submit": "Speichern"
|
||||||
|
}
|
||||||
|
},
|
||||||
"config-form": {
|
"config-form": {
|
||||||
"submit": "Speichern",
|
"submit": "Speichern",
|
||||||
"submit-success-notification": "Einstellungen wurden erfolgreich geändert!",
|
"submit-success-notification": "Einstellungen wurden erfolgreich geändert!",
|
||||||
|
|||||||
@@ -6,6 +6,19 @@
|
|||||||
"errorTitle": "Error",
|
"errorTitle": "Error",
|
||||||
"errorSubtitle": "Unknown Config Error"
|
"errorSubtitle": "Unknown Config Error"
|
||||||
},
|
},
|
||||||
|
"roles": {
|
||||||
|
"navLink": "Permission Roles",
|
||||||
|
"title": "Permission Roles",
|
||||||
|
"noPermissionRoles": "No permission roles found.",
|
||||||
|
"createButton": "Create Permission Role",
|
||||||
|
"form": {
|
||||||
|
"name": "Name",
|
||||||
|
"system": "System",
|
||||||
|
"permissions": "Permissions",
|
||||||
|
"subtitle": "Edit Permission Roles",
|
||||||
|
"submit": "Save"
|
||||||
|
}
|
||||||
|
},
|
||||||
"config-form": {
|
"config-form": {
|
||||||
"submit": "Submit",
|
"submit": "Submit",
|
||||||
"submit-success-notification": "Configuration changed successfully!",
|
"submit-success-notification": "Configuration changed successfully!",
|
||||||
|
|||||||
@@ -8,17 +8,15 @@ type Props = {
|
|||||||
roles: Role[]
|
roles: Role[]
|
||||||
};
|
};
|
||||||
|
|
||||||
class RoleTable extends React.Component<Props> {
|
class PermissionRoleTable extends React.Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
const { roles, t } = this.props;
|
const { roles, t } = this.props;
|
||||||
return (
|
return (
|
||||||
<table className="card-table table is-hoverable is-fullwidth">
|
<table className="card-table table is-hoverable is-fullwidth">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th className="is-hidden-mobile">{t("user.name")}</th>
|
<th>{t("role.form.name")}</th>
|
||||||
<th>{t("user.displayName")}</th>
|
<th>{t("role.form.permissions")}</th>
|
||||||
<th>{t("user.mail")}</th>
|
|
||||||
<th className="is-hidden-mobile">{t("user.active")}</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -31,4 +29,4 @@ class RoleTable extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default translate("config")(RoleTable);
|
export default translate("config")(PermissionRoleTable);
|
||||||
@@ -68,7 +68,7 @@ class Config extends React.Component<Props> {
|
|||||||
/>
|
/>
|
||||||
<NavLink
|
<NavLink
|
||||||
to={`${url}/roles`}
|
to={`${url}/roles`}
|
||||||
label={t("config.roles.navLink")}
|
label={t("roles.navLink")}
|
||||||
/>
|
/>
|
||||||
<ExtensionPoint
|
<ExtensionPoint
|
||||||
name="config.navigation"
|
name="config.navigation"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
urls,
|
urls,
|
||||||
CreateButton
|
CreateButton
|
||||||
} from "@scm-manager/ui-components";
|
} from "@scm-manager/ui-components";
|
||||||
import RoleTable from "../components/table/RoleTable";
|
import PermissionRoleTable from "../components/table/PermissionRoleTable";
|
||||||
import { getRolesLink } from "../../modules/indexResource";
|
import { getRolesLink } from "../../modules/indexResource";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -60,7 +60,7 @@ class GlobalPermissionRoles extends React.Component<Props> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Title title={t("config.roles.title")} />
|
<Title title={t("roles.title")} />
|
||||||
{this.renderPermissionsTable()}
|
{this.renderPermissionsTable()}
|
||||||
{this.renderCreateButton()}
|
{this.renderCreateButton()}
|
||||||
</div>
|
</div>
|
||||||
@@ -72,7 +72,7 @@ class GlobalPermissionRoles extends React.Component<Props> {
|
|||||||
if (roles && roles.length > 0) {
|
if (roles && roles.length > 0) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<RoleTable roles={roles} />
|
<PermissionRoleTable roles={roles} />
|
||||||
<LinkPaginator
|
<LinkPaginator
|
||||||
collection={list}
|
collection={list}
|
||||||
page={page}
|
page={page}
|
||||||
@@ -81,14 +81,14 @@ class GlobalPermissionRoles extends React.Component<Props> {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return <Notification type="info">{t("config.roles.noPermissionRoles")}</Notification>;
|
return <Notification type="info">{t("roles.noPermissionRoles")}</Notification>;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderCreateButton() {
|
renderCreateButton() {
|
||||||
const { canAddRoles, t } = this.props;
|
const { canAddRoles, t } = this.props;
|
||||||
if (canAddRoles) {
|
if (canAddRoles) {
|
||||||
return (
|
return (
|
||||||
<CreateButton label={t("config.permissions.createButton")} link="/create" />
|
<CreateButton label={t("roles.createButton")} link="/create" />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user