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",
|
||||
"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": {
|
||||
"submit": "Speichern",
|
||||
"submit-success-notification": "Einstellungen wurden erfolgreich geändert!",
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
"errorTitle": "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": {
|
||||
"submit": "Submit",
|
||||
"submit-success-notification": "Configuration changed successfully!",
|
||||
|
||||
@@ -8,17 +8,15 @@ type Props = {
|
||||
roles: Role[]
|
||||
};
|
||||
|
||||
class RoleTable extends React.Component<Props> {
|
||||
class PermissionRoleTable extends React.Component<Props> {
|
||||
render() {
|
||||
const { roles, t } = this.props;
|
||||
return (
|
||||
<table className="card-table table is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="is-hidden-mobile">{t("user.name")}</th>
|
||||
<th>{t("user.displayName")}</th>
|
||||
<th>{t("user.mail")}</th>
|
||||
<th className="is-hidden-mobile">{t("user.active")}</th>
|
||||
<th>{t("role.form.name")}</th>
|
||||
<th>{t("role.form.permissions")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<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
|
||||
to={`${url}/roles`}
|
||||
label={t("config.roles.navLink")}
|
||||
label={t("roles.navLink")}
|
||||
/>
|
||||
<ExtensionPoint
|
||||
name="config.navigation"
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
urls,
|
||||
CreateButton
|
||||
} from "@scm-manager/ui-components";
|
||||
import RoleTable from "../components/table/RoleTable";
|
||||
import PermissionRoleTable from "../components/table/PermissionRoleTable";
|
||||
import { getRolesLink } from "../../modules/indexResource";
|
||||
|
||||
type Props = {
|
||||
@@ -60,7 +60,7 @@ class GlobalPermissionRoles extends React.Component<Props> {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Title title={t("config.roles.title")} />
|
||||
<Title title={t("roles.title")} />
|
||||
{this.renderPermissionsTable()}
|
||||
{this.renderCreateButton()}
|
||||
</div>
|
||||
@@ -72,7 +72,7 @@ class GlobalPermissionRoles extends React.Component<Props> {
|
||||
if (roles && roles.length > 0) {
|
||||
return (
|
||||
<>
|
||||
<RoleTable roles={roles} />
|
||||
<PermissionRoleTable roles={roles} />
|
||||
<LinkPaginator
|
||||
collection={list}
|
||||
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() {
|
||||
const { canAddRoles, t } = this.props;
|
||||
if (canAddRoles) {
|
||||
return (
|
||||
<CreateButton label={t("config.permissions.createButton")} link="/create" />
|
||||
<CreateButton label={t("roles.createButton")} link="/create" />
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user