1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-16 02:15:58 +00:00

Adding in a preview and share id to admin

This commit is contained in:
Scott Tolksdorf
2016-01-12 13:51:52 -05:00
parent df5260ce99
commit a11956e860
2 changed files with 37 additions and 1 deletions

View File

@@ -18,12 +18,18 @@ var HomebrewAdmin = React.createClass({
return <tr className={cx('brewRow', {'isEmpty' : brew.text == ""})} key={brew.sharedId}>
<td>{brew.editId}</td>
<td>{brew.shareId}</td>
<td>{Moment(brew.createdAt).fromNow()}</td>
<td>{Moment(brew.updatedAt).fromNow()}</td>
<td>{Moment(brew.lastViewed).fromNow()}</td>
<td>{brew.views}</td>
<td><a target="_blank" href={'/homebrew/share/' + brew.shareId}>view</a></td>
<td className='preview'>
<a target="_blank" href={'/homebrew/share/' + brew.shareId}>view</a>
<div className='content'>
{brew.text.slice(0, 500)}
</div>
</td>
<td><a href={'/homebrew/remove/' + brew.editId +'?admin_key=' + this.props.admin_key}><i className='fa fa-trash' /></a></td>
</tr>
@@ -39,6 +45,7 @@ var HomebrewAdmin = React.createClass({
<thead>
<tr>
<th>Edit Id</th>
<th>Share Id</th>
<th>Created At</th>
<th>Last Updated</th>
<th>Last Viewed</th>