Sha256: c7c4c5f42aac3bd160a162317c98de18cf892988917593d99ed27ebeac17693e

Contents?: true

Size: 1.73 KB

Versions: 4

Compression:

Stored size: 1.73 KB

Contents

= stylesheet_link_tag( 'dust_<%=parent_singular_name%>','<%=parent_singular_name%>_uploadify')

%script{:charset => "utf-8", :type => "text/javascript"}
  $(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);
  });
  });
  });

#<%=child_singular_name%>list
  %h1= link_to @<%=parent_singular_name%>.title, <%=parent_singular_name%>_path(@<%=parent_singular_name%>)

  = form_tag '/destroy-<%=child_plural_name%>' do 

    %table{:class => "<%=child_plural_name%>"}
      %tr{:style => 'color:#222;'}
        %th
        %th
        %th
          File Name
        %th
          File Size
        %th
          Created At
        - @<%=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
              =  image_tag(<%=child_singular_name%>.file.url(:thumb), :height => "60")

              %div{:style => "display:none"}
                %div{:class => <%=child_singular_name%>.id}
                  = image_tag(<%=child_singular_name%>.file.url(:original))
            %td
              = <%=child_singular_name%>.file_file_name
            %td
              = number_to_human_size(<%=child_singular_name%>.file_file_size)
            %td
              = <%=child_singular_name%>.created_at.to_s(:m_d_y)
        %tr{:class => 'odd'}
          %td{ :colspan => '5'}
            = check_box_tag 'photos', 'yes', false, :class => 'checkall'
            Check all
            = submit_tag "Delete checked"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dust-generators-0.3.3 lib/generators/dust/albums/templates/app/views/albums/manage.html.haml
dust-generators-0.3.2 lib/generators/dust/albums/templates/app/views/albums/manage.html.haml
dust-generators-0.3.1 lib/generators/dust/albums/templates/app/views/albums/manage.html.haml
dust-generators-0.2.8 lib/generators/dust/albums/templates/app/views/albums/manage.html.haml