move each flag to its own row inside a nested table.

This commit is contained in:
Sam 2013-06-26 17:01:39 +10:00
parent 1ec411c811
commit 827830d7ea
3 changed files with 31 additions and 9 deletions

View File

@ -22,7 +22,9 @@ Discourse.FlaggedPost = Discourse.Post.extend({
_this = this;
r = [];
_.each(this.post_actions, function(action) {
r.push(_this.userLookup[action.user_id]);
var user = _this.userLookup[action.user_id];
var flagType = Em.String.i18n('admin.flags.summary.action_type_' + action.post_action_type_id, {count: 1});
r.push({user: user, flagType: flagType, flaggedAt: action.created_at});
});
return r;
}.property(),

View File

@ -30,12 +30,24 @@
<td class='excerpt'>{{#if flag.topicHidden}}<i title='{{i18n topic_statuses.invisible.help}}' class='icon icon-eye-close'></i> {{/if}}<h3><a href='{{unbound flag.url}}'>{{flag.title}}</a></h3><br>{{{flag.excerpt}}}
</td>
<td class='flaggers'>{{#each flag.flaggers}}{{#linkTo 'adminUser' this}}{{avatar this imageSize="small"}} {{/linkTo}}{{/each}}
<p class='flag-summary'>{{flag.summary}}</p>
<td class='flaggers'>
<table>
{{#each flag.flaggers}}
<tr>
<td>
{{#linkTo 'adminUser' this.user}}{{avatar this.user imageSize="small"}} {{/linkTo}}
</td>
<td>
{{date this.flaggedAt}}
</td>
<td>
{{this.flagType}}
</td>
</tr>
{{/each}}
</table>
</td>
<td class='last-flagged'>{{date flag.lastFlagged}}</td>
</tr>
{{#each flag.messages}}

View File

@ -280,13 +280,21 @@ table {
th { text-align: left; }
.user { width: 40px; }
.excerpt {
width: 740px; padding: 0 10px 10px 0;
max-width: 740px;
width: 740px;
padding: 0 10px 10px 0;
word-wrap: break-word;
.icon,h3 { display: inline-block; }
}
.flaggers { padding: 0 10px; }
.last-flagged { padding: 0 10px; }
.flag-summary { font-size: 11px; }
.flaggers {
padding: 0 10px;
font-size: 11px;
td {
vertical-align: bottom;
padding: 5px 5px;
}
}
.action {
button { margin: 4px; }
text-align: right;