-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #572 from lukaskabc/lukaskabc/Enhancement-520
[Enhancement #520] Change record filtering
- Loading branch information
Showing
22 changed files
with
449 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import * as React from "react"; | ||
import { FormattedDate, FormattedTime } from "react-intl"; | ||
import { Badge } from "reactstrap"; | ||
import { useI18n } from "../hook/useI18n"; | ||
import DeleteRecord from "../../model/changetracking/DeleteRecord"; | ||
|
||
export interface DeleteRowProps { | ||
record: DeleteRecord; | ||
} | ||
|
||
export const DeleteRow: React.FC<DeleteRowProps> = (props) => { | ||
const { i18n } = useI18n(); | ||
const record = props.record; | ||
const created = new Date(Date.parse(record.timestamp)); | ||
return ( | ||
<tr> | ||
<td> | ||
<div> | ||
<FormattedDate value={created} /> <FormattedTime value={created} /> | ||
</div> | ||
<div className="italics last-edited-message ml-2"> | ||
{record.author.fullName} | ||
</div> | ||
</td> | ||
<td> | ||
<Badge color="danger">{i18n(record.typeLabel)}</Badge> | ||
</td> | ||
<td /> | ||
<td /> | ||
<td /> | ||
</tr> | ||
); | ||
}; | ||
|
||
export default DeleteRow; |
33 changes: 33 additions & 0 deletions
33
src/component/changetracking/VocabularyContentDeleteRow.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import * as React from "react"; | ||
import { FormattedDate, FormattedTime } from "react-intl"; | ||
import { Badge } from "reactstrap"; | ||
import { useI18n } from "../hook/useI18n"; | ||
import TermIriLink from "../term/TermIriLink"; | ||
import { DeleteRowProps } from "./DeleteRow"; | ||
|
||
export const VocabularyContentDeleteRow: React.FC<DeleteRowProps> = (props) => { | ||
const { i18n } = useI18n(); | ||
const record = props.record; | ||
const created = new Date(Date.parse(record.timestamp)); | ||
return ( | ||
<tr> | ||
<td> | ||
<div> | ||
<FormattedDate value={created} /> <FormattedTime value={created} /> | ||
</div> | ||
<div className="italics last-edited-message ml-2"> | ||
{record.author.fullName} | ||
</div> | ||
</td> | ||
<td> | ||
<TermIriLink iri={record.changedEntity.iri} shrinkFullIri={true} /> | ||
</td> | ||
<td> | ||
<Badge color="danger">{i18n(record.typeLabel)}</Badge> | ||
</td> | ||
<td></td> | ||
</tr> | ||
); | ||
}; | ||
|
||
export default VocabularyContentDeleteRow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.