Commit 0a364762d96f2474e9cd177fba54b7a2e5614e8a

Authored by Dmitriy Zaporozhets
1 parent 09c2f8c7

twbs3 style for admin, tree, network, commits

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/generic/forms.scss
... ... @@ -30,10 +30,20 @@ fieldset legend {
30 30 padding-left: 17%;
31 31 }
32 32  
33   -label.control-label {
34   - @extend .col-sm-2;
  33 +label {
  34 + &.control-label {
  35 + @extend .col-sm-2;
  36 + }
  37 +
  38 + &.inline-label {
  39 + margin: 0;
  40 + }
35 41 }
36 42  
37 43 .inline-input-group {
38 44 width: 250px;
39 45 }
  46 +
  47 +.input-mx-250 {
  48 + max-width: 250px;
  49 +}
... ...
app/views/admin/dashboard/index.html.haml
... ... @@ -4,7 +4,7 @@
4 4 You can manage projects, users and other GitLab data from here.
5 5 %hr
6 6 .admin_dash.row
7   - .col-md-4
  7 + .col-sm-4
8 8 .light-well
9 9 %h4 Projects
10 10 .data
... ... @@ -12,7 +12,7 @@
12 12 %h1= Project.count
13 13 %hr
14 14 = link_to 'New Project', new_project_path, class: "btn btn-new"
15   - .col-md-4
  15 + .col-sm-4
16 16 .light-well
17 17 %h4 Users
18 18 .data
... ... @@ -20,7 +20,7 @@
20 20 %h1= User.count
21 21 %hr
22 22 = link_to 'New User', new_admin_user_path, class: "btn btn-new"
23   - .col-md-4
  23 + .col-sm-4
24 24 .light-well
25 25 %h4 Groups
26 26 .data
... ...
app/views/admin/groups/index.html.haml
... ... @@ -7,7 +7,8 @@
7 7 = link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right"
8 8 %br
9 9 = form_tag admin_groups_path, method: :get, class: 'form-inline' do
10   - = text_field_tag :name, params[:name], class: "span6 input-xpadding"
  10 + .form-group
  11 + = text_field_tag :name, params[:name], class: "form-control input-xpadding"
11 12 = submit_tag "Search", class: "btn submit btn-primary"
12 13  
13 14 %hr
... ...
app/views/admin/users/index.html.haml
... ... @@ -2,9 +2,11 @@
2 2 .col-md-3
3 3 .admin-filter
4 4 = form_tag admin_users_path, method: :get, class: 'form-inline' do
5   - = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'input-xpadding span2'
6   - = button_tag type: 'submit', class: 'btn btn-primary' do
7   - %i.icon-search
  5 + .append-bottom-10
  6 + .form-group
  7 + = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control'
  8 + = button_tag type: 'submit', class: 'btn btn-primary' do
  9 + %i.icon-search
8 10 %ul.nav.nav-pills.nav-stacked
9 11 %li{class: "#{'active' unless params[:filter]}"}
10 12 = link_to admin_users_path do
... ...
app/views/projects/commits/_head.html.haml
... ... @@ -22,6 +22,6 @@
22 22  
23 23  
24 24 - if current_user && current_controller?(:commits) && current_user.private_token
25   - %li.pull-right
  25 + %li.pull-right.hidden-sm
26 26 = link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed" do
27 27 %i.icon-rss
... ...
app/views/projects/network/_head.html.haml
1   -.clearfix
2   - .pull-left
  1 +.row.append-bottom-20
  2 + .col-sm-2
3 3 = render partial: 'shared/ref_switcher', locals: {destination: 'graph'}
4   - .pull-left
5   - = form_tag project_network_path(@project, @id), method: :get do |f|
6   - .form-group
7   - = label_tag :filter_ref, "Begin with the selected commit", class: 'control-label light'
8   - .col-sm-10
9   - = check_box_tag :filter_ref, 1, @options[:filter_ref]
10   - - @options.each do |key, value|
11   - = hidden_field_tag(key, value, id: nil) unless key == "filter_ref"
12   -
13   - .search.pull-right
14   - = form_tag project_network_path(@project, @id), method: :get do |f|
15   - .form-group
16   - = label_tag :search , "Looking for commit:", class: 'control-label light'
17   - .col-sm-10
18   - = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: "search-input form-control"
19   - = button_tag type: 'submit', class: 'btn vtop' do
20   - %i.icon-search
21   - - @options.each do |key, value|
22   - = hidden_field_tag(key, value, id: nil) unless key == "extended_sha1"
  4 + .col-sm-10
  5 + = form_tag project_network_path(@project, @id), method: :get, class: 'form-inline' do |f|
  6 + = label_tag :search , "Looking for", class: 'light inline-label'
  7 + = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: "search-input form-control input-mx-250"
  8 + = button_tag type: 'submit', class: 'btn btn-success' do
  9 + %i.icon-search
23 10  
  11 + .inline.prepend-left-20
  12 + .checkbox.light
  13 + = label_tag :filter_ref do
  14 + = check_box_tag :filter_ref, 1, @options[:filter_ref]
  15 + %span Begin with the selected commit
... ...
app/views/projects/show.html.haml
1 1 = render "home_panel"
2 2  
3 3 .row
4   - .col-md-9
  4 + .col-md-9.hidden-sm
5 5 = render "events/event_last_push", event: @last_push
6 6 = render 'shared/event_filter'
7 7 .content_list
... ...
app/views/projects/tree/_tree.html.haml
... ... @@ -21,15 +21,16 @@
21 21 %tr
22 22 %th Name
23 23 %th Last Update
24   - %th
  24 + %th.hidden-sm
25 25 Last Commit
26   - &nbsp;
27   - %i.icon-angle-right
28   - &nbsp;
29   - %small.light
30   - = link_to @commit.short_id, project_commit_path(@project, @commit)
31   - &ndash;
32   - = truncate(@commit.title, length: 50)
  26 + %span.last-commit
  27 + &nbsp;
  28 + %i.icon-angle-right
  29 + &nbsp;
  30 + %small.light
  31 + = link_to @commit.short_id, project_commit_path(@project, @commit)
  32 + &ndash;
  33 + = truncate(@commit.title, length: 50)
33 34 %th= link_to "history", project_commits_path(@project, @id), class: "pull-right"
34 35  
35 36 - if @path.present?
... ...