views: removed unused helpers.

This commit is contained in:
evazion
2019-09-10 15:21:48 -05:00
parent 372fd7df1b
commit ffccc503f7

View File

@@ -12,10 +12,6 @@ module ApplicationHelper
raw(wordbreaked_string)
end
def pro_fontawesome_enabled?
request.domain =~ /donmai\.us/
end
def nav_link_to(text, url, **options)
klass = options.delete(:class)
@@ -169,16 +165,6 @@ module ApplicationHelper
simple_form_for(:search, method: :get, url: url, defaults: defaults, html: html_options, &block)
end
def search_field(method, label: method.titleize, hint: nil, value: nil, **attributes)
content_tag(:div, class: "input") do
label_html = label_tag("search_#{method}", label)
input_html = text_field_tag(method, value, id: "search_#{method}", name: "search[#{method}]", **attributes)
hint_html = hint.present? ? content_tag(:p, hint, class: "hint") : ""
label_html + input_html + hint_html
end
end
def body_attributes(user = CurrentUser.user)
attributes = [:id, :name, :level, :level_string, :can_approve_posts?, :can_upload_free?]
attributes += User::Roles.map { |role| :"is_#{role}?" }