102
'trailer': (cell) => {
if (cell.big_poster != '') {
return <i className='fa fa-check'/>
} else return <i className='fa fa-times'/>
}
}
return (
<div>
<div className="content-section implementation">
<DataTable value={this.state.filmList} emptyMessage="Нет записей" scrollable={true} paginator={true}
scrollHeight="400px"
rows={5} header={header} footer={footer}
selectionMode="single" selection={this.state.selectedCar} onSelectionChange={(e) => {
this.setState({selectedCar: e.data});
}}
onRowSelect={this.onFilmSelect}>
<Column field="name" header="Название" filter={true} sortable={true} style={{width: '250px'}}/>
<Column field="description" header="Описание" style={{width: '300px'}}/>
<Column field="big_poster" body={dataFormat.big_poster} header="Большой постер"
style={{width: '150px', textAlign: 'center'}}/>
<Column field="small_poster" body={dataFormat.small_poster} header="Маленький постер"
style={{width: '150px', textAlign: 'center'}}/>
<Column field="trailer" body={dataFormat.trailer} header="Трейлер"
style={{width: '150px', textAlign: 'center'}}/>
<Column field="director" header="Режиссёр" style={{width: '200px'}}/>
<Column field="stars" header="Актёры" style={{width: '300px'}}/>
<Column field="producers" header="Продюссеры" style={{width: '250px'}}/>
<Column field="film_length" header="Продолжительность"
style={{width: '200px', textAlign: 'center'}}/>
<Column field="age" header="Возраст" style={{width: '100px', textAlign: 'center'}}/>
<Column field="genre" header="Жанр" style={{width: '150px', textAlign: 'center'}}/>
<Column field="country" header="Страна" style={{width: '100px', textAlign: 'center'}}/>
<Column field="premier" header="Премьера" style={{width: '250px'}}/>
</DataTable>
<Dialog visible={this.state.displayFilmDialog} header="Подробно о фильме" modal={true}
footer={dialogFooter} width='50%'
onHide={() => this.setState({displayFilmDialog: false})}>
{this.state.film && <div className="ui-grid ui-grid-responsive ui-fluid">
<div className="ui-grid-row">
<div className="ui-grid-col-4" style={{padding: '4px 10px'}}><label
htmlFor="name">Название</label></div>
<div className="ui-grid-col-8" style={{padding: '4px 10px'}}>
<InputText id="name" onChange={(e) => {
this.updateFilmProperty('name', e.target.value)
}} value={this.state.film.name}/>
</div>
</div>
<div className="ui-grid-row">
<div className="ui-grid-col-4" style={{padding: '4px 10px'}}><label
htmlFor="description">Описание</label></div>
<div className="ui-grid-col-8" style={{padding: '4px 10px'}}>
<InputTextarea rows={5} cols={30} autoResize={true} id="description"
onChange={(e) => {
this.updateFilmProperty('description', e.target.value)
}} value={this.state.film.description}/>
</div>
</div>
<div className="ui-grid-row">
<div className="ui-grid-col-4" style={{padding: '4px 10px'}}><label
htmlFor="big_poster">Большой постер (url)</label></div>
<div className="ui-grid-col-8" style={{padding: '4px 10px'}}>
<InputText id="site" onChange={(e) => {