2018-03-05 18:18:51 +00:00
|
|
|
import React, { Component } from react
|
|
|
|
|
|
|
|
class MyComponent extends Component {
|
|
|
|
render = () => {
|
|
|
|
return (
|
2014-09-16 01:57:34 +00:00
|
|
|
<div id="yield">
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className='centerContent'>
|
2017-10-14 19:55:50 +00:00
|
|
|
<br />
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Icon</th>
|
|
|
|
<th>Color</th>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
2014-05-17 18:57:03 +00:00
|
|
|
|
2018-03-04 02:25:42 +00:00
|
|
|
{ @metacodes.each do |metacode| }
|
2017-10-14 19:55:50 +00:00
|
|
|
<tr>
|
2018-03-04 02:25:42 +00:00
|
|
|
<td>{ metacode.name }</td>
|
2018-03-05 17:33:16 +00:00
|
|
|
<td className="iconURL">{ metacode.icon }</td>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ if metacode.color }
|
2018-03-05 17:33:16 +00:00
|
|
|
<td className="iconColor" style="background-color: { metacode.color }">
|
2018-03-04 02:25:42 +00:00
|
|
|
{ metacode.color }
|
2017-10-14 19:55:50 +00:00
|
|
|
</td>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ else }
|
2017-10-14 19:55:50 +00:00
|
|
|
<td></td>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ end }
|
|
|
|
<td>{ image_tag metacode.icon, width: 40 }</td>
|
|
|
|
<td>{ link_to 'Edit', edit_metacode_path(metacode) }</td>
|
2017-10-14 19:55:50 +00:00
|
|
|
</tr>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ end }
|
2017-10-14 19:55:50 +00:00
|
|
|
</table>
|
2014-09-16 01:57:34 +00:00
|
|
|
</div>
|
2015-09-22 14:27:34 +00:00
|
|
|
</div>
|
2018-03-05 18:18:51 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default MyComponent
|