Sha256: 9f6919f67fd3a22440b01d96ad53dfa2a8213a63cb142c375177f41ebd850260

Contents?: true

Size: 1.77 KB

Versions: 2

Compression:

Stored size: 1.77 KB

Contents

= render partial: 'form', locals: {caption: 'Update block'}

%fieldset
  %legend Layers in block '#{@block.name}'

  %table.table.table-striped.table-hover
    %thead
      %tr
        %th Name
        %th Thumbnail
        %th Starts
        %th Ends
        %th Z-Index
        %th Actions

    %tbody.layer_list
      - @block.layers.ordered_by_scroll_start.each do |layer|
        %tr.ui-state-default{'data-layer-id' => layer.id}

          %td.name
            = "#{ layer.name } #{ layer.active ? '' : '(disabled)' }"

          %td.thumb
            = image_tag layer.image.thumb.url if layer.image?

          %td.starts
            = layer.scroll_start

          %td.ends
            = layer.scroll_end

          %td.z-index
            = layer.z_index

          %td.action
            = link_to Flms::LayerViewObject.link_path_for(@block, layer), class: 'btn edit', id: "edit-layer-#{ layer.id }", title: 'edit' do
              %i.icon-pencil

            = link_to block_layer_path(@block, layer), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn delete', id: "delete-layer-#{ layer.id }", title: 'delete' do
              %i.icon-trash

  %br

  = link_to new_block_image_layer_path(@block), class: 'btn btn-success' do
    %i.icon-plus.icon-white
    Add Image Layer

  = link_to new_block_text_layer_path(@block), class: 'btn btn-success' do
    %i.icon-plus.icon-white
    Add Text Layer

  = link_to new_block_paragraph_layer_path(@block), class: 'btn btn-success' do
    %i.icon-plus.icon-white
    Add Paragraph Layer

  = link_to new_block_embed_layer_path(@block), class: 'btn btn-success' do
    %i.icon-plus.icon-white
    Add Embed Layer

  = link_to new_block_animation_layer_path(@block), class: 'btn btn-success' do
    %i.icon-plus.icon-white
    Add Animation Layer

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flms-0.9.0 app/views/flms/blocks/edit.html.haml
flms-0.1.0 app/views/flms/blocks/edit.html.haml