Sha256: 530d878eb7bd7f3d1c06f2a3a5f1a83cd263ef9205f2ebd5932d5da3d72716d1

Contents?: true

Size: 1.89 KB

Versions: 1

Compression:

Stored size: 1.89 KB

Contents

<% @page_title = @toolbar_title = "List #{dynamic_view_type.name.titleize.pluralize}" %>
<% 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/<%= dynamic_view_type.name.underscore.pluralize %>/'+id+'/edit');
        $('#delete_button').removeClass('disabled').attr('href', '/cms/<%= dynamic_view_type.name.underscore.pluralize %>/'+id)
      })
    })
  <% end %>
<% end %>

<% content_for :functions do %>
  <%= link_to(span_tag("Add"), cms_new_path_for(dynamic_view_type.name.underscore), :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 #{dynamic_view_type.name.underscore.titleize}?')" %>
<% end %>

<div class="roundedcorners">
  <table class="data">
    <tr>
      <th class="first"></th>
      <th><div class="dividers">Name</div></th>
      <th><div>Updated At</div></th>
      <th class="last"></th>
    </tr>
    <% @views.each do |view| %>
      <tr id="<%= dynamic_view_type.name.underscore %>_<%= view.id %>">
        <td class="first"></td>
        <td><div class="dividers" title="<%=h view.file_path %>"><%=h view.display_name %></div></td>
        <td><div><%= view.updated_at && view.updated_at.to_s(:date) %></div></td>
        <td class="last"></td>
      </tr>
    <% end %>
  </table>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
browsercms-3.0.0 app/views/cms/dynamic_views/index.html.erb