Sha256: 5d4a810d65f1587f7260cff519853ad97f6e9a5e09aa65a9730e3f8d1e7e192d

Contents?: true

Size: 1.9 KB

Versions: 2

Compression:

Stored size: 1.9 KB

Contents

%h1 Settings

%form{:method => 'POST', :action => '/settings'}
  %h2 Gitdocs
  %div{:id => "config", :class => "config"}
    %dl
      %dt Open browser on startup?
      %dd
        %input{:type =>'hidden', :value => '0', :name=>"config[load_browser_on_startup]"}
        %input{:type =>'checkbox', :value => '1', :name=>"config[load_browser_on_startup]", :checked => conf.global.load_browser_on_startup ? 'checked' : nil}


  %h2 Shares
  -conf.shares.each_with_index do |share, idx|
    %div{:id => "share-#{idx}", :class => "share #{idx % 2 == 0 ? 'even' : 'odd'}"}
      %dl
        %dt Path
        %dd
          %input{:name=>"share[#{idx}][path]", :value => share.path}
      %dl
        %dt Polling interval
        %dd
          %input{:name=>"share[#{idx}][polling_interval]", :value => share.polling_interval}
      -if share.available_remotes
        %dl
          %dt Remote
          %dd
            %select{:name=>"share[#{idx}][remote_branch]"}
              -share.available_remotes.each do |remote|
                %option{:value => remote, :selected => remote == "#{share.remote_name}/#{share.branch_name}" ? 'selected' : nil}
                  =remote
      -else

        %dl
          %dt Remote
          %dd
            %input{:name=>"share[#{idx}][remote_name]", :value => share.remote_name}
        %dl
          %dt Branch
          %dd
            %input{:name=>"share[#{idx}][branch_name]", :value => share.branch_name}
      %dl
        %dt Notifications?
        %dd
          %input{:type =>'hidden', :value => '0', :name=>"share[#{idx}][notification]"}
          %input{:type =>'checkbox', :value => '1', :name=>"share[#{idx}][notification]", :checked => share.notification ? 'checked' : nil}
      %dl.delete
        %dt Delete
        %dd
          %input{:type =>'button', :value => "Delete"}
          %input{:type =>'hidden', :name=>"share[#{idx}][delete]"}
  %input{:value => 'Save', :type => 'submit'}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gitdocs-0.3.6 lib/gitdocs/views/settings.haml
gitdocs-0.3.5 lib/gitdocs/views/settings.haml