mongorilla
Version:
Mongorilla is a simple, clean, and powerful NodeJS based content moderator for MongoDB.
41 lines (40 loc) • 1.83 kB
HTML
<section class="content">
<div class="row">
<% _(colsStats).each(function (stat) { %>
<% if (global.helpers.hasPermission(sessionUser, stat.collection.name, 'r')) { %>
<div class="col-md-6">
<div class="box">
<div class="box-header">
<h3 class="box-title"><%= stat.collection.humanName %></h3>
</div><!-- /.box-header -->
<div class="box-body">
<table class="table table-stripped">
<tr>
<th style="width: 10px">#</th>
<th>Title</a></th>
<th>Modified</th>
</tr>
<% _(stat.colLastCreated).each(function (obj, i) { %>
<tr>
<td style="width: 10px"><%= i %></td>
<td><a href="/edit/<%= stat.collection.name %>/<%= obj._id %>"><%= obj[stat.collection.toStringField] %></a></td>
<td>Updated <date><%= moment(obj[stat.collection.updatedField.key]).fromNow() %></date></td>
</tr>
<% }) %>
</table>
</div><!-- /.box-body -->
<div class="box-footer clearfix">
<ul class="pagination pagination-sm no-margin pull-right">
<li><a href="#">«</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">»</a></li>
</ul>
</div>
</div><!-- /.box -->
</div>
<% } %>
<% }) %>
</div>
</section>