app/controllers/application_controller/expression_html.rb
# Build a string from an array of expression symbols by recursively traversing the MiqExpression object
#   and inserting sequential tokens for each expression part
Build a string from an array of expression symbols by recursively traversing the MiqExpression object
and inserting sequential tokens for each expression part
Build a string from an array of expression symbols by recursively traversing the MiqExpression object and inserting sequential tokens for each expression part
def join_binary(exp, operation, color)
    ViewHelper.capture do
      ViewHelper.concat_tag(:font, :color => color) do
        ViewHelper.content_tag(:strong, '(')
      end
      exps = exp[operation].map do |e|
        ViewHelper.content_tag(:font, :color => calculate_font_color(e['result'])) do
          exp_str, = exp_build_string(e)
          exp['result'] && !e['result'] ? ViewHelper.content_tag(:i, exp_str) : exp_str
        end
      end
      glue = ViewHelper.content_tag(:font, :color => color) do
        ViewHelper.content_tag(:strong, " #{operation.upcase} ")
      end
      ViewHelper.concat(ViewHelper.safe_join(exps, glue))
      ViewHelper.concat_tag(:font, :color => color) do
        ViewHelper.content_tag(:strong, ')')
      end
    end
  end
def join_binary ( exp , operation , color ) ViewHelper . capture do ViewHelper . concat_tag ( :font , :color => color ) do ViewHelper . content_tag ( :strong , '(' ) end exps = exp [ operation ] . map do | e | ViewHelper . content_tag ( :font , :color => calculate_font_color ( e [ 'result' ] ) ) do exp_str , = exp_build_string ( e ) exp [ 'result' ] && ! e [ 'result' ] ? ViewHelper . content_tag ( :i , exp_str ) : exp_str end end glue = ViewHelper . content_tag ( :font , :color => color ) do ViewHelper . content_tag ( :strong , " #{operation.upcase} " ) end ViewHelper . concat ( ViewHelper . safe_join ( exps , glue ) ) ViewHelper . concat_tag ( :font , :color => color ) do ViewHelper . content_tag ( :strong , ')' ) end end end
Build a string from an array of expression symbols by recursively traversing the MiqExpression object
and inserting sequential tokens for each expression part
Build a string from an array of expression symbols by recursively traversing the MiqExpression object and inserting sequential tokens for each expression part
exp
<not_specific>
operation
<not_specific>
color
<not_specific>