mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Display plugin source in ctb attributerow
This commit is contained in:
parent
b260ebd9d7
commit
8d74849d9c
@ -67,7 +67,18 @@ class AttributeRow extends React.Component { // eslint-disable-line react/prefer
|
||||
render() {
|
||||
const relationType = this.props.row.params.type ?
|
||||
<FormattedMessage id={`content-type-builder.attribute.${this.props.row.params.type}`} />
|
||||
: <div><FormattedMessage id="content-type-builder.modelPage.attribute.relationWith" /> <span style={{ fontStyle: 'italic' }}>{capitalize(this.props.row.params.target)}</span></div>;
|
||||
: (
|
||||
<div>
|
||||
<FormattedMessage id="content-type-builder.modelPage.attribute.relationWith" />
|
||||
|
||||
<span style={{ fontStyle: 'italic' }}>
|
||||
{capitalize(this.props.row.params.target)}
|
||||
{this.props.row.params.pluginValue ? (
|
||||
`(Plugin: ${this.props.row.params.pluginValue})`
|
||||
) : ''}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
const relationStyle = !this.props.row.params.type ? styles.relation : '';
|
||||
const icons = [{ icoType: 'pencil', onClick: this.handleEdit }, { icoType: 'trash', onClick: () => this.setState({ showWarning: !this.state.showWarning }) }];
|
||||
|
@ -21,7 +21,7 @@ module.exports = {
|
||||
const pluginModels = Object.keys(strapi.plugins).reduce((acc, current) => {
|
||||
_.forEach(strapi.plugins[current].models, (model, name) => {
|
||||
acc.push({
|
||||
icon: 'fa-diamond',
|
||||
icon: 'fa-cube',
|
||||
name: _.get(model, 'info.name', 'model.name.missing'),
|
||||
description: _.get(model, 'info.description', 'model.description.missing'),
|
||||
fields: _.keys(model.attributes).length,
|
||||
@ -39,7 +39,7 @@ module.exports = {
|
||||
name = _.toLower(name);
|
||||
|
||||
const model = source ? _.get(strapi.plugins, [source, 'models', name]) : _.get(strapi.models, name);
|
||||
|
||||
|
||||
// const model = _.get(strapi.models, name);
|
||||
|
||||
const attributes = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user