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