mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 09:25:46 +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() {
|
render() {
|
||||||
const relationType = this.props.row.params.type ?
|
const relationType = this.props.row.params.type ?
|
||||||
<FormattedMessage id={`content-type-builder.attribute.${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 relationStyle = !this.props.row.params.type ? styles.relation : '';
|
||||||
const icons = [{ icoType: 'pencil', onClick: this.handleEdit }, { icoType: 'trash', onClick: () => this.setState({ showWarning: !this.state.showWarning }) }];
|
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) => {
|
const pluginModels = Object.keys(strapi.plugins).reduce((acc, current) => {
|
||||||
_.forEach(strapi.plugins[current].models, (model, name) => {
|
_.forEach(strapi.plugins[current].models, (model, name) => {
|
||||||
acc.push({
|
acc.push({
|
||||||
icon: 'fa-diamond',
|
icon: 'fa-cube',
|
||||||
name: _.get(model, 'info.name', 'model.name.missing'),
|
name: _.get(model, 'info.name', 'model.name.missing'),
|
||||||
description: _.get(model, 'info.description', 'model.description.missing'),
|
description: _.get(model, 'info.description', 'model.description.missing'),
|
||||||
fields: _.keys(model.attributes).length,
|
fields: _.keys(model.attributes).length,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user