Commit 8ca0b75d05b457e4335a6734582ba703404cc9c6

Authored by randx
1 parent c7cfe3d8

Tables refactored

app/assets/stylesheets/gitlab_bootstrap/tables.scss
1 1 table {
  2 + @extend .table;
  3 + @extend .table-striped;
  4 + @include solid_shade;
  5 + border:1px solid #bbb;
2 6 width:100%;
  7 +
3 8 th {
4   - padding-top: 9px;
5 9 font-weight: bold;
6 10 vertical-align: middle;
  11 + border-bottom: 1px solid #bbb;
  12 + text-shadow: 0 1px 1px #fff;
  13 + @include bg-dark-gray-gradient;
7 14 }
  15 +
8 16 th, td {
9   - padding: 10px 10px 9px;
  17 + padding: 8px;
10 18 line-height: 18px;
11 19 text-align: left;
12 20 }
13 21  
14   - &.bordered-table {
15   - border: 1px solid #DDD;
16   - border-collapse: separate;
17   - -webkit-border-radius: 4px;
18   - -moz-border-radius: 4px;
19   - border-radius: 4px;
20   - }
  22 + td {
  23 + border-color:#f1f1f1;
  24 + &:first-child {
  25 + border-left:1px solid #bbb;
  26 + }
21 27  
22   - &.zebra-striped {
23   - @extend .table-striped;
  28 + &:last-child {
  29 + border-right:1px solid #bbb;
  30 + }
24 31 }
25   -}
26 32  
27   -table.admin-table {
28   - @extend .table-bordered;
29   - @extend .zebra-striped;
30   - @include solid_shade;
31   - th {
32   - border-color: #CCC;
33   - border-bottom: 1px solid #bbb;
34   - @include bg-gray-gradient;
  33 + &.bordered {
  34 + @extend .table-bordered;
35 35 }
36   -}
37 36  
38   -table.no-borders {
39   - border:none;
40   - tr, td { border:none }
  37 + &.lite {
  38 + border:none;
  39 + box-shadow:none;
  40 + tr, td {
  41 + border:none;
  42 + background:none !important;
  43 + }
  44 + }
41 45 }
... ...
app/assets/stylesheets/sections/tree.scss
1   -#tree-holder {
  1 +#tree-holder {
2 2 #tree-content-holder {
3 3 float:left;
4 4 width:100%;
... ... @@ -11,40 +11,44 @@
11 11 padding:12px;
12 12 background: #F7F7F7;
13 13  
14   - pre {
  14 + pre {
15 15 overflow: auto;
16 16 }
17 17 }
18 18 }
19 19  
20   - .tree_progress {
  20 + .tree_progress {
21 21 display:none;
22 22 margin:20px;
23   - &.loading {
  23 + &.loading {
24 24 display:block;
25 25 }
26 26 }
27 27  
28 28 #tree-slider {
29 29 @include border-radius(0);
30   - .tree-item {
31   - &:hover {
32   - td { background: $hover; }
  30 + .tree-item {
  31 + &:hover {
  32 + td {
  33 + background: $hover;
  34 + border-top:1px solid #FEA;
  35 + border-bottom:1px solid #FEA;
  36 + }
33 37 cursor:pointer;
34 38 }
35 39 }
36 40 }
37 41  
38   - .tree-item {
39   - .tree-item-file-name {
  42 + .tree-item {
  43 + .tree-item-file-name {
40 44 vertical-align:middle;
41   - a {
42   - &:hover {
  45 + a {
  46 + &:hover {
43 47 color:$blue_link;
44 48 }
45 49 }
46 50  
47   - img {
  51 + img {
48 52 position: relative;
49 53 top:-1px;
50 54 }
... ... @@ -52,37 +56,19 @@
52 56 }
53 57  
54 58  
55   - #tree-slider {
56   - @include solid_shade;
57   - width:100%;
58   -
59   - border-color:#ccc;
60   -
61   - td {
62   - padding:8px;
63   - border-color:#f1f1f1;
  59 + #tree-slider {
  60 + td {
64 61 background:#fafafa;
65 62 }
66   -
67   - tr:first-child td:first-child,
68   - tr:first-child td:last-child {
69   - border-radius:0;
70   - }
71   -
72   - th {
73   - border-color: #CCC;
74   - border-bottom: 1px solid #bbb;
75   - @include bg-gray-gradient;
76   - }
77 63 }
78 64  
79   - .tree-commit-link {
  65 + .tree-commit-link {
80 66 color:#333;
81 67 }
82 68  
83   - a.tree-commit-link {
  69 + a.tree-commit-link {
84 70 color: #666;
85   - &:hover {
  71 + &:hover {
86 72 text-decoration: underline;
87 73 }
88 74 }
... ...
app/views/admin/hooks/index.html.haml
... ... @@ -23,7 +23,7 @@
23 23 Hooks
24 24 %small (#{@hooks.count})
25 25 %br
26   - %table.admin-table
  26 + %table
27 27 %tr
28 28 %th URL
29 29 %th Method
... ...
app/views/admin/projects/index.html.haml
... ... @@ -6,7 +6,7 @@
6 6 = text_field_tag :name, params[:name], class: "xlarge"
7 7 = submit_tag "Search", class: "btn submit primary"
8 8  
9   -%table.admin-table
  9 +%table
10 10 %thead
11 11 %th Name
12 12 %th Path
... ...
app/views/admin/projects/show.html.haml
... ... @@ -3,7 +3,11 @@
3 3 = link_to 'Edit', edit_admin_project_path(@admin_project), class: "btn right small"
4 4  
5 5 %br
6   -%table.zebra-striped.table-bordered
  6 +%table.zebra-striped
  7 + %thead
  8 + %tr
  9 + %th Project
  10 + %th
7 11 %tr
8 12 %td
9 13 %b
... ... @@ -40,7 +44,7 @@
40 44 %small
41 45 (#{@admin_project.users_projects.count})
42 46 %br
43   -%table.zebra-striped.table-bordered
  47 +%table.zebra-striped
44 48 %thead
45 49 %tr
46 50 %th Name
... ... @@ -60,7 +64,7 @@
60 64 %h3 Add new team member
61 65 %br
62 66 = form_tag team_update_admin_project_path(@admin_project), class: "bulk_import", method: :put do
63   - %table.zebra-striped.table-bordered
  67 + %table.zebra-striped
64 68 %thead
65 69 %tr
66 70 %th Users
... ...
app/views/admin/users/index.html.haml
... ... @@ -19,7 +19,7 @@
19 19 = link_to admin_users_path(filter: "wop") do
20 20 Without projects
21 21  
22   -%table.admin-table
  22 +%table
23 23 %thead
24 24 %th Admin
25 25 %th Name
... ...
app/views/admin/users/show.html.haml
... ... @@ -8,7 +8,11 @@
8 8  
9 9 %br
10 10  
11   -%table.zebra-striped.table-bordered
  11 +%table.zebra-striped
  12 + %thead
  13 + %tr
  14 + %th Profile
  15 + %th
12 16 %tr
13 17 %td
14 18 %b
... ... @@ -57,7 +61,7 @@
57 61 %h3 Add User to Projects
58 62 %br
59 63 = form_tag team_update_admin_user_path(@admin_user), class: "bulk_import", method: :put do
60   - %table.table-bordered
  64 + %table
61 65 %thead
62 66 %tr
63 67 %th Projects
... ... @@ -78,9 +82,9 @@
78 82 %h3 Projects
79 83 %br
80 84  
81   - %table.zebra-striped.table-bordered
82   - %tr
83   - %thead
  85 + %table.zebra-striped
  86 + %thead
  87 + %tr
84 88 %th Name
85 89 %th Project Access
86 90 %th
... ...
app/views/hooks/index.html.haml
... ... @@ -26,11 +26,12 @@
26 26 Hooks
27 27 %small (#{@hooks.count})
28 28 %br
29   - %table.admin-table
30   - %tr
31   - %th URL
32   - %th Method
33   - %th
  29 + %table
  30 + %thead
  31 + %tr
  32 + %th URL
  33 + %th Method
  34 + %th
34 35 - @hooks.each do |hook|
35 36 %tr
36 37 %td
... ...
app/views/keys/index.html.haml
... ... @@ -7,7 +7,7 @@
7 7 SSH key allows you to establish a secure connection between your computer and Gitlab
8 8  
9 9  
10   -%table#keys-table.admin-table
  10 +%table#keys-table
11 11 %thead
12 12 %tr
13 13 %th Name
... ...
app/views/milestones/show.html.haml
... ... @@ -42,7 +42,7 @@
42 42  
43 43 .row
44 44 .span6
45   - %table.admin-table
  45 + %table
46 46 %thead
47 47 %th Open Issues
48 48 - @issues.each do |issue|
... ... @@ -56,7 +56,7 @@
56 56 = paginate @issues, theme: "gitlab"
57 57  
58 58 .span6
59   - %table.admin-table
  59 + %table
60 60 %thead
61 61 %th Participants
62 62 - @users.each do |user|
... ...
app/views/projects/_team.html.haml
1   -%table.admin-table
  1 +%table
2 2 %thead
3 3 %tr
4 4 %th User
... ...
app/views/projects/files.html.haml
1 1 = render "project_head"
2 2 - unless @notes.empty?
3   - %table.zebra-striped.borders
  3 + %table
  4 + %thead
  5 + %tr
  6 + %th File name
  7 + %th
  8 +
4 9 - @notes.each do |note|
5 10 %tr
6 11 %td
... ...
app/views/protected_branches/index.html.haml
... ... @@ -24,7 +24,7 @@
24 24 = f.submit 'Protect', class: "primary btn"
25 25  
26 26 - unless @branches.empty?
27   - %table.admin-table
  27 + %table
28 28 %thead
29 29 %tr
30 30 %th Name
... ...
app/views/refs/_tree.html.haml
... ... @@ -13,7 +13,7 @@
13 13 = render partial: "refs/tree_file", locals: { name: tree.name, content: tree.data, file: tree }
14 14 - else
15 15 - contents = tree.contents
16   - %table#tree-slider.bordered-table.table{class: "table_#{@hex_path}" }
  16 + %table#tree-slider{class: "table_#{@hex_path}" }
17 17 %thead
18 18 %th Name
19 19 %th Last Update
... ...
app/views/repositories/branches.html.haml
1 1 = render "repositories/branches_head"
2 2 - unless @branches.empty?
3   - %table.admin-table
  3 + %table
4 4 %thead
5 5 %tr
6 6 %th Name
... ...
app/views/repositories/show.html.haml
1 1 = render "branches_head"
2 2  
3   -%table.admin-table
  3 +%table
4 4 %thead
5 5 %tr
6 6 %th Name
... ...
app/views/repositories/tags.html.haml
1 1 = render "commits/head"
2 2 - unless @tags.empty?
3   - %table.admin-table
  3 + %table
4 4 %thead
5 5 %tr
6 6 %th Name
... ...
app/views/search/show.html.haml
... ... @@ -14,7 +14,7 @@
14 14 .search_results
15 15 .row
16 16 .span6
17   - %table.admin-table
  17 + %table
18 18 %tr
19 19 %th Projects
20 20 %tbody
... ... @@ -31,7 +31,7 @@
31 31 %td
32 32 %h4.nothing_here_message No Projects
33 33 %br
34   - %table.admin-table
  34 + %table
35 35 %tr
36 36 %th Merge Requests
37 37 %tbody
... ... @@ -49,7 +49,7 @@
49 49 %td
50 50 %h4.nothing_here_message No Merge Requests
51 51 .span6
52   - %table.admin-table
  52 + %table
53 53 %tr
54 54 %th Issues
55 55 %tbody
... ...
app/views/snippets/index.html.haml
... ... @@ -8,7 +8,7 @@
8 8 %br
9 9 To add new snippet - click on button.
10 10  
11   -%table.admin-table
  11 +%table
12 12 %thead
13 13 %tr
14 14 %th Title
... ...
app/views/team_members/show.html.haml
... ... @@ -19,7 +19,7 @@
19 19 %br
20 20 .row
21 21 .span6
22   - %table.no-borders
  22 + %table.lite
23 23 %tr
24 24 %td Email
25 25 %td= mail_to user.email
... ... @@ -39,7 +39,7 @@
39 39 %td Bio
40 40 %td= user.bio
41 41 .span6
42   - %table.no-borders
  42 + %table.lite
43 43 %tr
44 44 %td Member since
45 45 %td= @team_member.created_at.stamp("Aug 21, 2011")
... ...
app/views/wikis/history.html.haml
... ... @@ -2,7 +2,7 @@
2 2 %span.cgray History for
3 3 = @wikis.last.title
4 4 %br
5   -%table.admin-table
  5 +%table
6 6 %thead
7 7 %tr
8 8 %th #
... ...
app/views/wikis/pages.html.haml
1 1 %h3.page_title All Pages
2 2 %br
3   -%table.admin-table
  3 +%table
4 4 %thead
5 5 %tr
6 6 %th Title
... ...