Sha256: b84810b35a216233d21f956ea4c67e69906de6a4d90614e611a9544c8a91f341

Contents?: true

Size: 1.89 KB

Versions: 7

Compression:

Stored size: 1.89 KB

Contents

- @title = "Settings"

%form{:method => 'POST', :action => '/settings'}
  %h2 Gitdocs
  #config.field.config
    %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}
    %span Open browser on startup?

  %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, :class => "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}
      .notify.field
        %input{:type =>'hidden', :value => '0', :name=>"share[#{idx}][notification]"}
        %input{:type =>'checkbox', :value => '1', :name=>"share[#{idx}][notification]", :checked => share.notification ? 'checked' : nil}
        %span Notifications?
      .delete
        %input{:type =>'button', :value => "Delete", :class => "btn danger"}
        %input{:type =>'hidden', :name=>"share[#{idx}][delete]"}

  %input{:value => 'Save', :type => 'submit', :class => "btn primary" }

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gitdocs-0.4.7 lib/gitdocs/views/settings.haml
gitdocs-0.4.6 lib/gitdocs/views/settings.haml
gitdocs-0.4.5 lib/gitdocs/views/settings.haml
gitdocs-0.4.3 lib/gitdocs/views/settings.haml
gitdocs-0.4.2 lib/gitdocs/views/settings.haml
gitdocs-0.4.1 lib/gitdocs/views/settings.haml
gitdocs-0.4.0 lib/gitdocs/views/settings.haml