Sha256: 585400d575dd8bb5a56c1da92c358efc8ab21e77ad2b34120d93aa7d7df81dd5

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

%a(href="/entity_list/#{ type }/#{ id }") View

%form(action="#{File.join('/entity_list', type, 'copy', id)}" method='post')
  %label Copy as:
  %input(name='new_id')
  %input(type='submit')

%form(action="#{File.join('/entity_list', type, 'add', id)}" method='post')
  %label Add other list:
  %select.loaded_lists(name="other_list" type=type)
  %input(type='submit')

%form(action="#{File.join('/entity_list', type, 'subset', id)}" method='post')
  %label Subset other list:
  %select.loaded_lists(name="other_list" type=type)
  %input(type='submit')

%form(action="#{File.join('/entity_list', type, 'remove', id)}" method='post')
  %label Remove other list:
  %select.loaded_lists(name="other_list" type=type)
  %input(type='submit')


%ul.entity_list
  - list.each do |entity|
    - values = {}
    - types = {}
    - entity.info.each{|k,v| values[k] = String === v ? v : v.to_json; types[k] = :string }

    %li(id="#{entity.id}")
      = entity.respond_to?(:link) ? entity.link : entity
      \.
      %a.DELETE.remove_entity_from_list(rel="#{entity.id}" href="/entity_list/#{ type }/#{ entity }/#{ id }") remove
      -#- form_id = "edit_entity_#{id}_#{entity.to_s}".gsub(/\s/, '_')
      -#%a.open_edit_controls(href="#edit_controls" ref=form_id) edit
      -#.edit_controls
      -#  - action = File.join("/entity_list", type, entity, id)
      -#  = workflow_partial('partials/_form', workflow, :values => values, :inputs => values.keys, :input_types => types, :action => action, :method => "post", :id => form_id)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rbbt-views-1.0.1 share/views/edit_list.haml