meraproject/content/modulebz/js/module/blocks/NewAnnotationList.js

53 lines
1.2 KiB
JavaScript
Raw Normal View History

var NewsAnnotationList;
export default window.NewsAnnotationList = NewsAnnotationList = class NewsAnnotationList extends React.Component {
constructor(props) {
var data, i, j, len, ref;
super(props);
data = [];
ref = this.props.data;
for (j = 0, len = ref.length; j < len; j++) {
i = ref[j];
i.text = i.annotation;
i.ratio = '2-3';
i.column = 'c-25';
data.push(i);
}
this.state = {
data: data
};
}
render() {
var i;
if (this.state.data.length > 0) {
return React.createElement("div", null, React.createElement(Title, {
title: "НОВОСТИ",
more: "/news/",
more_text: "Смотреть все новости"
}), React.createElement("div", {
className: "dashes"
}, function () {
var j, len, ref, results;
ref = this.state.data;
results = [];
for (j = 0, len = ref.length; j < len; j++) {
i = ref[j];
results.push(React.createElement(NewsAnnotationDash, {
data: i
}));
}
return results;
}.call(this)));
} else {
return null;
}
}
};
//# sourceMappingURL=NewAnnotationList.js.map