-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide planning details widget from the extension (#2078)
- Loading branch information
1 parent
a480add
commit 1abfedf
Showing
9 changed files
with
192 additions
and
136 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# TAG: AUTHORING-ANGULAR | ||
|
||
AUTHORING-ANGULAR tag is meant to mark code that has to be removed together with angular based authoring component when time comes. |
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
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 {IArticleSideWidgetComponentType} from 'superdesk-api'; | ||
import {superdesk} from './superdesk'; | ||
import {extensionBridge} from './extension_bridge'; | ||
|
||
const {AuthoringWidgetLayout, AuthoringWidgetHeading} = superdesk.components; | ||
const {gettext} = superdesk.localization; | ||
|
||
export const PLANNING_DETAILS_WIDGET_ID = 'planning_details'; | ||
export const PLANNING_DETAILS_WIDGET_LABEL = gettext('Planning Details'); | ||
|
||
export class PlanningDetailsWidget extends React.PureComponent<IArticleSideWidgetComponentType> { | ||
render() { | ||
const PlanningDetailsBody = extensionBridge.ui.components.PlanningDetailsWidget; | ||
|
||
if (this.props.article.assignment_id == null) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<AuthoringWidgetLayout | ||
header={( | ||
<AuthoringWidgetHeading | ||
widgetId={PLANNING_DETAILS_WIDGET_ID} | ||
widgetName={PLANNING_DETAILS_WIDGET_LABEL} | ||
editMode={false} | ||
/> | ||
)} | ||
body={( | ||
<PlanningDetailsBody item={{assignment_id: this.props.article.assignment_id}} /> | ||
)} | ||
/> | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.