diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-07-19 08:05:57 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-07-19 08:05:57 +0400 |
commit | 14649525971d7351120f659213aad0e40722bc44 (patch) | |
tree | 8449425f308a7cbf68c1393e9aeb31f2e30ec196 | |
parent | 214fdd2d2f5fdac53d08da780f98edaed877be52 (diff) |
Fix comments in MR. Fixed event destroy with user
-rw-r--r-- | app/assets/javascripts/note.js | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/gitlab_bootstrap.scss | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/header.scss | 11 | ||||
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/models/user.rb | 5 | ||||
-rw-r--r-- | app/views/admin/projects/index.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/users/index.html.haml | 4 | ||||
-rw-r--r-- | app/views/notes/_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/notes/_per_line_form.html.haml | 2 |
9 files changed, 24 insertions, 15 deletions
diff --git a/app/assets/javascripts/note.js b/app/assets/javascripts/note.js index 4d97ffefdce..c45a45d2fcb 100644 --- a/app/assets/javascripts/note.js +++ b/app/assets/javascripts/note.js @@ -25,11 +25,11 @@ init: $(this).closest('li').fadeOut(); }); $("#new_note").live("ajax:before", function(){ - $("#submit_note").attr("disabled", "disabled"); + $(".submit_note").attr("disabled", "disabled"); }) $("#new_note").live("ajax:complete", function(){ - $("#submit_note").removeAttr("disabled"); + $(".submit_note").removeAttr("disabled"); }) $("#note_note").live("focus", function(){ diff --git a/app/assets/stylesheets/gitlab_bootstrap.scss b/app/assets/stylesheets/gitlab_bootstrap.scss index c0a20762d0a..b2bc4593a29 100644 --- a/app/assets/stylesheets/gitlab_bootstrap.scss +++ b/app/assets/stylesheets/gitlab_bootstrap.scss @@ -213,6 +213,7 @@ a:focus { .cblack { color:#111; } .cdark { color:#444 } .cwhite { color:#fff !important } +.bgred { background: #F2DEDE !important} /** COMMON STYLES **/ .left { @@ -650,7 +651,7 @@ p { h3.page_title { color:#456; font-size:20px; - font-weight: 600; + font-weight: normal; line-height: 28px; } diff --git a/app/assets/stylesheets/header.scss b/app/assets/stylesheets/header.scss index 5e2e410071b..c3a570036bb 100644 --- a/app/assets/stylesheets/header.scss +++ b/app/assets/stylesheets/header.scss @@ -96,7 +96,7 @@ header { */ .search { float: right; - margin-right: 55px; + margin-right: 50px; .search-input { @extend .span2; @@ -125,11 +125,14 @@ header { display: block; cursor: pointer; img { + -moz-box-shadow: 0 0 5px #ccc; + -webkit-box-shadow: 0 0 5px #ccc; + box-shadow: 0 0 5px #ccc; border-radius: 4px; - right: 0px; + right: 5px; position: absolute; - width: 33px; - height: 33px; + width: 31px; + height: 31px; display: block; top: 0; &:after { diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index c0508428275..0ff97bf2c32 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -6,7 +6,7 @@ class Admin::ProjectsController < ApplicationController def index @admin_projects = Project.scoped @admin_projects = @admin_projects.search(params[:name]) if params[:name].present? - @admin_projects = @admin_projects.page(params[:page]) + @admin_projects = @admin_projects.page(params[:page]).per(20) end def show diff --git a/app/models/user.rb b/app/models/user.rb index a3e08fa7d0b..0836ca4919f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -15,6 +15,11 @@ class User < ActiveRecord::Base has_many :my_own_projects, :class_name => "Project", :foreign_key => :owner_id has_many :keys, :dependent => :destroy + has_many :events, + :class_name => "Event", + :foreign_key => :author_id, + :dependent => :destroy + has_many :recent_events, :class_name => "Event", :foreign_key => :author_id, diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index 932fb37ddf6..7218eebb62a 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -13,8 +13,8 @@ %th Team Members %th Post Receive %th Last Commit - %th - %th + %th Edit + %th.cred Danger Zone! - @admin_projects.each do |project| %tr @@ -24,5 +24,5 @@ %td= check_box_tag :post_receive_file, 1, project.has_post_receive_file?, :disabled => true %td= last_commit(project) %td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}", :class => "btn small" - %td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger" + %td.bgred= link_to 'Destroy', [:admin, project], :confirm => "REMOVE #{project.name}? Are you sure?", :method => :delete, :class => "btn small danger" = paginate @admin_projects, :theme => "admin" diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 481bf37bb0b..5d5320db0e3 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -27,7 +27,7 @@ %th Projects %th Edit %th Blocked - %th + %th.cred Danger Zone! - @admin_users.each do |user| %tr @@ -41,6 +41,6 @@ = link_to 'Unblock', unblock_admin_user_path(user), :method => :put, :class => "btn small success" - else = link_to 'Block', block_admin_user_path(user), :confirm => 'USER WILL BE BLOCKED! Are you sure?', :method => :put, :class => "btn small danger" - %td= link_to 'Destroy', [:admin, user], :confirm => 'USER WILL BE REMOVED! Are you sure?', :method => :delete, :class => "btn small danger" + %td.bgred= link_to 'Destroy', [:admin, user], :confirm => "USER #{user.name} WILL BE REMOVED! Are you sure?", :method => :delete, :class => "btn small danger" = paginate @admin_users, :theme => "admin" diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml index 03774d160b9..f5aa1495796 100644 --- a/app/views/notes/_form.html.haml +++ b/app/views/notes/_form.html.haml @@ -32,4 +32,4 @@ %span Any file less than 10 MB - = f.submit 'Add Comment', :class => "btn primary", :id => "submit_note" + = f.submit 'Add Comment', :class => "btn primary submit_note", :id => "submit_note" diff --git a/app/views/notes/_per_line_form.html.haml b/app/views/notes/_per_line_form.html.haml index 94c558029d2..8beaf9b5e0c 100644 --- a/app/views/notes/_per_line_form.html.haml +++ b/app/views/notes/_per_line_form.html.haml @@ -24,7 +24,7 @@ = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit" %span Commit author .actions - = f.submit 'Add note', :class => "btn primary", :id => "submit_note" + = f.submit 'Add note', :class => "btn primary submit_note", :id => "submit_note" = link_to "Close", "#", :class => "btn hide-button" :javascript |