use the child components
This commit is contained in:
parent
3987ce7d94
commit
4fa29948b6
2 changed files with 12 additions and 9 deletions
|
@ -35,9 +35,8 @@ resourceName=Resource Name
|
|||
nextPage=Next
|
||||
previousPage=Previous
|
||||
firstPage=First Page
|
||||
resourceSharedWith=Resource is shared with
|
||||
and=and
|
||||
otherUsers=other users
|
||||
resourceSharedWith=Resource is shared with {0}
|
||||
and= and {0} other users
|
||||
add=Add
|
||||
shareSuccess=Resource successfully shared.
|
||||
resourceAlreadyShared=Resource is already shared with this user.
|
||||
|
|
|
@ -98,12 +98,16 @@ export class ResourcesTable extends React.Component<ResourcesTableProps, Resourc
|
|||
public sharedWithUsersMessage(row: number): React.ReactNode {
|
||||
if (!this.hasPermissions(row)) return (<React.Fragment><Msg msgKey='resourceNotShared'/></React.Fragment>);
|
||||
|
||||
// TODO: Not using a parameterized message because I want to use <strong> tag. Need to figure out a good solution to this.
|
||||
if (this.numOthers(row) > 0) {
|
||||
return (<React.Fragment><Msg msgKey='resourceSharedWith'/> <strong>{this.firstUser(row)}</strong> <Msg msgKey='and'/> <strong>{this.numOthers(row)}</strong> <Msg msgKey='otherUsers'/>.</React.Fragment>)
|
||||
} else {
|
||||
return (<React.Fragment><Msg msgKey='resourceSharedWith'/> <strong>{this.firstUser(row)}</strong>.</React.Fragment>)
|
||||
}
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Msg msgKey='resourceSharedWith'>
|
||||
<strong>{this.firstUser(row)}</strong>
|
||||
</Msg>
|
||||
{this.numOthers(row) > 0 && <Msg msgKey='and'>
|
||||
<strong>{this.numOthers(row)}</strong>
|
||||
</Msg>}.
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
public render(): React.ReactNode {
|
||||
|
|
Loading…
Reference in a new issue