new more descriptive map buttons

This commit is contained in:
Mateusz Konieczny 2023-02-09 22:45:03 +01:00
parent dc7ac176b1
commit 7d9580ae17
2 changed files with 29 additions and 8 deletions

View File

@ -121,9 +121,16 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
/> />
<button className={`map-switcher-inline ${props.mapColourScale == "community_local_significance_total" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}> {(props.mapColourScale == "community_local_significance_total") ?
{'Click here to switch map key to this info'} <button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
{'Displaying view of a community on a local building significance, click here to see community views on typologies'}
</button> </button>
:
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
{"Click here to see view of a community on a local building significance mapped"}
</button>
}
<hr /> <hr />
<UserOpinionEntry <UserOpinionEntry
slug='community_expected_planning_application' slug='community_expected_planning_application'
@ -135,9 +142,17 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
/> />
<button className={`map-switcher-inline ${props.mapColourScale == "community_expected_planning_application_total" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}> {(props.mapColourScale == "community_expected_planning_application_total") ?
{'Click here to switch map key to this info'} <button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
{'Displaying planning applications expected by community, click here to see community views on typologies'}
</button> </button>
:
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
{"Click here to see planning applications expected by community"}
</button>
}
</div> </div>
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Building use for community activities" collapsed={false} > <DataEntryGroup name="Building use for community activities" collapsed={false} >
@ -198,9 +213,6 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
/> />
<button className={`map-switcher-inline ${props.mapColourScale == "community_in_public_ownership" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToPublicOwnershipMapStyle}>
{'Click here to switch map key to this info'}
</button>
<Verification <Verification
slug="community_public_ownership" slug="community_public_ownership"
allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited} allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited}
@ -228,6 +240,15 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
user_verified_as={props.user_verified.community_public_ownership_sources} user_verified_as={props.user_verified.community_public_ownership_sources}
verified_count={props.building.verified.community_public_ownership_sources} verified_count={props.building.verified.community_public_ownership_sources}
/> />
{(props.mapColourScale == "community_in_public_ownership") ?
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
{'Mapped ownership type is displayed, click here to see community views on typologies'}
</button>
:
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToPublicOwnershipMapStyle}>
{"Click here to see ownership type mapped"}
</button>
}
</DataEntryGroup> </DataEntryGroup>
</> </>
}; };

View File

@ -125,7 +125,7 @@
border-radius: 4px; border-radius: 4px;
/*background: #FFC0CB;*/ /*background: #FFC0CB;*/
margin: 12px; margin: 12px;
min-width: 400px; width: 400px;
color: #343a40; color: #343a40;
} }
.map-switcher-inline.night { .map-switcher-inline.night {