style fixes
This commit is contained in:
parent
fc753282d3
commit
a87018192a
4 changed files with 15 additions and 9 deletions
|
|
@ -49,7 +49,12 @@ module Admin
|
||||||
typelength += myevent.event_type.length
|
typelength += myevent.event_type.length
|
||||||
@totallength += myevent.event_type.length
|
@totallength += myevent.event_type.length
|
||||||
end
|
end
|
||||||
@eventstats[mytype.title] = { 'count' => events_mytype.count, 'length' => events_mytype.count * mytype.length } if @eventstats[mytype.title] == nil
|
|
||||||
|
if @eventstats[mytype.title] == nil
|
||||||
|
@eventstats[mytype.title] = { 'count' => events_mytype.count,
|
||||||
|
'length' => events_mytype.count * mytype.length }
|
||||||
|
end
|
||||||
|
|
||||||
tmp = { "#{mystate.name}" => { 'type_state_count' => events_mytype_mystate.count,
|
tmp = { "#{mystate.name}" => { 'type_state_count' => events_mytype_mystate.count,
|
||||||
'type_state_length' => typelength } }
|
'type_state_length' => typelength } }
|
||||||
@eventstats[mytype.title].merge!(tmp)
|
@eventstats[mytype.title].merge!(tmp)
|
||||||
|
|
@ -108,7 +113,8 @@ module Admin
|
||||||
@event.update_attribute(:difficulty_level_id, params[:difficulty_level_id])
|
@event.update_attribute(:difficulty_level_id, params[:difficulty_level_id])
|
||||||
end
|
end
|
||||||
|
|
||||||
if @event.submitter.update_attributes!(params[:user]) && @event.update_attributes!(params[:event])
|
if @event.submitter.update_attributes!(params[:user]) && @event.
|
||||||
|
update_attributes!(params[:event])
|
||||||
flash[:notice] = "Successfully updated #{@event.title}."
|
flash[:notice] = "Successfully updated #{@event.title}."
|
||||||
else
|
else
|
||||||
flash[:notice] = 'Update not successful.'
|
flash[:notice] = 'Update not successful.'
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ class DatatableSupporters < Datatable
|
||||||
items.each do |i|
|
items.each do |i|
|
||||||
item = []
|
item = []
|
||||||
if i.name.blank?
|
if i.name.blank?
|
||||||
unless i.registration.nil? || i.registration.user.nil?
|
if !i.registration.nil? && !i.registration.user.nil?
|
||||||
item << i.registration.user.name
|
item << i.registration.user.name
|
||||||
else
|
else
|
||||||
item << "Unknown"
|
item << 'Unknown'
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
@ -15,10 +15,10 @@ class DatatableSupporters < Datatable
|
||||||
end
|
end
|
||||||
|
|
||||||
if i.email.blank?
|
if i.email.blank?
|
||||||
unless i.registration.nil? && i.registration.user.nil?
|
if !i.registration.nil? && !i.registration.user.nil?
|
||||||
item << i.registration.user.email
|
item << i.registration.user.email
|
||||||
else
|
else
|
||||||
item << "Unknown"
|
item << 'Unknown'
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
@ -35,6 +35,6 @@ class DatatableSupporters < Datatable
|
||||||
end
|
end
|
||||||
|
|
||||||
def columns
|
def columns
|
||||||
["name", "email", "name", "name", "name"]
|
['name', 'email', 'name', 'name', 'name']
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ class User < ActiveRecord::Base
|
||||||
private
|
private
|
||||||
|
|
||||||
def biography_limit
|
def biography_limit
|
||||||
errors.add(:abstract, 'cannot have more than 150 words') if !biography.nil? &&
|
errors.add(:abstract, 'cannot have more than 150 words') if biography &&
|
||||||
biography.split.size > 150
|
biography.split.size > 150
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
= render 'devise/shared/openid'
|
= render 'devise/shared/openid'
|
||||||
|
|
||||||
= f.inputs name: 'Account' do
|
= f.inputs name: 'Account' do
|
||||||
= f.input :email, :required => false, :input_html => {autocomplete: "off"}
|
= f.input :email, required: false, input_html: {autocomplete: "off"}
|
||||||
= f.input :password, hint: "(Leave blank if you don't want to change it)", input_html: {autocomplete: 'off'}
|
= f.input :password, hint: "(Leave blank if you don't want to change it)", input_html: {autocomplete: 'off'}
|
||||||
= f.input :password_confirmation, input_html: {autocomplete: 'off'}
|
= f.input :password_confirmation, input_html: {autocomplete: 'off'}
|
||||||
= f.input :current_password, input_html: {autocomplete: 'off'},
|
= f.input :current_password, input_html: {autocomplete: 'off'},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue