Sha256: b6d6eac1f2649ff3c86f1ae5a3c0581378d80ed30d0ec8da9757b810746f5ded

Contents?: true

Size: 874 Bytes

Versions: 2

Compression:

Stored size: 874 Bytes

Contents

%h2 Redirects index
%a= link_to 'New redirect', '/redirects/new'
%table#redirects
  %thead
    %tr
      %th D&D to reorder
      %th Pattern
      %th Redirect to
      %th  
  %tbody
    - @redirects.each do |r|
      %tr{:id => "redirect_#{r.id}"}
        %td.text-center.handle
          %span.ui-icon.ui-icon-arrowthick-2-n-s
        %td= r.pattern
        %td= r.to
        %td.edit-link.text-center.white-space-nowrap
          = link_to 'Edit', "/redirects/#{r.id}/edit"
          |
          %a.delete_link{:href => "/redirects/#{r.id}"} Delete

:javascript
  $(function() {
    $('#redirects tbody').sortable({
      handle: 'td.handle',
      cursors: 'crosshair',
      stop: function() {
        $.post('/redirects/reorder', $(this).sortable('serialize') + '&_method=put', function(data) {
            $.jGrowl(data);
        });
      }
    });
  });

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rest-assured-0.1.1 views/redirects/index.haml
rest-assured-0.1.0 views/redirects/index.haml