Cleaning up secondary stats on user profile

This commit is contained in:
Kris 2018-04-09 14:02:43 -04:00
parent d19bbfc7f8
commit affb935760
4 changed files with 32 additions and 43 deletions

View File

@ -151,23 +151,23 @@
<div class='secondary'> <div class='secondary'>
<dl> <dl>
{{#if model.created_at}} {{#if model.created_at}}
<dt>{{i18n 'user.created'}}</dt><dd>{{bound-date model.created_at}}</dd> <div><dt>{{i18n 'user.created'}}</dt><dd>{{bound-date model.created_at}}</dd></div>
{{/if}} {{/if}}
{{#if model.last_posted_at}} {{#if model.last_posted_at}}
<dt>{{i18n 'user.last_posted'}}</dt><dd>{{bound-date model.last_posted_at}}</dd> <div><dt>{{i18n 'user.last_posted'}}</dt><dd>{{bound-date model.last_posted_at}}</dd></div>
{{/if}} {{/if}}
{{#if model.last_seen_at}} {{#if model.last_seen_at}}
<dt>{{i18n 'user.last_seen'}}</dt><dd>{{bound-date model.last_seen_at}}</dd> <div><dt>{{i18n 'user.last_seen'}}</dt><dd>{{bound-date model.last_seen_at}}</dd></div>
{{/if}} {{/if}}
<dt>{{i18n 'views'}}</dt><dd>{{model.profile_view_count}}</dd> <div><dt>{{i18n 'views'}}</dt><dd>{{model.profile_view_count}}</dd></div>
{{#if model.invited_by}} {{#if model.invited_by}}
<dt class="invited-by">{{i18n 'user.invited_by'}}</dt><dd class="invited-by">{{#link-to 'user' model.invited_by}}{{model.invited_by.username}}{{/link-to}}</dd> <div><dt class="invited-by">{{i18n 'user.invited_by'}}</dt><dd class="invited-by">{{#link-to 'user' model.invited_by}}{{model.invited_by.username}}{{/link-to}}</dd></div>
{{/if}} {{/if}}
{{#if model.trust_level}} {{#if model.trust_level}}
<dt class="trust-level">{{i18n 'user.trust_level'}}</dt><dd class="trust-level">{{model.trustLevel.name}}</dd> <div><dt class="trust-level">{{i18n 'user.trust_level'}}</dt><dd class="trust-level">{{model.trustLevel.name}}</dd></div>
{{/if}} {{/if}}
{{#if canCheckEmails}} {{#if canCheckEmails}}
<dt>{{i18n 'user.email.title'}}</dt> <div><dt>{{i18n 'user.email.title'}}</dt>
<dd title={{model.email}}> <dd title={{model.email}}>
{{#if model.email}} {{#if model.email}}
{{model.email}} {{model.email}}
@ -175,10 +175,11 @@
{{d-button action="checkEmail" actionParam=model icon="envelope-o" label="admin.users.check_email.text" class="btn-primary"}} {{d-button action="checkEmail" actionParam=model icon="envelope-o" label="admin.users.check_email.text" class="btn-primary"}}
{{/if}} {{/if}}
</dd> </dd>
</div>
{{/if}} {{/if}}
{{#if model.displayGroups}} {{#if model.displayGroups}}
<dt class="groups">{{i18n 'groups.title' count=model.displayGroups.length}}</dt> <div><dt class="groups">{{i18n 'groups.title' count=model.displayGroups.length}}</dt>
<dd class='groups'> <dd class='groups'>
{{#each model.displayGroups as |group|}} {{#each model.displayGroups as |group|}}
<span>{{#link-to 'group' group.name class="group-link"}}{{group.name}}{{/link-to}}</span> <span>{{#link-to 'group' group.name class="group-link"}}{{group.name}}{{/link-to}}</span>
@ -188,10 +189,11 @@
... ...
{{/link-to}} {{/link-to}}
</dd> </dd>
</div>
{{/if}} {{/if}}
{{#if canDeleteUser}} {{#if canDeleteUser}}
{{d-button action="adminDelete" icon="exclamation-triangle" label="user.admin_delete" class="btn-danger"}} <div>{{d-button action="adminDelete" icon="exclamation-triangle" label="user.admin_delete" class="btn-danger"}}</div>
{{/if}} {{/if}}
</dl> </dl>
{{plugin-outlet name="user-profile-secondary" args=(hash model=model)}} {{plugin-outlet name="user-profile-secondary" args=(hash model=model)}}

View File

@ -27,17 +27,33 @@
width: 100%; width: 100%;
.secondary { .secondary {
background: $secondary;
border-top: 1px solid $primary-low;
border-bottom: 1px solid $primary-low;
.btn { .btn {
padding: 3px 12px; padding: 4px 12px;
} }
dl { dl {
margin: 0; margin: 0;
padding: 5px 10px;
div {
display: inline-flex;
align-items: baseline;
margin-right: 15px;
margin: 4px 0;
}
}
dt, dd {
display: inline-flex;
align-items: center;
} }
dd { dd {
padding: 0; padding: 0;
margin: 0 15px 0 0;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
color: $primary; color: $primary;
@ -54,7 +70,7 @@
dt { dt {
color: $secondary-medium; color: $secondary-medium;
margin: 0; margin-right: 5px;
display: inline-block; display: inline-block;
} }
} }

View File

@ -147,26 +147,6 @@
} }
} }
.secondary {
background: $secondary;
border-top: 1px solid $primary-low;
border-bottom: 1px solid $primary-low;
dl {
padding: 8px 10px;
}
dd {
display: inline;
margin: 0 10px 0 0;
}
dt {
margin: 0 5px 0 0;
padding: 0;
}
}
.details { .details {
padding: 0 0 4px 0; padding: 0 0 4px 0;
margin-top: -200px; margin-top: -200px;

View File

@ -77,19 +77,10 @@ margin-top: 10px;
} }
.secondary { .secondary {
background: $primary-low;
dl { dl {
display: flex; padding: 5px 0;
flex-wrap: wrap;
align-items: center;
padding: 10px;
} }
dd {
margin: 0 15px 0 5px;
}
} }
.details { .details {