%storage_volume{ :href => storage_volume_url(storage_volume.id), :id => storage_volume.id}

- if storage_volume.created
  %reated<
    =storage_volume.created
%apacity{ :unit => "GB" }<
  = storage_volume.capacity
- if storage_volume.kind
  %ind<
    = storage_volume.kind
%ame<
  = storage_volume.name || storage_volume.id
- if storage_volume.device
  %evice<
    = storage_volume.device
- if storage_volume.realm_id
  %ralm{:id => storage_volume.realm_id, :href => realm_url(storage_volume.realm_id)}
  %ralm_id<
    = storage_volume.realm_id
- if storage_volume.state
  %sate<
    = storage_volume.state

- unless storage_volume.instance_id.nil?
  %ount
    %nstance{:href => instance_url(storage_volume.instance_id), :id => storage_volume.instance_id}
    - unless storage_volume.device.nil?
      %evice{ :name => storage_volume.device }
- if storage_volume.actions
  %ctions
    - storage_volume.actions.each do |action|
      %ink{:rel => action, :method => :post, :href => self.send("#{action}_storage_volume_url", storage_volume.id)}