41 lines
1.1 KiB
Ruby
41 lines
1.1 KiB
Ruby
module ApplicationHelper
|
|
def helper_metadata(type)
|
|
@list = ""
|
|
downloads = ["0-50", "51-100", "101-150", "151UP"]
|
|
if type == "extensions"
|
|
content = [
|
|
["File Size", (((120 + rand(1500))/10.to_f).to_s + "MB")],
|
|
["Downloads", downloads[rand(200)/50]],
|
|
["Operating Systems", "Orbit " + ((40 + rand(9))/10.to_f).to_s]
|
|
]
|
|
elsif type == "templates"
|
|
content = [
|
|
["File Size", (((120 + rand(1500))/10.to_f).to_s + "MB")]
|
|
]
|
|
end
|
|
content.each do |n|
|
|
@list += content_tag(:div, (content_tag(:div, n[0].to_s, :class => "title")+content_tag(:div, n[1].to_s, :class => "content")), :class => "meta-info col-md-3");
|
|
end
|
|
return @list
|
|
end
|
|
|
|
def headingTitle(title, moreLink)
|
|
@title = content_tag(:h2, title, :class => "heading-title")
|
|
if moreLink
|
|
@title += content_tag(:div, (link_to "More", moreLink), :class => "more")
|
|
end
|
|
return content_tag(:div, @title, :class => "heading")
|
|
end
|
|
|
|
def routingLoad(a)
|
|
case a
|
|
when a = /\?/
|
|
return "modules/sort"
|
|
when a = /\/templates/
|
|
return "templates"
|
|
else
|
|
return "nil"
|
|
end
|
|
end
|
|
end
|