Display relationships on 3 cols and fix ID display

This commit is contained in:
Aurelsicoko 2017-09-19 13:56:51 +02:00
parent 019690d6d6
commit 3176a431ec
3 changed files with 8 additions and 8 deletions

View File

@ -14,7 +14,7 @@ class PluginHeader extends React.Component { // eslint-disable-line react/prefer
render() { render() {
return ( return (
<div className={`${styles.pluginHeader} row`}> <div className={`${styles.pluginHeader} row`}>
<div className="col-lg-6"> <div className="col-lg-7">
<PluginHeaderTitle <PluginHeaderTitle
title={this.props.title} title={this.props.title}
description={this.props.description} description={this.props.description}
@ -25,7 +25,7 @@ class PluginHeader extends React.Component { // eslint-disable-line react/prefer
actions={this.props.subActions || []} actions={this.props.subActions || []}
/> />
</div> </div>
<div className="col-lg-4 justify-content-end"> <div className="col-lg-3 justify-content-end">
<PluginHeaderActions <PluginHeaderActions
actions={this.props.actions || []} actions={this.props.actions || []}
/> />

View File

@ -26,13 +26,13 @@ class TableRow extends React.Component {
* @returns {*} * @returns {*}
*/ */
getDisplayedValue(type, value) { getDisplayedValue(type, value) {
switch (type) { switch (type.toLowerCase()) {
case 'string': case 'string':
return !isEmpty(value) ? value.toString() : '-'; return value && !isEmpty(value.toString()) ? value.toString() : '-';
case 'integer': case 'integer':
return !isEmpty(value) ? value.toString() : '-'; return value && !isEmpty(value.toString()) ? value.toString() : '-';
case 'boolean': case 'boolean':
return !isEmpty(value) ? value.toString() : '-'; return value && !isEmpty(value.toString()) ? value.toString() : '-';
default: default:
return '-'; return '-';
} }

View File

@ -154,7 +154,7 @@ export class Edit extends React.Component {
fullWidth={this.props.isRelationComponentNull} fullWidth={this.props.isRelationComponentNull}
/> />
<div className='row'> <div className='row'>
<div className={this.props.isRelationComponentNull ? `col-lg-12` : `col-lg-8`}> <div className={this.props.isRelationComponentNull ? `col-lg-12` : `col-lg-9`}>
<div className={styles.main_wrapper}> <div className={styles.main_wrapper}>
<EditForm <EditForm
record={this.props.record} record={this.props.record}
@ -167,7 +167,7 @@ export class Edit extends React.Component {
/> />
</div> </div>
</div> </div>
<div className={`col-lg-4 ${this.props.isRelationComponentNull ? 'hidden-xl-down' : ''}`}> <div className={`col-lg-3 ${this.props.isRelationComponentNull ? 'hidden-xl-down' : ''}`}>
<div className={styles.sub_wrapper}> <div className={styles.sub_wrapper}>
<EditFormRelations <EditFormRelations
currentModelName={this.props.currentModelName} currentModelName={this.props.currentModelName}