From: Michal Fojtik <[email protected]>
Signed-off-by: Michal fojtik <[email protected]> --- server/views/hardware_profiles/index.html.haml | 2 +- server/views/hardware_profiles/index.xml.haml | 4 ++-- server/views/hardware_profiles/show.html.haml | 6 +++--- server/views/hardware_profiles/show.xml.haml | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/views/hardware_profiles/index.html.haml b/server/views/hardware_profiles/index.html.haml index 64e3455..59d43eb 100644 --- a/server/views/hardware_profiles/index.html.haml +++ b/server/views/hardware_profiles/index.html.haml @@ -3,7 +3,7 @@ %div{ :'data-role' => :content, :'data-theme' => 'c'} %ul{ :'data-role' => :listview, :'data-inset' => :true } - - for profile in @profiles + - for profile in @hardware_profiles %li{ :'data-theme' => 'c'} %a{ :href => hardware_profile_url(profile.name)} %img{ :class => 'ui-link-thumb', :src => '/images/profile.png'} diff --git a/server/views/hardware_profiles/index.xml.haml b/server/views/hardware_profiles/index.xml.haml index cf0a69f..25e0496 100644 --- a/server/views/hardware_profiles/index.xml.haml +++ b/server/views/hardware_profiles/index.xml.haml @@ -1,4 +1,4 @@ !!! XML %hardware_profiles - - @profiles.each do |prof| - = haml :'hardware_profiles/show', :locals => { :@profile => prof, :partial => true } + - @hardware_profiles.each do |prof| + = haml :'hardware_profiles/show', :locals => { :@hardware_profile => prof, :partial => true } diff --git a/server/views/hardware_profiles/show.html.haml b/server/views/hardware_profiles/show.html.haml index c27690e..033e94d 100644 --- a/server/views/hardware_profiles/show.html.haml +++ b/server/views/hardware_profiles/show.html.haml @@ -1,12 +1,12 @@ =header "Hardware profiles" -=subheader @profile.name +=subheader @hardware_profile.name %div{ :'data-role' => :content, :'data-theme' => 'c'} %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'} %li{ :'data-role' => 'list-divider'} Name %li - %p{ :'data-role' => 'fieldcontain'}[email protected] - - @profile.each_property do |p| + %p{ :'data-role' => 'fieldcontain'}=@hardware_profile.name + - @hardware_profile.each_property do |p| %li{ :'data-role' => 'list-divider'} #{p.name.to_s.titlecase} %li %p{ :'data-role' => 'fieldcontain'} diff --git a/server/views/hardware_profiles/show.xml.haml b/server/views/hardware_profiles/show.xml.haml index 094ffd5..21e488c 100644 --- a/server/views/hardware_profiles/show.xml.haml +++ b/server/views/hardware_profiles/show.xml.haml @@ -1,9 +1,9 @@ - unless defined?(partial) !!! XML -%hardware_profile{ :href => hardware_profile_url(@profile.name), :id => @profile.name } +%hardware_profile{ :href => hardware_profile_url(@hardware_profile.name), :id => @hardware_profile.name } %name< - [email protected] - - @profile.each_property do |prop| + = @hardware_profile.name + - @hardware_profile.each_property do |prop| - attr = { :name => prop.name, :kind => prop.kind, :unit => prop.unit } - if prop.kind == :fixed %property{ attr, :value => prop.value }/ -- 1.7.10
