UX: Cleaning up staff counters on user profiles

This commit is contained in:
Kris 2017-12-12 10:40:16 -05:00
parent bb9281de39
commit 55c019f776
4 changed files with 15 additions and 21 deletions

View File

@ -5,27 +5,27 @@
{{#unless collapsedInfo}}
<div class='staff-counters'>
{{#if model.number_of_flags_given}}
<div><span class="helpful-flags">{{model.number_of_flags_given}}</span>&nbsp;{{i18n 'user.staff_counters.flags_given'}}</div>
<div><span class="helpful-flags">{{model.number_of_flags_given}}</span>{{i18n 'user.staff_counters.flags_given'}}</div>
{{/if}}
{{#if model.number_of_flagged_posts}}
<div>
{{#link-to 'user.flaggedPosts' model}}
<span class="flagged-posts">{{model.number_of_flagged_posts}}</span>&nbsp;{{i18n 'user.staff_counters.flagged_posts'}}
<span class="flagged-posts">{{model.number_of_flagged_posts}}</span>{{i18n 'user.staff_counters.flagged_posts'}}
{{/link-to}}
</div>
{{/if}}
{{#if model.number_of_deleted_posts}}
<div>
{{#link-to 'user.deletedPosts' model}}
<span class="deleted-posts">{{model.number_of_deleted_posts}}</span>&nbsp;{{i18n 'user.staff_counters.deleted_posts'}}
<span class="deleted-posts">{{model.number_of_deleted_posts}}</span>{{i18n 'user.staff_counters.deleted_posts'}}
{{/link-to}}
</div>
{{/if}}
{{#if model.number_of_suspensions}}
<div><span class="suspensions">{{model.number_of_suspensions}}</span>&nbsp;{{i18n 'user.staff_counters.suspensions'}}</div>
<div><span class="suspensions">{{model.number_of_suspensions}}</span>{{i18n 'user.staff_counters.suspensions'}}</div>
{{/if}}
{{#if model.warnings_received_count}}
<div><span class="warnings-received">{{model.warnings_received_count}}</span>&nbsp;{{i18n 'user.staff_counters.warnings_received'}}</div>
<div><span class="warnings-received">{{model.warnings_received_count}}</span>{{i18n 'user.staff_counters.warnings_received'}}</div>
{{/if}}
</div>
{{/unless}}

View File

@ -181,21 +181,21 @@
}
.staff-counters {
text-align: left;
background: $primary;
> div {
color: $secondary;
display: flex;
padding: 10px;
> div, > div a {
display: flex;
align-items: baseline;
flex: 0 1 auto;
margin: 0 10px 0 0;
display: inline-block;
padding: 5px 0;
&:first-of-type {
padding-left: 10px;
}
span {
padding: 1px 5px;
padding: 1px 6px;
border-radius: 10px;
margin-right: 5px;
}
}
}
a {
color: $secondary;

View File

@ -242,7 +242,6 @@
}
.staff-counters {
color: $secondary;
margin-bottom: 20px;
}

View File

@ -175,11 +175,6 @@
}
}
.staff-counters {
padding: 7px 0;
display: inline;
}
.user-field {
label {
width: auto;