rosa-build/app/views/platforms/contents/_contents.html.haml

34 lines
1.2 KiB
Plaintext

#contents
= form_for @platform, :url => platform_content_path(@platform, @path), :html => { :class => :form, :remote => true, :method => :get } do |f|
= tracker_search_field(:term, @term.present? ? @term : t('layout.platforms.search_contents'))
= f.submit t('layout.search.header')
%br
.path= build_content_paths(@platform, @path)
.both
%table.tablesorter.project{:cellpadding => "0", :cellspacing => "0"}
%tbody
- if @path.present?
%tr
%td= link_to '../', platform_content_path(@platform, @path, '../'), {:remote => true}
%td
%td
- (@contents.select(&:is_folder?) | @contents).each do |content|
%tr
%td
- options = {:class => 'files-see'}
- if content.is_folder?
- pic = 'folder.png'
- path = platform_content_path(@platform, @path, content.name)
- options[:remote] = true
.pic= image_tag pic || 'code.png'
.name= link_to(content.name, path || content.download_url, options)
%td= link_to t('activerecord.models.build_list'), content.build_list if content.build_list
%td= number_to_human_size(content.size) unless content.is_folder?
.both
= will_paginate @contents, {:remote => true}