From 827830d7ea6a772e51c93777a2bb978bb5adc2a7 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 26 Jun 2013 17:01:39 +1000 Subject: [PATCH] move each flag to its own row inside a nested table. --- .../javascripts/admin/models/flagged_post.js | 4 +++- .../admin/templates/flags.js.handlebars | 20 +++++++++++++++---- app/assets/stylesheets/admin/admin_base.scss | 16 +++++++++++---- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/admin/models/flagged_post.js b/app/assets/javascripts/admin/models/flagged_post.js index 69d7ebcad..ac3444570 100644 --- a/app/assets/javascripts/admin/models/flagged_post.js +++ b/app/assets/javascripts/admin/models/flagged_post.js @@ -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(), diff --git a/app/assets/javascripts/admin/templates/flags.js.handlebars b/app/assets/javascripts/admin/templates/flags.js.handlebars index 8bfa23306..d5096fc52 100644 --- a/app/assets/javascripts/admin/templates/flags.js.handlebars +++ b/app/assets/javascripts/admin/templates/flags.js.handlebars @@ -30,12 +30,24 @@ {{#if flag.topicHidden}} {{/if}}

{{flag.title}}


{{{flag.excerpt}}} - {{#each flag.flaggers}}{{#linkTo 'adminUser' this}}{{avatar this imageSize="small"}} {{/linkTo}}{{/each}} -

{{flag.summary}}

+ + + {{#each flag.flaggers}} + + + + + + {{/each}} +
+ {{#linkTo 'adminUser' this.user}}{{avatar this.user imageSize="small"}} {{/linkTo}} + + {{date this.flaggedAt}} + + {{this.flagType}} +
- {{date flag.lastFlagged}} - {{#each flag.messages}} diff --git a/app/assets/stylesheets/admin/admin_base.scss b/app/assets/stylesheets/admin/admin_base.scss index 5f7bef816..d11b87b9f 100644 --- a/app/assets/stylesheets/admin/admin_base.scss +++ b/app/assets/stylesheets/admin/admin_base.scss @@ -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;