This commit is contained in:
Gopesh Tulsyan 2014-03-17 15:35:34 +00:00
commit 1421241df5
8 changed files with 30 additions and 23 deletions

View file

@ -20,7 +20,7 @@ end
group :development, :test do
gem 'pry'
gem 'sqlite3'
gem 'mysql2'
gem 'thin'
gem 'rspec-rails', '2.11.0'
end

View file

@ -192,7 +192,6 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.8)
therubyracer (0.12.0)
libv8 (~> 3.16.14.0)
ref
@ -246,7 +245,6 @@ DEPENDENCIES
rails (= 3.2.15)
rspec-rails (= 2.11.0)
sass-rails (~> 3.2.3)
sqlite3
therubyracer
thin
transitions

View file

@ -16,4 +16,15 @@ class Admin::UsersController < ApplicationController
user.update_attributes!(params[:user])
redirect_to admin_users_path, :notice => "Updated #{user.email}"
end
def delete
@user = User.find(params[:id])
end
def destroy
@user = User.find(params[:id])
@user.destroy
redirect_to admin_users_path, :notice => "User got deleted"
end
end

View file

@ -13,7 +13,7 @@
%b ID
%th
%b Title
- if @conference.call_for_papers.rating != 0
- if !@conference.call_for_papers.blank? && @conference.call_for_papers.rating != 0
%th
%b Rating
%th

View file

@ -24,6 +24,7 @@
%b Roles
%th
%th
%th
- @users.each do |user|
- person = Person.find_person_by_user_id(user.id)
%tr
@ -71,6 +72,12 @@
"data-html" => "true",
"data-content" => user.popup_details,
"data-original-title" => ""
%td
- if current_user.id == user.id or user.role_ids.include? 3
=link_to 'Delete',admin_user_path(user), :method => :delete , :data => {:confirm => 'Are you sure ?'}, :disabled => true,:class => "btn btn-primary disabled btn-danger",:role => "button"
- else
=link_to 'Delete',admin_user_path(user), :method=> :delete , :data=> {:confirm => 'Are you sure ?'},:class => "btn btn-primary btn-danger"
:javascript
$(document).ready(function() {

View file

@ -1,8 +1,8 @@
class ChangeAttachmentDefault < ActiveRecord::Migration
def up
change_column_default(:event_attachments, :public, :default => true)
change_column_default(:event_attachments, :public, true)
end
def down
change_column_default(:event_attachments, :public, :default => nil)
change_column_default(:event_attachments, :public, true)
end
end

View file

@ -1,9 +0,0 @@
class DropAdditionalSpeakers < ActiveRecord::Migration
def up
remove_column :registrations, :additional_speakers
end
def down
add_column :registrations, :additional_speakers
end
end

View file

@ -118,14 +118,14 @@ ActiveRecord::Schema.define(:version => 20140305102505) do
create_table "event_attachments", :force => true do |t|
t.integer "event_id"
t.string "title", :null => false
t.string "title", :null => false
t.string "attachment_file_name"
t.string "attachment_content_type"
t.integer "attachment_file_size"
t.datetime "attachment_updated_at"
t.boolean "public", :default => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.boolean "public", :default => true
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "event_people", :force => true do |t|
@ -347,14 +347,14 @@ ActiveRecord::Schema.define(:version => 20140305102505) do
create_table "venues", :force => true do |t|
t.string "guid"
t.text "name", :limit => 255
t.text "address", :limit => 255
t.text "name"
t.text "address"
t.string "website"
t.text "description"
t.string "offline_map_url"
t.string "offline_map_bounds"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "versions", :force => true do |t|