Sha256: 7605a07f90d4b6db95937611ac7740dab4d1d0ded69c8aea6ef6a3634ca854fe

Contents?: true

Size: 1.37 KB

Versions: 6

Compression:

Stored size: 1.37 KB

Contents

%h1 Repositories

.repositories
  - if @repositories
    - if @repositories.empty?
      %h2 You Haven't Setup Any Repositories Yet

    - @repositories.each do |repo|
      .repository
        %h3= "#{repo.name} : #{repo.branch}"
        %p
          .panel
            %a{:href=>"#repo-#{repo.id}", :rel=>'facebox'} change
            or 
            %form{:action=>"repositories/#{repo.id}", :method=>:post}
              %input{:type=>:hidden, :name=>:_method, :value=>:delete}
              %input.delete{:type=>:submit, :value=>:delete}

          .panel{:style=>'display:none', :id=>"repo-#{repo.id}"}
            %form{:action=>"repositories/#{repo.id}", :method=>:post}
              = haml :'repositories/form', :locals => { :repository => repo }
              %input{:type=>:hidden, :name=>:_method, :value=>:put}
              %br
              %input{:type=>:submit, :value=>:update, :style=>'margin-top:15px'}

    .new-repository-link.action
      %a{:href=>'#new-repository', :rel=>'facebox'} New Repository

#new-repository{:style=>'display:none'}
  %h2 Add a new repository
  %form{:action=>'repositories', :method=>:post}
    =haml :'repositories/form'
    %input{:type=>:hidden, :name=>:_method, :value=>:post}
    %input{:type=>:submit, :value=>:create}

:javascript
  $('.panel .delete').click(function(e) {
    alert("Are you sure you want to do this? It can't be undone.") });

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
torquebox-stompbox-0.3.3 app/views/repositories/index.haml
torquebox-stompbox-0.3.2 app/views/repositories/index.haml
torquebox-stompbox-0.3.1 app/views/repositories/index.haml
torquebox-stompbox-0.3.0 app/views/repositories/index.haml
torquebox-stompbox-0.2.0 app/views/repositories/index.haml
torquebox-stompbox-0.1.0 app/views/repositories/index.haml