Sha256: 141b54a58312dd1a91c273406c861c8aa68d93259856d9bd61f1b29fd92446da

Contents?: true

Size: 1.26 KB

Versions: 3

Compression:

Stored size: 1.26 KB

Contents

- @title = root

= haml(:_header, locals: { file: false })

- if contents && contents.any?
  %table.condensed-table.zebra-striped#fileListing
    %thead
      %tr
        %th File
        %th Author
        %th Last Modified
        %th Size

    %tbody
      - contents.each do |f|
        %tr
          %td
            %img{ src: "/img/#{f.is_directory ? 'folder' : 'file'}.png", width: 16, height: 16 }
            %a{ href: "#{request.path_info}/#{f.name}" }
              = f.name
          %td.author
          %td.modified
          %td.size

- if contents.empty?
  %p No files were found in this directory.

.row
  .span6
    %form.upload{ method: 'POST', enctype: 'multipart/form-data' }
      %p Upload file to this directory
      %input.uploader{ type: 'file', value: 'Select a file', name: 'file', size: 12 }
      %input.btn.secondary{ type: 'submit', value: 'Upload file' }
  .span8
    %form.add{ method: 'POST' }
      %p Add new file or directory
      %input{ type: 'text', name: 'filename', placeholder: 'somefile.md or somedir' }
      %input.btn.secondary{ type: 'submit', name: 'new_file', value: 'New file' }
      %input.btn.secondary{ type: 'submit', name: 'new_directory', value: 'New directory' }

- if rendered_readme
  .contents
    = preserve rendered_readme

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gitdocs-0.6.2 lib/gitdocs/views/dir.haml
gitdocs-0.6.1 lib/gitdocs/views/dir.haml
gitdocs-0.6.0 lib/gitdocs/views/dir.haml