Sha256: 9f3246f5fe9dde5c979afd89f0fe5eb53a0a4450e77af436158be01d26339c82
Contents?: true
Size: 1.7 KB
Versions: 2
Compression:
Stored size: 1.7 KB
Contents
<%%= stylesheet( 'dust_<%=parent_singular_name%>','uploadify') %> <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $(function () { // this line makes sure this code runs on page load $('.checkall').click(function () { $(this).parents('form:eq(0)').find(':checkbox').attr('checked', this.checked); }); }); }); </script> <div class='<%=child_singular_name%>list'> <h1><%%= link_to @<%=parent_singular_name%>.title, <%=parent_singular_name%>_path(@<%=parent_singular_name%>) %></h1> <%% form_tag '/<%=child_plural_name%>/destroy' do %> <table class='<%=child_plural_name%>'> <tr style='color:#222;'> <th> </th> <th></th> <th> File Name </th> <th> File Size </th> <th> Created At </th> </tr> <%% @<%=parent_singular_name%>.<%=child_plural_name%>.each do |<%=child_singular_name%>| %> <tr class='<%%= cycle('odd', 'even')%>'> <td> <%%= check_box_tag "<%=child_singular_name%>_ids[]", <%=child_singular_name%>.id %> </td> <td> <%%= image_tag(<%=child_singular_name%>.file.url(:thumb), :height => "60") %> <div style="display:none"><div id="<%%=<%=child_singular_name%>.id%>"><%%= image_tag(<%=child_singular_name%>.file.url(:original)) %></div></div> </td> <td> <%%= <%=child_singular_name%>.file_file_name %> </td> <td> <%%= number_to_human_size(<%=child_singular_name%>.file_file_size) %> </td> <td> <%%= <%=child_singular_name%>.created_at.to_s(:m_d_y) %> </td> </tr> <%% end %> <tr class='odd'> <td colspan='5'> <input type="checkbox" class="checkall"> Check all <%%= submit_tag "Delete checked" %> </td> </tr> </table> <%% end -%> </div>
Version data entries
2 entries across 2 versions & 1 rubygems