2019-08-23 09:09:23 -04:00
|
|
|
import React, { Fragment } from 'react';
|
2019-08-14 14:33:26 -04:00
|
|
|
|
2019-08-14 16:54:00 -04:00
|
|
|
import withCopyEdit from '../data-container';
|
2019-08-23 12:35:17 -04:00
|
|
|
import MultiDataEntry from '../data-components/multi-data-entry';
|
|
|
|
import NumericDataEntry from '../data-components/numeric-data-entry';
|
|
|
|
import SelectDataEntry from '../data-components/select-data-entry';
|
|
|
|
import TextboxDataEntry from '../data-components/textbox-data-entry';
|
|
|
|
import YearDataEntry from '../data-components/year-data-entry';
|
2019-08-14 14:33:26 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Age view/edit section
|
|
|
|
*/
|
|
|
|
const AgeView = (props) => (
|
2019-08-23 09:09:23 -04:00
|
|
|
<Fragment>
|
2019-08-23 12:35:17 -04:00
|
|
|
<YearDataEntry
|
|
|
|
year={props.building.date_year}
|
|
|
|
upper={props.building.date_upper}
|
|
|
|
lower={props.building.date_lower}
|
|
|
|
mode={props.mode}
|
2019-10-02 17:35:57 -04:00
|
|
|
copy={props.copy}
|
2019-10-16 16:13:50 -04:00
|
|
|
onChange={props.onUpdate}
|
2019-08-14 16:54:56 -04:00
|
|
|
/>
|
2019-08-23 12:35:17 -04:00
|
|
|
<NumericDataEntry
|
2019-08-14 16:54:56 -04:00
|
|
|
title="Facade year"
|
|
|
|
slug="facade_year"
|
|
|
|
value={props.building.facade_year}
|
2019-08-23 12:35:17 -04:00
|
|
|
mode={props.mode}
|
2019-08-14 16:54:56 -04:00
|
|
|
copy={props.copy}
|
2019-10-16 16:13:50 -04:00
|
|
|
onChange={props.onUpdate}
|
2019-08-23 12:35:17 -04:00
|
|
|
step={1}
|
2019-08-14 16:54:56 -04:00
|
|
|
tooltip="Best estimate"
|
|
|
|
/>
|
2019-08-23 12:35:17 -04:00
|
|
|
<SelectDataEntry
|
2019-08-14 16:54:56 -04:00
|
|
|
title="Source of information"
|
|
|
|
slug="date_source"
|
|
|
|
value={props.building.date_source}
|
2019-08-23 12:35:17 -04:00
|
|
|
mode={props.mode}
|
2019-08-14 16:54:56 -04:00
|
|
|
copy={props.copy}
|
2019-10-17 10:32:41 -04:00
|
|
|
onChange={props.onUpdate}
|
2019-08-14 16:54:56 -04:00
|
|
|
tooltip="Source for the main start date"
|
2019-08-23 12:35:17 -04:00
|
|
|
placeholder=""
|
|
|
|
options={[
|
|
|
|
"Survey of London",
|
|
|
|
"Pevsner Guides",
|
|
|
|
"Local history publication",
|
|
|
|
"National Heritage List for England",
|
|
|
|
"Historical map",
|
|
|
|
"Archive research",
|
|
|
|
"Expert knowledge of building",
|
|
|
|
"Other book",
|
|
|
|
"Other website",
|
|
|
|
"Other"
|
|
|
|
]}
|
2019-08-14 16:54:56 -04:00
|
|
|
/>
|
2019-08-23 12:35:17 -04:00
|
|
|
<TextboxDataEntry
|
2019-08-14 16:54:56 -04:00
|
|
|
title="Source details"
|
|
|
|
slug="date_source_detail"
|
|
|
|
value={props.building.date_source_detail}
|
2019-08-23 12:35:17 -04:00
|
|
|
mode={props.mode}
|
2019-08-14 16:54:56 -04:00
|
|
|
copy={props.copy}
|
2019-10-17 12:00:01 -04:00
|
|
|
onChange={props.onUpdate}
|
2019-08-14 16:54:56 -04:00
|
|
|
tooltip="References for date source (max 500 characters)"
|
|
|
|
/>
|
2019-08-23 12:35:17 -04:00
|
|
|
<MultiDataEntry
|
2019-08-14 16:54:56 -04:00
|
|
|
title="Text and Image Links"
|
|
|
|
slug="date_link"
|
|
|
|
value={props.building.date_link}
|
2019-08-23 12:35:17 -04:00
|
|
|
mode={props.mode}
|
2019-08-14 16:54:56 -04:00
|
|
|
copy={props.copy}
|
2019-08-23 12:46:22 -04:00
|
|
|
onChange={props.onUpdate}
|
2019-08-14 16:54:56 -04:00
|
|
|
tooltip="URL for age and date reference"
|
2019-08-23 12:35:17 -04:00
|
|
|
placeholder="https://..."
|
2019-08-14 16:54:56 -04:00
|
|
|
/>
|
2019-08-23 09:09:23 -04:00
|
|
|
</Fragment>
|
2019-08-14 14:33:26 -04:00
|
|
|
)
|
|
|
|
const AgeContainer = withCopyEdit(AgeView);
|
|
|
|
|
|
|
|
export default AgeContainer;
|