0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Rename .object-list to .user-list

No issue
References todo comment in [users.scss](ed5f5c7fe1/core/client/assets/sass/layouts/users.scss (L6-L7))

- Renames anything starting with `.object-list` to `.user-list`
- Adjusts tests to match
This commit is contained in:
Paul Adam Davis 2014-10-13 22:43:03 +01:00
parent 58429a603b
commit dea7de2db4
2 changed files with 37 additions and 40 deletions

View file

@ -3,21 +3,20 @@
// -------------------------------------------------- // --------------------------------------------------
// Slug: /ghost/settings/users/ // Slug: /ghost/settings/users/
// -------------------------------------------------- // --------------------------------------------------
// TODO: Rename everything. This is a layout, rather
// than a re-usable component.
.invited-users { .invited-users {
margin-bottom: 34px; margin-bottom: 34px;
} }
.object-list-title { .user-list-title {
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: normal;
color: $midbrown; color: $midbrown;
margin-bottom: 14px; margin-bottom: 14px;
} }
.object-list-item { .user-list-item {
@media (max-width: 500px) { @media (max-width: 500px) {
display: block; display: block;
@ -37,17 +36,21 @@
} }
a.object-list-item { a.user-list-item {
text-decoration: none; text-decoration: none;
// Hover states only for large viewports // Hover states only for large viewports
@media (min-width: 601px) { @media (min-width: 601px) {
&:hover { background: lighten($lightbrown, 5%); } &:hover {
&:last-of-type:hover { box-shadow: inset 0px -1px 0px $lightbrown; } background: lighten($lightbrown, 5%);
}
&:last-of-type:hover {
box-shadow: inset 0px -1px 0px $lightbrown;
}
} }
} }
.object-list-item-icon { .user-list-item-icon {
width: 35px; width: 35px;
height: 35px; height: 35px;
display: block; display: block;
@ -70,7 +73,7 @@ a.object-list-item {
} }
} }
.object-list-item-figure { .user-list-item-figure {
width: 35px; width: 35px;
height: 35px; height: 35px;
display: block; display: block;
@ -80,15 +83,15 @@ a.object-list-item {
background-position: center center; background-position: center center;
} }
.object-list-item-icon, .user-list-item-icon,
.object-list-item-figure { .user-list-item-figure {
@media (max-width: 500px) { @media (max-width: 500px) {
float: left; float: left;
margin-right: 15px; margin-right: 15px;
} }
} }
.object-list-item-body { .user-list-item-body {
flex: 1 1 auto; flex: 1 1 auto;
align-items: stretch; align-items: stretch;
padding-left: 15px; padding-left: 15px;
@ -112,16 +115,16 @@ a.object-list-item {
margin-top: 3px; margin-top: 3px;
} }
} //.object-list-item-body }//.user-list-item-body
.object-list-item-aside { .user-list-item-aside {
@media (max-width: 500px) { @media (max-width: 500px) {
float: left; float: left;
width: 100%; width: 100%;
margin: 12px 0 0 50px; margin: 12px 0 0 50px;
} }
.object-list-action:not(:first-of-type) { .user-list-action:not(:first-of-type) {
margin-left: 20px; margin-left: 20px;
@media (min-width: 501px) { @media (min-width: 501px) {
margin-left: 50px; margin-left: 50px;
@ -136,9 +139,9 @@ a.object-list-item {
.role-label + .role-label { .role-label + .role-label {
margin-left: 5px; margin-left: 5px;
} }
} // .object-list-item-aside }//.user-list-item-aside
.object-list-action { .user-list-action {
font-size: 11px; font-size: 11px;
text-transform: uppercase; text-transform: uppercase;
text-decoration: underline; text-decoration: underline;
@ -178,7 +181,7 @@ a.object-list-item {
background: $blue; background: $blue;
} }
} }//.role-label
// //
// User Actions // User Actions
@ -231,7 +234,7 @@ a.object-list-item {
width: 100%; width: 100%;
} }
} //.form-group }//.form-group
.button-add { .button-add {
width: 100%; width: 100%;
@ -240,4 +243,4 @@ a.object-list-item {
line-height: 16px; line-height: 16px;
} }
} //.invite-new-user }//.invite-new-user

View file

@ -1,9 +1,3 @@
<script>
$(document).ready(function() {
$('body').addClass('settings-view');
});
</script>
<header class="settings-view-header"> <header class="settings-view-header">
{{#link-to "settings" class="btn btn-default btn-back"}}Back{{/link-to}} {{#link-to "settings" class="btn btn-default btn-back"}}Back{{/link-to}}
<h2 class="page-title">Users</h2> <h2 class="page-title">Users</h2>
@ -15,15 +9,15 @@ $(document).ready(function() {
{{#view "settings/users/users-list-view" tagName="section" class="content settings-users" }} {{#view "settings/users/users-list-view" tagName="section" class="content settings-users" }}
{{#if invitedUsers}} {{#if invitedUsers}}
<section class="object-list invited-users"> <section class="user-list invited-users">
<h4 class="object-list-title">Invited users</h4> <h4 class="user-list-title">Invited users</h4>
{{#each invitedUsers itemController="settings/users/user"}} {{#each invitedUsers itemController="settings/users/user"}}
<div class="object-list-item"> <div class="user-list-item">
<span class="object-list-item-icon icon-mail">ic</span> <span class="user-list-item-icon icon-mail">ic</span>
<div class="object-list-item-body"> <div class="user-list-item-body">
<span class="name">{{email}}</span><br> <span class="name">{{email}}</span><br>
{{#if pending}} {{#if pending}}
<span class="red">Invitation not sent - please try again</span> <span class="red">Invitation not sent - please try again</span>
@ -31,9 +25,9 @@ $(document).ready(function() {
<span class="description">Invitation sent: {{created_at}}</span> <span class="description">Invitation sent: {{created_at}}</span>
{{/if}} {{/if}}
</div> </div>
<aside class="object-list-item-aside"> <aside class="user-list-item-aside">
<a class="object-list-action" href="#" {{action "revoke"}}>Revoke</a> <a class="user-list-action" href="#" {{action "revoke"}}>Revoke</a>
<a class="object-list-action" href="#" {{action "resend"}}>Resend</a> <a class="user-list-action" href="#" {{action "resend"}}>Resend</a>
</aside> </aside>
</div> </div>
{{/each}} {{/each}}
@ -42,24 +36,24 @@ $(document).ready(function() {
{{/if}} {{/if}}
<section class="object-list active-users"> <section class="user-list active-users">
<h4 class="object-list-title">Active users</h4> <h4 class="user-list-title">Active users</h4>
{{#each activeUsers itemController="settings/users/user"}} {{#each activeUsers itemController="settings/users/user"}}
{{#link-to 'settings.users.user' this class="object-list-item" }} {{#link-to 'settings.users.user' this class="user-list-item" }}
<span class="object-list-item-figure" {{bind-attr style=image}}> <span class="user-list-item-figure" {{bind-attr style=image}}>
<span class="hidden">Photo of {{unbound name}}</span> <span class="hidden">Photo of {{unbound name}}</span>
</span> </span>
<div class="object-list-item-body"> <div class="user-list-item-body">
<span class="name"> <span class="name">
{{name}} {{name}}
</span> </span>
<br> <br>
<span class="description">Last seen: {{unbound last_login}}</span> <span class="description">Last seen: {{unbound last_login}}</span>
</div> </div>
<aside class="object-list-item-aside"> <aside class="user-list-item-aside">
{{#unless isAuthor}} {{#unless isAuthor}}
{{#each roles}} {{#each roles}}
<span class="role-label {{unbound lowerCaseName}}">{{name}}</span> <span class="role-label {{unbound lowerCaseName}}">{{name}}</span>