Class: WAB::UI::Update

Inherits:
View show all
Defined in:
lib/wab/ui/update.rb

Overview

An object update display.

Instance Attribute Summary

Attributes inherited from Display

#display_class, #kind, #name, #template, #transitions

Instance Method Summary collapse

Methods inherited from View

#append_fields, #spec

Methods inherited from Display

#spec

Constructor Details

#initialize(kind, id, template, transitions) ⇒ Update

TBD pass in fields for the update



9
10
11
# File 'lib/wab/ui/update.rb', line 9

def initialize(kind, id, template, transitions)
  super(kind, id, template, transitions, 'ui.Update')
end

Instance Method Details

#htmlObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/wab/ui/update.rb', line 13

def html
  html = %{<div class="obj-form-frame"><table class="obj-form">}
  html = append_fields(html, @name, template, false)
  html << '</table>'
  html << %{<div class="btn" id="#{@name}.save_button"><span>Save</span></div>}
  html << %{<div class="btn" id="#{@name}.cancel_button"><span>Cancel</span></div>}
  html << %{<div class="btn" id="#{@name}.list_button"><span>List</span></div>}
  html << %{<div class="btn delete-btn" style="float:right;" id="#{@name}.delete_button"><span>Delete</span></div>}
  html << '</div>'
end