Fix comments in MR. Fixed event destroy with user
This commit is contained in:
parent
214fdd2d2f
commit
1464952597
|
@ -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(){
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue