Commit 14649525971d7351120f659213aad0e40722bc44
1 parent
214fdd2d
Exists in
master
and in
4 other branches
Fix comments in MR. Fixed event destroy with user
Showing
9 changed files
with
24 additions
and
15 deletions
Show diff stats
app/assets/javascripts/note.js
... | ... | @@ -25,11 +25,11 @@ init: |
25 | 25 | $(this).closest('li').fadeOut(); }); |
26 | 26 | |
27 | 27 | $("#new_note").live("ajax:before", function(){ |
28 | - $("#submit_note").attr("disabled", "disabled"); | |
28 | + $(".submit_note").attr("disabled", "disabled"); | |
29 | 29 | }) |
30 | 30 | |
31 | 31 | $("#new_note").live("ajax:complete", function(){ |
32 | - $("#submit_note").removeAttr("disabled"); | |
32 | + $(".submit_note").removeAttr("disabled"); | |
33 | 33 | }) |
34 | 34 | |
35 | 35 | $("#note_note").live("focus", function(){ | ... | ... |
app/assets/stylesheets/gitlab_bootstrap.scss
... | ... | @@ -213,6 +213,7 @@ a:focus { |
213 | 213 | .cblack { color:#111; } |
214 | 214 | .cdark { color:#444 } |
215 | 215 | .cwhite { color:#fff !important } |
216 | +.bgred { background: #F2DEDE !important} | |
216 | 217 | |
217 | 218 | /** COMMON STYLES **/ |
218 | 219 | .left { |
... | ... | @@ -650,7 +651,7 @@ p { |
650 | 651 | h3.page_title { |
651 | 652 | color:#456; |
652 | 653 | font-size:20px; |
653 | - font-weight: 600; | |
654 | + font-weight: normal; | |
654 | 655 | line-height: 28px; |
655 | 656 | } |
656 | 657 | ... | ... |
app/assets/stylesheets/header.scss
... | ... | @@ -96,7 +96,7 @@ header { |
96 | 96 | */ |
97 | 97 | .search { |
98 | 98 | float: right; |
99 | - margin-right: 55px; | |
99 | + margin-right: 50px; | |
100 | 100 | |
101 | 101 | .search-input { |
102 | 102 | @extend .span2; |
... | ... | @@ -125,11 +125,14 @@ header { |
125 | 125 | display: block; |
126 | 126 | cursor: pointer; |
127 | 127 | img { |
128 | + -moz-box-shadow: 0 0 5px #ccc; | |
129 | + -webkit-box-shadow: 0 0 5px #ccc; | |
130 | + box-shadow: 0 0 5px #ccc; | |
128 | 131 | border-radius: 4px; |
129 | - right: 0px; | |
132 | + right: 5px; | |
130 | 133 | position: absolute; |
131 | - width: 33px; | |
132 | - height: 33px; | |
134 | + width: 31px; | |
135 | + height: 31px; | |
133 | 136 | display: block; |
134 | 137 | top: 0; |
135 | 138 | &:after { | ... | ... |
app/controllers/admin/projects_controller.rb
... | ... | @@ -6,7 +6,7 @@ class Admin::ProjectsController < ApplicationController |
6 | 6 | def index |
7 | 7 | @admin_projects = Project.scoped |
8 | 8 | @admin_projects = @admin_projects.search(params[:name]) if params[:name].present? |
9 | - @admin_projects = @admin_projects.page(params[:page]) | |
9 | + @admin_projects = @admin_projects.page(params[:page]).per(20) | |
10 | 10 | end |
11 | 11 | |
12 | 12 | def show | ... | ... |
app/models/user.rb
... | ... | @@ -15,6 +15,11 @@ class User < ActiveRecord::Base |
15 | 15 | has_many :my_own_projects, :class_name => "Project", :foreign_key => :owner_id |
16 | 16 | has_many :keys, :dependent => :destroy |
17 | 17 | |
18 | + has_many :events, | |
19 | + :class_name => "Event", | |
20 | + :foreign_key => :author_id, | |
21 | + :dependent => :destroy | |
22 | + | |
18 | 23 | has_many :recent_events, |
19 | 24 | :class_name => "Event", |
20 | 25 | :foreign_key => :author_id, | ... | ... |
app/views/admin/projects/index.html.haml
... | ... | @@ -13,8 +13,8 @@ |
13 | 13 | %th Team Members |
14 | 14 | %th Post Receive |
15 | 15 | %th Last Commit |
16 | - %th | |
17 | - %th | |
16 | + %th Edit | |
17 | + %th.cred Danger Zone! | |
18 | 18 | |
19 | 19 | - @admin_projects.each do |project| |
20 | 20 | %tr |
... | ... | @@ -24,5 +24,5 @@ |
24 | 24 | %td= check_box_tag :post_receive_file, 1, project.has_post_receive_file?, :disabled => true |
25 | 25 | %td= last_commit(project) |
26 | 26 | %td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}", :class => "btn small" |
27 | - %td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger" | |
27 | + %td.bgred= link_to 'Destroy', [:admin, project], :confirm => "REMOVE #{project.name}? Are you sure?", :method => :delete, :class => "btn small danger" | |
28 | 28 | = paginate @admin_projects, :theme => "admin" | ... | ... |
app/views/admin/users/index.html.haml
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | %th Projects |
28 | 28 | %th Edit |
29 | 29 | %th Blocked |
30 | - %th | |
30 | + %th.cred Danger Zone! | |
31 | 31 | |
32 | 32 | - @admin_users.each do |user| |
33 | 33 | %tr |
... | ... | @@ -41,6 +41,6 @@ |
41 | 41 | = link_to 'Unblock', unblock_admin_user_path(user), :method => :put, :class => "btn small success" |
42 | 42 | - else |
43 | 43 | = link_to 'Block', block_admin_user_path(user), :confirm => 'USER WILL BE BLOCKED! Are you sure?', :method => :put, :class => "btn small danger" |
44 | - %td= link_to 'Destroy', [:admin, user], :confirm => 'USER WILL BE REMOVED! Are you sure?', :method => :delete, :class => "btn small danger" | |
44 | + %td.bgred= link_to 'Destroy', [:admin, user], :confirm => "USER #{user.name} WILL BE REMOVED! Are you sure?", :method => :delete, :class => "btn small danger" | |
45 | 45 | |
46 | 46 | = paginate @admin_users, :theme => "admin" | ... | ... |
app/views/notes/_form.html.haml
app/views/notes/_per_line_form.html.haml
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit" |
25 | 25 | %span Commit author |
26 | 26 | .actions |
27 | - = f.submit 'Add note', :class => "btn primary", :id => "submit_note" | |
27 | + = f.submit 'Add note', :class => "btn primary submit_note", :id => "submit_note" | |
28 | 28 | = link_to "Close", "#", :class => "btn hide-button" |
29 | 29 | |
30 | 30 | :javascript | ... | ... |