From a5ecaeeef9d7ec7749fa2f47b601b26c8e008843 Mon Sep 17 00:00:00 2001 From: nimrodshn Date: Thu, 26 Jan 2017 17:41:39 +0200 Subject: [PATCH] Fixed node id for policy after coming from an event Added fix to bug on conditions accord --- app/views/miq_policy/_condition_list.html.haml | 2 +- app/views/miq_policy/_event_details.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/miq_policy/_condition_list.html.haml b/app/views/miq_policy/_condition_list.html.haml index cd4a470525c..9acc4b7d0fb 100644 --- a/app/views/miq_policy/_condition_list.html.haml +++ b/app/views/miq_policy/_condition_list.html.haml @@ -14,7 +14,7 @@ %tbody - @conditions.each do |c| %tr{:title => _("View this Condition"), - :onclick => "miqTreeActivateNode('condition_tree', 'xx-#{c.towhat.downcase}_co-#{to_cid(c.id)}');"} + :onclick => "miqTreeActivateNode('condition_tree', 'xx-#{c.towhat.camelize(:lower)}_co-#{to_cid(c.id)}');"} %td.narrow %i.product.product-miq_condition %td diff --git a/app/views/miq_policy/_event_details.html.haml b/app/views/miq_policy/_event_details.html.haml index e523276e5f3..61ca0411a0d 100644 --- a/app/views/miq_policy/_event_details.html.haml +++ b/app/views/miq_policy/_event_details.html.haml @@ -23,7 +23,7 @@ %table.table.table-striped.table-bordered.table-hover %tbody - @event_policies.each do |p| - - id = "xx-#{p.mode.downcase}_xx-#{p.mode.downcase}-#{p.towhat.downcase}_p-#{to_cid(p.id)}" + - id = "xx-#{p.mode.downcase}_xx-#{p.mode.downcase}-#{p.towhat.camelize(:lower)}_p-#{to_cid(p.id)}" %tr{:title => _("Click to view Policy"), :onclick => remote_function(:url => "/miq_policy/x_show/#{id}?accord=policy")} %td.narrow