Sha256: 8680139bab07d3418b5c5b13d71f2079dc293d2aed97cfc255d8de883a4f0236

Contents?: true

Size: 939 Bytes

Versions: 3

Compression:

Stored size: 939 Bytes

Contents

%h1= root

- if parent
  %a{ :href => parent.empty? ? "/#{idx}" : "/#{idx}#{parent}", :class => "parent" }
    ↪ Back to parent
- else
  %a{ :href => "/", :class => "parent" }
    ↪ Back to selection

%h2
  %span.path= request.path_info.empty? ? '/' : request.path_info

%table
  -contents.each_with_index do |f, i|
    %tr
      %td
        %a{ :href => "/#{idx}#{request.path_info}/#{File.basename(f)}" }
          ="#{request.path_info}/#{File.basename(f)}"


%form.add
  %p Add a file in this directory
  %input{:type => 'text', :name => "path", :class => "edit" }
  %input{:type => 'submit', :value => "New file" }

%form.upload{ :method => "post", :enctype => "multipart/form-data", :action => "/#{idx}#{request.path_info}?mode=upload" }
  %p Upload a file to this directory
  %input{:type => 'file', :value => "Select a file", :name => "file", :class => "uploader" }
  %input{:type => 'submit', :value => "Upload file"}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gitdocs-0.3.4 lib/gitdocs/views/dir.haml
gitdocs-0.3.3 lib/gitdocs/views/dir.haml
gitdocs-0.3.2 lib/gitdocs/views/dir.haml