Commit 14649525 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix comments in MR. Fixed event destroy with user

parent 214fdd2d
...@@ -25,11 +25,11 @@ init: ...@@ -25,11 +25,11 @@ init:
$(this).closest('li').fadeOut(); }); $(this).closest('li').fadeOut(); });
$("#new_note").live("ajax:before", function(){ $("#new_note").live("ajax:before", function(){
$("#submit_note").attr("disabled", "disabled"); $(".submit_note").attr("disabled", "disabled");
}) })
$("#new_note").live("ajax:complete", function(){ $("#new_note").live("ajax:complete", function(){
$("#submit_note").removeAttr("disabled"); $(".submit_note").removeAttr("disabled");
}) })
$("#note_note").live("focus", function(){ $("#note_note").live("focus", function(){
......
...@@ -213,6 +213,7 @@ a:focus { ...@@ -213,6 +213,7 @@ a:focus {
.cblack { color:#111; } .cblack { color:#111; }
.cdark { color:#444 } .cdark { color:#444 }
.cwhite { color:#fff !important } .cwhite { color:#fff !important }
.bgred { background: #F2DEDE !important}
/** COMMON STYLES **/ /** COMMON STYLES **/
.left { .left {
...@@ -650,7 +651,7 @@ p { ...@@ -650,7 +651,7 @@ p {
h3.page_title { h3.page_title {
color:#456; color:#456;
font-size:20px; font-size:20px;
font-weight: 600; font-weight: normal;
line-height: 28px; line-height: 28px;
} }
......
...@@ -96,7 +96,7 @@ header { ...@@ -96,7 +96,7 @@ header {
*/ */
.search { .search {
float: right; float: right;
margin-right: 55px; margin-right: 50px;
.search-input { .search-input {
@extend .span2; @extend .span2;
...@@ -125,11 +125,14 @@ header { ...@@ -125,11 +125,14 @@ header {
display: block; display: block;
cursor: pointer; cursor: pointer;
img { img {
-moz-box-shadow: 0 0 5px #ccc;
-webkit-box-shadow: 0 0 5px #ccc;
box-shadow: 0 0 5px #ccc;
border-radius: 4px; border-radius: 4px;
right: 0px; right: 5px;
position: absolute; position: absolute;
width: 33px; width: 31px;
height: 33px; height: 31px;
display: block; display: block;
top: 0; top: 0;
&:after { &:after {
......
...@@ -6,7 +6,7 @@ class Admin::ProjectsController < ApplicationController ...@@ -6,7 +6,7 @@ class Admin::ProjectsController < ApplicationController
def index def index
@admin_projects = Project.scoped @admin_projects = Project.scoped
@admin_projects = @admin_projects.search(params[:name]) if params[:name].present? @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 end
def show def show
......
...@@ -15,6 +15,11 @@ class User < ActiveRecord::Base ...@@ -15,6 +15,11 @@ class User < ActiveRecord::Base
has_many :my_own_projects, :class_name => "Project", :foreign_key => :owner_id has_many :my_own_projects, :class_name => "Project", :foreign_key => :owner_id
has_many :keys, :dependent => :destroy has_many :keys, :dependent => :destroy
has_many :events,
:class_name => "Event",
:foreign_key => :author_id,
:dependent => :destroy
has_many :recent_events, has_many :recent_events,
:class_name => "Event", :class_name => "Event",
:foreign_key => :author_id, :foreign_key => :author_id,
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
%th Team Members %th Team Members
%th Post Receive %th Post Receive
%th Last Commit %th Last Commit
%th %th Edit
%th %th.cred Danger Zone!
- @admin_projects.each do |project| - @admin_projects.each do |project|
%tr %tr
...@@ -24,5 +24,5 @@ ...@@ -24,5 +24,5 @@
%td= check_box_tag :post_receive_file, 1, project.has_post_receive_file?, :disabled => true %td= check_box_tag :post_receive_file, 1, project.has_post_receive_file?, :disabled => true
%td= last_commit(project) %td= last_commit(project)
%td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}", :class => "btn small" %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" = paginate @admin_projects, :theme => "admin"
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
%th Projects %th Projects
%th Edit %th Edit
%th Blocked %th Blocked
%th %th.cred Danger Zone!
- @admin_users.each do |user| - @admin_users.each do |user|
%tr %tr
...@@ -41,6 +41,6 @@ ...@@ -41,6 +41,6 @@
= link_to 'Unblock', unblock_admin_user_path(user), :method => :put, :class => "btn small success" = link_to 'Unblock', unblock_admin_user_path(user), :method => :put, :class => "btn small success"
- else - else
= link_to 'Block', block_admin_user_path(user), :confirm => 'USER WILL BE BLOCKED! Are you sure?', :method => :put, :class => "btn small danger" = 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" = paginate @admin_users, :theme => "admin"
...@@ -32,4 +32,4 @@ ...@@ -32,4 +32,4 @@
%span Any file less than 10 MB %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"
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
= check_box_tag :notify_author, 1 , @note.noteable_type == "Commit" = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit"
%span Commit author %span Commit author
.actions .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" = link_to "Close", "#", :class => "btn hide-button"
:javascript :javascript
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment