module HomeHelper def file_manager_table(dir = @current_dir, id = "file_manager_table", class_option = "table table-striped table-bordered jambo_table") html = String.new html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" files(dir).each do |file| html << "" if file["auth"][0]=='d' html << "" else conv_name = (dir + '/' + file['name']).gsub("/", "+") html << "" end html << "" html << "" html << "" html << "" end html << "" html << "
NameauthSizeDate
" html << "" html << " #{dir}" html << "" html << "
" html << " #{file['name']}" html << "" html << " #{file['name']}" html << "#{file['auth']}#{file['size']}#{file["date"]}" html << "" html << "
" return html end def disk_usage_table(dir = @current_dir) html = String.new html << "" html << "" html << "" html << "" html << "" html << "" html << "
" html << "

Chart

" html << "
" html << "
" html << "

Name

" html << "
" html << "

Usage

" html << "
" html << "" get_du(dir).each_with_index do |file, index| color = ['blue', 'green', 'red', 'purple', 'grey'][index % 5] html << "" html << "" html << "" end html << "
" html << "

" html << file['file_name'] html << "

" html << format("%.2f", file['usage']*100) + "%" html << "

" html << "
" return html end end