From 4d9c3f3123f43978702c60bb2d87885377b3d837 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 27 Jan 2012 09:19:55 +0200 Subject: [PATCH] Bootstrap: btn replacing --- app/views/admin/projects/_form.html.haml | 2 +- app/views/admin/projects/index.html.haml | 2 +- app/views/admin/projects/show.html.haml | 4 +- app/views/admin/team_members/_form.html.haml | 2 +- app/views/admin/team_members/index.html.haml | 2 +- app/views/admin/users/_form.html.haml | 2 +- app/views/admin/users/index.html.haml | 2 +- app/views/admin/users/show.html.haml | 4 +- app/views/deploy_keys/_form.html.haml | 2 +- app/views/issues/_form.html.haml | 2 +- app/views/merge_requests/_head.html.haml | 7 --- app/views/merge_requests/index.html.haml | 26 +++++----- app/views/notes/_form.html.haml | 51 ++++++++++---------- app/views/profile/design.html.haml | 2 +- app/views/profile/password.html.haml | 4 +- app/views/projects/_form.html.haml | 2 +- 16 files changed, 53 insertions(+), 63 deletions(-) diff --git a/app/views/admin/projects/_form.html.haml b/app/views/admin/projects/_form.html.haml index ea42ed22311b..d75f2109050a 100644 --- a/app/views/admin/projects/_form.html.haml +++ b/app/views/admin/projects/_form.html.haml @@ -31,7 +31,7 @@ .clear %br .actions - = f.submit 'Save', :class => "grey-button" + = f.submit 'Save', :class => "btn" :javascript $(function(){ diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index f57b98d0f347..576dbf046f7b 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -19,4 +19,4 @@ %td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete = paginate @admin_projects -= link_to 'New Project', new_admin_project_path, :class => "grey-button" += link_to 'New Project', new_admin_project_path, :class => "btn" diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index cc83add6db42..3e589a0cecb3 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -31,7 +31,7 @@ = @admin_project.description %tr %td{:colspan => 2} - = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "grey-button" + = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "btn" .span-14 @@ -53,7 +53,7 @@ %tr %td{ :colspan => 3 } - = submit_tag 'Add', :class => "positive-button" + = submit_tag 'Add', :class => "btn primary" %table.round-borders %thead diff --git a/app/views/admin/team_members/_form.html.haml b/app/views/admin/team_members/_form.html.haml index f8e7f1043d07..e6dd6a43f72f 100644 --- a/app/views/admin/team_members/_form.html.haml +++ b/app/views/admin/team_members/_form.html.haml @@ -27,7 +27,7 @@ = f.select :repo_access, options_for_select(Repository.access_options, @admin_team_member.repo_access), {}, :class => "repo-access-select" %br .actions - = f.submit 'Save', :class => "grey-button" + = f.submit 'Save', :class => "btn" :css form select { diff --git a/app/views/admin/team_members/index.html.haml b/app/views/admin/team_members/index.html.haml index 8033e6906420..8426c8638c65 100644 --- a/app/views/admin/team_members/index.html.haml +++ b/app/views/admin/team_members/index.html.haml @@ -25,4 +25,4 @@ %br = paginate @admin_team_members -= link_to 'New Team Member', new_admin_team_member_path, :class => "grey-button" += link_to 'New Team Member', new_admin_team_member_path, :class => "btn" diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index e695332239ff..156696c9ccb0 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -46,4 +46,4 @@ .clear %br .actions - = f.submit 'Save', :class => "grey-button" + = f.submit 'Save', :class => "btn" diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index db58a6b47a2b..b562a83183bb 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -18,4 +18,4 @@ = paginate @admin_users %br -= link_to 'New User', new_admin_user_path, :class => "grey-button" += link_to 'New User', new_admin_user_path, :class => "btn" diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index da8f4370cab3..755ee353c082 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -41,7 +41,7 @@ = @admin_user.twitter %tr %td{:colspan => 2} - = link_to 'Edit', edit_admin_user_path(@admin_user), :class => "grey-button" + = link_to 'Edit', edit_admin_user_path(@admin_user), :class => "btn" .span-14 %h2 Projects @@ -66,4 +66,4 @@ %td= link_to 'Edit', edit_admin_team_member_path(tm) %td= link_to 'Cancel', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete - = link_to 'Add To Another Project', new_admin_team_member_path(:team_member => {:user_id => @admin_user.id}), :class => "grey-button" + = link_to 'Add To Another Project', new_admin_team_member_path(:team_member => {:user_id => @admin_user.id}), :class => "btn" diff --git a/app/views/deploy_keys/_form.html.haml b/app/views/deploy_keys/_form.html.haml index f0a300bb60eb..b108f03afd0b 100644 --- a/app/views/deploy_keys/_form.html.haml +++ b/app/views/deploy_keys/_form.html.haml @@ -14,5 +14,5 @@ %td= f.text_area :key, :style => "width:300px; height:130px" %br .merge-tabs - = f.submit 'Save', :class => "positive-button" + = f.submit 'Save', :class => "primary btn" diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml index d13827e76ac0..2ba6978a030c 100644 --- a/app/views/issues/_form.html.haml +++ b/app/views/issues/_form.html.haml @@ -44,7 +44,7 @@ %br %br .merge-tabs - = f.submit 'Save', :class => "positive-button" + = f.submit 'Save', :class => "primary btn"   - unless @issue.new_record? .right diff --git a/app/views/merge_requests/_head.html.haml b/app/views/merge_requests/_head.html.haml index ccebd8ef047f..3d847b302ae8 100644 --- a/app/views/merge_requests/_head.html.haml +++ b/app/views/merge_requests/_head.html.haml @@ -2,11 +2,4 @@ = link_to project_merge_requests_path(@project), :class => "tab #{'active' if current_page?(project_merge_requests_path(@project)) }" do %span Merge Requests - - - - if current_page?(project_merge_requests_path(@project)) - - if can? current_user, :write_merge_request, @project - = link_to new_project_merge_request_path(@project), :class => "add_new", :title => "New Merge request" do - Add new - diff --git a/app/views/merge_requests/index.html.haml b/app/views/merge_requests/index.html.haml index fa02be9e92ca..8ddb3021a031 100644 --- a/app/views/merge_requests/index.html.haml +++ b/app/views/merge_requests/index.html.haml @@ -1,5 +1,3 @@ -= render "merge_requests/head" - .left.issues_filter = form_tag project_merge_requests_path(@project), :method => :get do .left @@ -14,17 +12,17 @@ .clear %hr -- if @merge_requests.count > 0 - %div{ :class => "update-data ui-box ui-box-small ui-box-big" } - .data - = render @merge_requests - - .clear - %br -- unless @merge_requests.count > 0 || params[:f] == "2" - .notice_holder - %li Merge Requests do not exist yet. +.row + .span10 + - if @merge_requests.count > 0 + %div{ :class => "update-data ui-box ui-box-small ui-box-big" } + .data + = render @merge_requests + .span4 - if can? current_user, :write_merge_request, @project - %li You can add a new one by clicking on "Add New" button - + .alert-message.block-message.info + %p You can open a new merge request. + - if current_page?(project_merge_requests_path(@project)) + = link_to new_project_merge_request_path(@project), :class => "btn small", :title => "New Merge request" do + Add new diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml index 29cd3d3b0fc0..9e74564e2cde 100644 --- a/app/views/notes/_form.html.haml +++ b/app/views/notes/_form.html.haml @@ -1,32 +1,31 @@ -%div += form_for [@project, @note], :remote => "true", :multipart => true do |f| %h3 Leave a note - = form_for [@project, @note], :remote => "true", :multipart => true do |f| - -if @note.errors.any? - .errors.error - - @note.errors.full_messages.each do |msg| - %div= msg + -if @note.errors.any? + .alert-message.block-message.error + - @note.errors.full_messages.each do |msg| + %div= msg - = f.hidden_field :noteable_id - = f.hidden_field :noteable_type - = f.text_area :note, :size => 255 + = f.hidden_field :noteable_id + = f.hidden_field :noteable_type + = f.text_area :note, :size => 255 - .row - .span6 - %h5 Notify via email: - .clearfix - = label_tag :notify do - = check_box_tag :notify, 1, @note.noteable_type != "Commit" - %span Project team + .row + .span6 + %h5 Notify via email: + .clearfix + = label_tag :notify do + = check_box_tag :notify, 1, @note.noteable_type != "Commit" + %span Project team - -if @note.noteable_type == "Commit" - = label_tag :notify_author do - = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit" - %span Commit author - .span6 - %h5 Attachment: - .clearfix - = f.label :attachment, "Any file, < 10 MB" - .input= f.file_field :attachment, :class => "input-file" + -if @note.noteable_type == "Commit" + = label_tag :notify_author do + = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit" + %span Commit author + .span6 + %h5 Attachment: + .clearfix + = f.label :attachment, "Any file, < 10 MB" + .input= f.file_field :attachment, :class => "input-file" - = f.submit 'Add note', :class => "btn primary", :id => "submit_note" + = f.submit 'Add note', :class => "btn primary", :id => "submit_note" diff --git a/app/views/profile/design.html.haml b/app/views/profile/design.html.haml index 4a0f758d31f6..db5ffccfa81d 100644 --- a/app/views/profile/design.html.haml +++ b/app/views/profile/design.html.haml @@ -18,5 +18,5 @@ Dark code preview .clear .buttons - = f.submit 'Save', :class => "grey-button" + = f.submit 'Save', :class => "btn" diff --git a/app/views/profile/password.html.haml b/app/views/profile/password.html.haml index 893263f7d8d2..47ee0093a018 100644 --- a/app/views/profile/password.html.haml +++ b/app/views/profile/password.html.haml @@ -18,7 +18,7 @@ %br = f.password_field :password_confirmation .buttons - = f.submit 'Save', :class => "grey-button" + = f.submit 'Save', :class => "btn" .clear .ui-box.width-100p @@ -40,5 +40,5 @@ - if current_user.private_token = f.submit 'Reset', :confirm => "Are you sure?", :class => "grey-button" - else - = f.submit 'Generate', :class => "positive-button" + = f.submit 'Generate', :class => "btn" diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml index 421e84098243..84a47b046f3b 100644 --- a/app/views/projects/_form.html.haml +++ b/app/views/projects/_form.html.haml @@ -47,7 +47,7 @@ %h3.prepend-top Updating project & repository. Please wait for few minutes .merge-tabs - = f.submit 'Save', :class => "grey-button" + = f.submit 'Save', :class => "btn primary"   - unless @project.new_record? .right