-
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.
[Enhancement #519] Recent term history in vocabulary activity tab
Displaying recent term changes in vocabulary detail in activity tab.
- Loading branch information
Showing
8 changed files
with
202 additions
and
17 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
35 changes: 35 additions & 0 deletions
35
src/component/changetracking/VocabularyContentPersistRow.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,35 @@ | ||
import * as React from "react"; | ||
import { FormattedDate, FormattedTime } from "react-intl"; | ||
import { Badge } from "reactstrap"; | ||
import { useI18n } from "../hook/useI18n"; | ||
import { PersistRowProps } from "./PersistRow"; | ||
import TermIriLink from "../term/TermIriLink"; | ||
|
||
export const VocabularyContentPersistRow: React.FC<PersistRowProps> = ( | ||
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} /> | ||
</td> | ||
<td> | ||
<Badge color="dark">{i18n(record.typeLabel)}</Badge> | ||
</td> | ||
<td /> | ||
</tr> | ||
); | ||
}; | ||
|
||
export default VocabularyContentPersistRow; |
36 changes: 36 additions & 0 deletions
36
src/component/changetracking/VocabularyContentUpdateRow.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,36 @@ | ||
import * as React from "react"; | ||
import { FormattedDate, FormattedTime } from "react-intl"; | ||
import AssetLabel from "../misc/AssetLabel"; | ||
import { Badge } from "reactstrap"; | ||
import { useI18n } from "../hook/useI18n"; | ||
import { UpdateRowProps } from "./UpdateRow"; | ||
import TermIriLink from "../term/TermIriLink"; | ||
|
||
export const VocabularyContentUpdateRow: React.FC<UpdateRowProps> = (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} /> | ||
</td> | ||
<td> | ||
<Badge color="secondary">{i18n(record.typeLabel)}</Badge> | ||
</td> | ||
<td> | ||
<AssetLabel iri={record.changedAttribute.iri} /> | ||
</td> | ||
</tr> | ||
); | ||
}; | ||
|
||
export default VocabularyContentUpdateRow; |
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