socialforge/app/helpers/open_source_projects_helper.rb

47 lines
1.6 KiB
Ruby
Raw Normal View History

2014-03-29 10:57:36 +08:00
module OpenSourceProjectsHelper
def render_opensource_project(os_projects)
2014-04-21 08:54:11 +08:00
s=''.html_safe
2014-03-29 10:57:36 +08:00
s << "<ul class='projects'>\n"
os_projects.each do |project|
s << "<li class='project-table'><div class='#{classes}'>"
s << "div class='root'"
s << "</div>\n"
s << "</li>\n"
end
s << "</ul>"
end
2014-04-21 08:54:11 +08:00
def show_condition(app_dir, language, created_at)
s=''.html_safe
unless app_dir.nil?
s_temp = content_tag('a', app_dir)
temp = link_to 'x', {:controller => "tags", :action => "remove_tag"}, :remote => true
temp = content_tag('span', temp, :class => 'del')
s_temp << temp
s_temp = content_tag('span', s_temp, :class => 'tag_show')
s << content_tag('div', s_temp, :id => 'tag')
end
unless language.nil?
s_temp = content_tag('a', language)
temp = link_to 'x', {:controller => "tags", :action => "remove_tag"}, :remote => true
temp = content_tag('span', temp, :class => 'del')
s_temp << temp
s_temp = content_tag('span', s_temp, :class => 'tag_show')
s << content_tag('div', s_temp, :id => 'tag')
end
unless created_at.nil?
s_temp = content_tag('a', created_at)
temp = link_to 'x', {:controller => "tags", :action => "remove_tag"}, :remote => true
temp = content_tag('span', temp, :class => 'del')
s_temp << temp
s_temp = content_tag('span', s_temp, :class => 'tag_show')
s << content_tag('div', s_temp, :id => 'tag')
end
s = content_tag('div', s, :id => 'tags')
# s = content_tag('div', s, :class => 'tags')
end
2014-03-29 10:57:36 +08:00
end