%h1 View/Edit volume
%form{ :action => volumes_url }
%input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
%input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
%input{ :name => :refreshURI, :type => :hidden, :value => volumes_url }/
%p
%label
Name:
%p
%input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style => "width:50%;" }
%input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"] }
%p
%br
%label
Description:
%p
%textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;" } #{@dmtfitem['description']}
%p
%br
%label
Properties:
%p
%table{ :style => "width:50%;", :id => "propertyTable"}
- if @dmtfitem["property"]
- if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
- property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
- else
- property_object = @dmtfitem["property"]
- iter = -1
- property_object.each_pair do |key, value|
- iter += 1
%tr
%td
%input{ :name => "param_name_" + iter.to_s, :size => 30, :value => key }
%td
%input{ :name => "param_value_" + iter.to_s, :size => 30, :value => value["content"] }
%td
%input{ :type => :button, :value => "Remove", :onClick => "return removeProperty(this)" }
%input{ :type => :button, :name => "commit", :value => "Add new property", :onClick => "return AddNewPproperty('propertyTable')" }
%p
%br
%label
Capacity:
%p
%input{ :name => :capacity_quantity, :size => 20, :value => @dmtfitem["capacity"]["quantity"], :style => "width:10%;" }
%input{ :name => :capacity_units, :size => 20, :value => @dmtfitem["capacity"]["units"], :style => "width:10%;" }
%br
%label
EntityMetadata:
%br
:javascript
function fixupXml(theNode) {
var xmlData = "";
xmlData += "<" + $(theNode.form).attr("xmlRootNode").value + " xmlns='http://www.dmtf.org/cimi'>";
xmlData += getStandardData(theNode);
xmlData += "" + $(theNode.form).attr("cpu").value + "";
xmlData += ""
var index=0;
xmlData += "" + $(theNode.form).attr("xmlRootNode").value + ">";
return xmlData;
}