Merge pull request #1008 from nishanthvijayan/remove-unused-helpers
Remove unused helper methods
This commit is contained in:
commit
d6a8680d5d
1 changed files with 0 additions and 38 deletions
|
|
@ -17,12 +17,6 @@ module ApplicationHelper
|
||||||
@devise_mapping ||= Devise.mappings[:user]
|
@devise_mapping ||= Devise.mappings[:user]
|
||||||
end
|
end
|
||||||
|
|
||||||
def pluralize_without_count(count, noun, text = nil)
|
|
||||||
if count != 0
|
|
||||||
count == 1 ? "#{noun}#{text}" : "#{noun.pluralize}#{text}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def event_status_icon(event)
|
def event_status_icon(event)
|
||||||
case event.state
|
case event.state
|
||||||
when 'new'
|
when 'new'
|
||||||
|
|
@ -49,10 +43,6 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def format_role(role)
|
|
||||||
role.parameterize.underscore
|
|
||||||
end
|
|
||||||
|
|
||||||
def target_progress_color(progress)
|
def target_progress_color(progress)
|
||||||
progress = progress.to_i
|
progress = progress.to_i
|
||||||
result =
|
result =
|
||||||
|
|
@ -143,22 +133,6 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def getdatetime(registration, field)
|
|
||||||
if registration.send(field.to_sym).kind_of?(String)
|
|
||||||
DateTime.parse(registration.send(field.to_sym)).strftime('%d %b %H:%M') if registration.send(field.to_sym)
|
|
||||||
else
|
|
||||||
registration.send(field.to_sym).strftime('%d %b %H:%M') if registration.send(field.to_sym)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def getdate(var)
|
|
||||||
if var.kind_of?(String)
|
|
||||||
DateTime.parse(var).strftime('%a, %d %b')
|
|
||||||
else
|
|
||||||
var.strftime('%a, %d %b')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def show_time(length)
|
def show_time(length)
|
||||||
h = length / 60
|
h = length / 60
|
||||||
min = length - h * 60
|
min = length - h * 60
|
||||||
|
|
@ -174,10 +148,6 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def pre_registered(event)
|
|
||||||
@conference.program.events.joins(:registrations).where('events.id = ?', event.id)
|
|
||||||
end
|
|
||||||
|
|
||||||
def add_association_link(association_name, form_builder, div_class, html_options = {})
|
def add_association_link(association_name, form_builder, div_class, html_options = {})
|
||||||
link_to_add_association 'Add ' + association_name.to_s.singularize, form_builder, div_class, html_options.merge(class: 'assoc btn btn-success')
|
link_to_add_association 'Add ' + association_name.to_s.singularize, form_builder, div_class, html_options.merge(class: 'assoc btn btn-success')
|
||||||
end
|
end
|
||||||
|
|
@ -303,14 +273,6 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def sign_up_path
|
|
||||||
if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
|
||||||
new_user_ichain_registration_path
|
|
||||||
else
|
|
||||||
new_user_registration_path
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def unread_notifications(user)
|
def unread_notifications(user)
|
||||||
Comment.accessible_by(current_ability).find_since_last_login(user)
|
Comment.accessible_by(current_ability).find_since_last_login(user)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue