Sha256: 37f79a2cbcfa2fc9f6aeedb18b3418a491619df7a8504bc1099d0fa28d5b745c

Contents?: true

Size: 1.83 KB

Versions: 4

Compression:

Stored size: 1.83 KB

Contents

<%% if not request.xhr? %>
<div id="<%%= params[:scaffold_id] %>" class="ajax-scaffold">
  <div id="<%%= scaffold_content_id(params) %>">
<%% end %>
    <div class="ajax-scaffold-header">
      <div class="actions">  
        <%% new_params = params.merge(:controller => '<%= controller_file_path %>', :action => 'new') %>
        <%%= loading_indicator_tag(new_params) %>
        <%%= link_to_remote "Create New",
          { :url => new_params,
            :loading => "Element.show('#{loading_indicator_id(new_params)}');" },
          { :href => url_for(new_params), 
			      :class => "create" } %> 		 
      </div>
      <h2><%= Inflector.titleize(plural_name) %></h2>
  </div>
  <table cellpadding="0" cellspacing="0">
  <thead>  
    <tr> 
      <%%= render :partial => 'column_headings' %>
    </tr> 
  </thead>
  <tbody>
    <tr>
      <td colspan="<%%= num_columns %>" class="messages-container">
        <div id="<%%= scaffold_messages_id(params) %>">
          <%%= render :partial => 'messages' %>
        </div>
        <p id="<%%= empty_message_id(params) %>" class="empty-message" <%%= " style=\"display:none;\" " if !@<%= plural_name %>.empty? %>>
          No Entries
        </p>      
      </td>
    </tr>
  </tbody>  
  <tbody id="<%%= scaffold_tbody_id(params) %>">
    <%% if !@<%= plural_name %>.empty? %>
  	  <%%= render :partial => '<%= singular_name %>', :collection => @<%= plural_name %>, :locals => { :hidden => false } %>
    <%% end %>
  </tbody>
</table>
<div class="ajax-scaffold-footer">
  <%%= render :partial => 'pagination_links', :locals => { :paginator => @paginator } %>
</div>
<%% if not request.xhr? %>
</div>
</div>

<script type="text/javascript">
Rico.Corner.round('<%%= params[:scaffold_id] %>', {color: '#005CB8', bgColor: '#fff', compact: true});
</script>
<%% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ajax_scaffold_generator-3.0.4 templates/view_component.rhtml
ajax_scaffold_generator-3.1.0 templates/view_component.rhtml
ajax_scaffold_generator-3.1.1 templates/view_component.rhtml
ajax_scaffold_generator-3.1.2 templates/view_component.rhtml