Sha256: a8cb9229e4ad87af118fd72c684d7e9003e0ca4229fb526669a326127c0982c9

Contents?: true

Size: 1.59 KB

Versions: 3

Compression:

Stored size: 1.59 KB

Contents

<% @page_title = @toolbar_title = "List Redirects" %>
<% content_for(:html_head) do %>
  <% javascript_tag do %>
    jQuery(function($){
      $('table.data tbody tr').hover(function(){
        $(this).addClass('hover')
      }, function(){
        $(this).removeClass('hover')
      }).click(function(){
        var match = this.id.match(/(.*)_(\d+)/) 
        var type = match[1];
        var id = match[2];
        $('table.data tbody tr').removeClass('selected');
        $(this).addClass('selected');
        $('#edit_button').removeClass('disabled').attr('href', '/cms/redirects/'+id+'/edit');
        $('#delete_button').removeClass('disabled').attr('href', '/cms/redirects/'+id)
      })
    })
  <% end %>
<% end %>
<% content_for :functions do %>
<%= link_to(span_tag("Add"), new_cms_redirect_path, :class => "button") %>
<%= link_to(span_tag("Edit"), '#', :id => 'edit_button', :class => "button disabled") %>
<%= link_to span_tag("Delete"), "#", :id => "delete_button", :class => "button disabled http_delete", :onclick => "return confirm('Are you sure you want to delete this redirect?')" %>
<% end %>
<div class="roundedcorners">
<table class="data">
  <thead>
  <tr>
    <th class="first"></th>
    <th style="width: 48%;"><div class="dividers">From</div></th>
    <th>To</th>
    <th class="last"></th>
  </tr>
  </thead>
  <% @redirects.each do |redirect| %>
    <tr id="redirect_<%= redirect.id %>">
      <td class="first"></td>
      <td><div class="dividers"><%=h redirect.from_path %></div></td>
      <td><%=h redirect.to_path %></td>
      <td class="last"></td>
    </tr>
  <% end %>
</table>
</div>

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
nate-browsercms-3.0.210 app/views/cms/redirects/index.html.erb
nate-browsercms-3.0.211 app/views/cms/redirects/index.html.erb
browsercms-3.0.0 app/views/cms/redirects/index.html.erb