Commit 5fef54589d5a73223ed0c3e18d43b8d747091bf2
Exists in
spb-stable
and in
3 other branches
Merge pull request #6644 from tombruijn/list-item-name-spacing
.well-list item name spacing fix Follow up on #6643
Showing
10 changed files
with
48 additions
and
28 deletions
Show diff stats
app/assets/stylesheets/generic/lists.scss
| ... | ... | @@ -13,6 +13,12 @@ |
| 13 | 13 | border-bottom: 1px solid #eee; |
| 14 | 14 | border-bottom: 1px solid rgba(0, 0, 0, 0.05); |
| 15 | 15 | |
| 16 | + &:after { | |
| 17 | + content: " "; | |
| 18 | + display: table; | |
| 19 | + clear: both; | |
| 20 | + } | |
| 21 | + | |
| 16 | 22 | &.disabled { |
| 17 | 23 | color: #888; |
| 18 | 24 | } |
| ... | ... | @@ -46,6 +52,12 @@ |
| 46 | 52 | |
| 47 | 53 | .author { color: #999; } |
| 48 | 54 | |
| 55 | + .list-item-name { | |
| 56 | + float: left; | |
| 57 | + position: relative; | |
| 58 | + top: 3px; | |
| 59 | + } | |
| 60 | + | |
| 49 | 61 | p { |
| 50 | 62 | padding-top: 1px; |
| 51 | 63 | margin: 0; | ... | ... |
app/assets/stylesheets/sections/dashboard.scss
app/views/admin/groups/show.html.haml
| ... | ... | @@ -70,8 +70,9 @@ |
| 70 | 70 | - @group.users_groups.order('group_access DESC').each do |member| |
| 71 | 71 | - user = member.user |
| 72 | 72 | %li{class: dom_class(user)} |
| 73 | - %strong | |
| 74 | - = link_to user.name, admin_user_path(user) | |
| 73 | + .list-item-name | |
| 74 | + %strong | |
| 75 | + = link_to user.name, admin_user_path(user) | |
| 75 | 76 | %span.pull-right.light |
| 76 | 77 | = member.human_access |
| 77 | 78 | = link_to group_users_group_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do | ... | ... |
app/views/admin/hooks/index.html.haml
| ... | ... | @@ -28,8 +28,10 @@ |
| 28 | 28 | %ul.well-list |
| 29 | 29 | - @hooks.each do |hook| |
| 30 | 30 | %li |
| 31 | + .list-item-name | |
| 32 | + = link_to admin_hook_path(hook) do | |
| 33 | + %strong= hook.url | |
| 34 | + | |
| 31 | 35 | .pull-right |
| 32 | 36 | = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small" |
| 33 | 37 | = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-small" |
| 34 | - = link_to admin_hook_path(hook) do | |
| 35 | - %strong= hook.url | ... | ... |
app/views/admin/projects/index.html.haml
| ... | ... | @@ -44,9 +44,10 @@ |
| 44 | 44 | %ul.well-list |
| 45 | 45 | - @projects.each do |project| |
| 46 | 46 | %li |
| 47 | - %span{ class: visibility_level_color(project.visibility_level) } | |
| 48 | - = visibility_level_icon(project.visibility_level) | |
| 49 | - = link_to project.name_with_namespace, [:admin, project] | |
| 47 | + .list-item-name | |
| 48 | + %span{ class: visibility_level_color(project.visibility_level) } | |
| 49 | + = visibility_level_icon(project.visibility_level) | |
| 50 | + = link_to project.name_with_namespace, [:admin, project] | |
| 50 | 51 | .pull-right |
| 51 | 52 | %span.label.label-gray |
| 52 | 53 | = repository_size(project) | ... | ... |
app/views/admin/projects/show.html.haml
| ... | ... | @@ -116,8 +116,9 @@ |
| 116 | 116 | - @project.users_projects.each do |users_project| |
| 117 | 117 | - user = users_project.user |
| 118 | 118 | %li.users_project |
| 119 | - %strong | |
| 120 | - = link_to user.name, admin_user_path(user) | |
| 119 | + .list-item-name | |
| 120 | + %strong | |
| 121 | + = link_to user.name, admin_user_path(user) | |
| 121 | 122 | .pull-right |
| 122 | 123 | - if users_project.owner? |
| 123 | 124 | %span.light Owner | ... | ... |
app/views/admin/users/index.html.haml
| ... | ... | @@ -36,15 +36,16 @@ |
| 36 | 36 | %ul.well-list |
| 37 | 37 | - @users.each do |user| |
| 38 | 38 | %li |
| 39 | - - if user.blocked? | |
| 40 | - %i.icon-lock.cred | |
| 41 | - - else | |
| 42 | - %i.icon-user.cgreen | |
| 43 | - = link_to user.name, [:admin, user] | |
| 44 | - - if user.admin? | |
| 45 | - %strong.cred (Admin) | |
| 46 | - - if user == current_user | |
| 47 | - %span.cred It's you! | |
| 39 | + .list-item-name | |
| 40 | + - if user.blocked? | |
| 41 | + %i.icon-lock.cred | |
| 42 | + - else | |
| 43 | + %i.icon-user.cgreen | |
| 44 | + = link_to user.name, [:admin, user] | |
| 45 | + - if user.admin? | |
| 46 | + %strong.cred (Admin) | |
| 47 | + - if user == current_user | |
| 48 | + %span.cred It's you! | |
| 48 | 49 | .pull-right |
| 49 | 50 | %span.light |
| 50 | 51 | %i.icon-envelope | ... | ... |
app/views/admin/users/show.html.haml
| ... | ... | @@ -124,7 +124,8 @@ |
| 124 | 124 | - @user.users_groups.each do |user_group| |
| 125 | 125 | - group = user_group.group |
| 126 | 126 | %li.users_group |
| 127 | - %strong= link_to group.name, admin_group_path(group) | |
| 127 | + %span{class: ("list-item-name" unless user_group.owner?)} | |
| 128 | + %strong= link_to group.name, admin_group_path(group) | |
| 128 | 129 | .pull-right |
| 129 | 130 | %span.light= user_group.human_access |
| 130 | 131 | - unless user_group.owner? | ... | ... |
app/views/groups/edit.html.haml
| ... | ... | @@ -73,8 +73,9 @@ |
| 73 | 73 | %ul.well-list |
| 74 | 74 | - @group.projects.each do |project| |
| 75 | 75 | %li |
| 76 | - = visibility_level_icon(project.visibility_level) | |
| 77 | - = link_to project.name_with_namespace, project | |
| 76 | + .list-item-name | |
| 77 | + = visibility_level_icon(project.visibility_level) | |
| 78 | + = link_to project.name_with_namespace, project | |
| 78 | 79 | .pull-right |
| 79 | 80 | = link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" |
| 80 | 81 | = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" | ... | ... |
app/views/users_groups/_users_group.html.haml
| ... | ... | @@ -2,11 +2,12 @@ |
| 2 | 2 | - return unless user |
| 3 | 3 | - show_roles = true if show_roles.nil? |
| 4 | 4 | %li{class: "#{dom_class(member)} js-toggle-container", id: dom_id(member)} |
| 5 | - = image_tag avatar_icon(user.email, 16), class: "avatar s16" | |
| 6 | - %strong= user.name | |
| 7 | - %span.cgray= user.username | |
| 8 | - - if user == current_user | |
| 9 | - %span.label.label-success It's you | |
| 5 | + %span{class: ("list-item-name" if show_controls)} | |
| 6 | + = image_tag avatar_icon(user.email, 16), class: "avatar s16" | |
| 7 | + %strong= user.name | |
| 8 | + %span.cgray= user.username | |
| 9 | + - if user == current_user | |
| 10 | + %span.label.label-success It's you | |
| 10 | 11 | |
| 11 | 12 | - if show_roles |
| 12 | 13 | %span.pull-right |
| ... | ... | @@ -22,7 +23,7 @@ |
| 22 | 23 | - else |
| 23 | 24 | = link_to group_users_group_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do |
| 24 | 25 | %i.icon-minus.icon-white |
| 25 | - | |
| 26 | + | |
| 26 | 27 | .edit-member.hide.js-toggle-content |
| 27 | 28 | = form_for [@group, member], remote: true do |f| |
| 28 | 29 | .alert.prepend-top-20 | ... | ... |