mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 02:23:45 +08:00
FEATURE: use glyphs instead of text in flag's dispositions
This commit is contained in:
parent
85570ddc77
commit
ec6ba68098
|
@ -27,7 +27,7 @@ Discourse.FlaggedPost = Discourse.Post.extend({
|
|||
flaggedAt: postAction.created_at,
|
||||
disposedBy: postAction.disposed_by_id ? self.userLookup[postAction.disposed_by_id] : null,
|
||||
disposedAt: postAction.disposed_at,
|
||||
disposition: postAction.disposition ? I18n.t('admin.flags.dispositions.' + postAction.disposition) : null,
|
||||
dispositionIcon: self.dispositionIcon(postAction.disposition),
|
||||
tookAction: postAction.staff_took_action
|
||||
});
|
||||
});
|
||||
|
@ -35,6 +35,17 @@ Discourse.FlaggedPost = Discourse.Post.extend({
|
|||
return flaggers;
|
||||
}.property(),
|
||||
|
||||
dispositionIcon: function (disposition) {
|
||||
if (!disposition) { return null; }
|
||||
var icon, title = I18n.t('admin.flags.dispositions.' + disposition);
|
||||
switch (disposition) {
|
||||
case "deferred": { icon = "fa-external-link"; break; }
|
||||
case "agreed": { icon = "fa-thumbs-o-up"; break; }
|
||||
case "disagreed": { icon = "fa-thumbs-o-down"; break; }
|
||||
}
|
||||
return "<i class='fa " + icon + "' title='" + title + "'></i>";
|
||||
},
|
||||
|
||||
conversations: function () {
|
||||
var self = this;
|
||||
var conversations = [];
|
||||
|
|
|
@ -56,10 +56,14 @@
|
|||
{{avatar user imageSize="small"}}
|
||||
{{/link-to}}
|
||||
</td>
|
||||
<td width="30%">
|
||||
<td width="40%">
|
||||
{{#link-to 'adminUser' user}}
|
||||
{{user.username}}
|
||||
{{/link-to}}
|
||||
<br />
|
||||
{{date flaggedAt}}
|
||||
</td>
|
||||
<td width="50%">
|
||||
<td width="40%">
|
||||
{{flagType}}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -78,13 +82,13 @@
|
|||
{{avatar disposedBy imageSize="small"}}
|
||||
{{/link-to}}
|
||||
</td>
|
||||
<td width="30%">
|
||||
<td width="40%">
|
||||
{{date disposedAt}}
|
||||
</td>
|
||||
<td width="50%">
|
||||
{{disposition}}
|
||||
<td width="40%">
|
||||
{{{dispositionIcon}}}
|
||||
{{#if tookAction}}
|
||||
<i class='fa fa-gavel'></i>
|
||||
<i class='fa fa-gavel' title='{{i18n admin.flags.took_action}}'></i>
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1480,6 +1480,7 @@ en:
|
|||
|
||||
flagged_by: "Flagged by"
|
||||
resolved_by: "Resolved by"
|
||||
took_action: "Took action"
|
||||
system: "System"
|
||||
error: "Something went wrong"
|
||||
reply_message: "Reply"
|
||||
|
|
Loading…
Reference in New Issue
Block a user