| 1 |
import React, { Fragment } from 'react'; |
| 2 |
|
| 3 |
import Field from 'Modal/field'; |
| 4 |
import { __wpupg } from 'Shared/Translations'; |
| 5 |
|
| 6 |
const SectionOther = (props) => { |
| 7 |
return ( |
| 8 |
<Fragment> |
| 9 |
<Field |
| 10 |
value={ props.grid.metadata } |
| 11 |
onChange={ ( value ) => { |
| 12 |
props.onGridChange({ |
| 13 |
metadata: value, |
| 14 |
}); |
| 15 |
}} |
| 16 |
type="checkbox" |
| 17 |
label={ __wpupg( 'Output ItemList Metadata' ) } |
| 18 |
help={ __wpupg( 'Output ItemList Metadata for the grid items that appear on initial load. This allows some metadata types (recipes, movies, ...) to appear in the Google Carousel.' ) } |
| 19 |
/> |
| 20 |
{ |
| 21 |
props.grid.metadata |
| 22 |
&& |
| 23 |
<Fragment> |
| 24 |
<Field |
| 25 |
value={ props.grid.metadata_name } |
| 26 |
onChange={ ( value ) => { |
| 27 |
props.onGridChange({ |
| 28 |
metadata_name: value, |
| 29 |
}); |
| 30 |
}} |
| 31 |
type="text" |
| 32 |
label={ __wpupg( 'Metadata Name' ) } |
| 33 |
help={ __wpupg( 'Name to be used in the metadata for this ItemList. Can be empty.' ) } |
| 34 |
/> |
| 35 |
<Field |
| 36 |
value={ props.grid.metadata_description } |
| 37 |
onChange={ ( value ) => { |
| 38 |
props.onGridChange({ |
| 39 |
metadata_description: value, |
| 40 |
}); |
| 41 |
}} |
| 42 |
type="text" |
| 43 |
label={ __wpupg( 'Metadata Description' ) } |
| 44 |
help={ __wpupg( 'Description to be used in the metadata for this ItemList. Can be empty.' ) } |
| 45 |
/> |
| 46 |
</Fragment> |
| 47 |
} |
| 48 |
{ |
| 49 |
'posts' === props.grid.type |
| 50 |
&& |
| 51 |
<Fragment> |
| 52 |
<Field |
| 53 |
value={ props.grid.deeplinking } |
| 54 |
onChange={ ( value ) => { |
| 55 |
props.onGridChange({ |
| 56 |
deeplinking: value, |
| 57 |
}); |
| 58 |
}} |
| 59 |
type="checkbox" |
| 60 |
label={ __wpupg( 'Enable deeplinking' ) } |
| 61 |
help={ __wpupg( 'When deeplinking is enabled the URL will automatically get updated to reflect the position in the grid. Visitors will be able to copy that link to go back to it.' ) } |
| 62 |
/> |
| 63 |
{ |
| 64 |
props.grid.deeplinking |
| 65 |
&& |
| 66 |
<Field |
| 67 |
value={ props.grid.deeplinking_jump } |
| 68 |
onChange={ ( value ) => { |
| 69 |
props.onGridChange({ |
| 70 |
deeplinking_jump: value, |
| 71 |
}); |
| 72 |
}} |
| 73 |
type="checkbox" |
| 74 |
label={ __wpupg( 'Deeplink Jump' ) } |
| 75 |
help={ __wpupg( 'If someone follows a deeplink, jump down to the grid as well.' ) } |
| 76 |
/> |
| 77 |
} |
| 78 |
</Fragment> |
| 79 |
} |
| 80 |
<Field |
| 81 |
value={ props.grid.empty_message } |
| 82 |
onChange={ ( value ) => { |
| 83 |
props.onGridChange({ |
| 84 |
empty_message: value, |
| 85 |
}); |
| 86 |
}} |
| 87 |
type="tinymce" |
| 88 |
label={ __wpupg( 'Empty Message' ) } |
| 89 |
help={ __wpupg( 'Message to show when there are no items to display.' ) } |
| 90 |
/> |
| 91 |
</Fragment> |
| 92 |
); |
| 93 |
} |
| 94 |
export default SectionOther; |
| 95 |
|