app/helpers/application_helper.rb
# Function returns a HTML fragment that represents a link to related entity
# or list of related entities of certain type in case of a condition being
# met or information about non-existence of such entity if condition is not
# met.
#
# args
#     :cond         --- bool    - the condition to be met
#     :table/tables --- string  - name of entity
#                               - determines singular/plural case
#     :link_text    --- string  - to override calculated link text
#     :display      --- string  - FIXME
#     :[count]      --- fixnum  - number of entities, must be set if :tables
#                                 is used
#   args to construct URL
#     :[controller] --- controller name
#     :[action]     --- controller action
#     :record_id    --- id of record
#
Function returns a HTML fragment that represents a link to related entity
or list of related entities of certain type in case of a condition being
met or information about non-existence of such entity if condition is not
met.


Function returns a HTML fragment that represents a link to related entity or list of related entities of certain type in case of a condition being met or information about non - existence of such entity if condition is not met .
def li_link(args)
    args[:if] = (args[:count] != 0) if args[:count]
    link_text, title = build_link_text(args)
    if args[:if]
      link_params = {
        :action  => args[:action].present? ? args[:action] : 'show',
        :display => args[:display],
        :id      => args[:record_id].to_s
      }
      link_params[:controller] = args[:controller] if args.key?(:controller)
      tag_attrs = {:title => title}
      check_changes = args[:check_changes] || args[:check_changes].nil?
      tag_attrs[:onclick] = 'return miqCheckForChanges()' if check_changes
      content_tag(:li) do
        if args[:record] && restful_routed?(args[:record])
          link_to(link_text, polymorphic_path(args[:record], :display => args[:display]))
        else
          link_to(link_text, link_params, tag_attrs)
        end
      end
    else
      content_tag(:li, :class => "disabled") do
        link_to(link_text, "#")
      end
    end
  end
def li_link ( args ) args [ :if ] = ( args [ :count ] != 0 ) if args [ :count ] link_text , title = build_link_text ( args ) if args [ :if ] link_params = { :action => args [ :action ] . present? ? args [ :action ] : 'show' , :display => args [ :display ] , :id => args [ :record_id ] . to_s } link_params [ :controller ] = args [ :controller ] if args . key? ( :controller ) tag_attrs = { :title => title } check_changes = args [ :check_changes ] || args [ :check_changes ] . nil? tag_attrs [ :onclick ] = 'return miqCheckForChanges()' if check_changes content_tag ( :li ) do if args [ :record ] && restful_routed? ( args [ :record ] ) link_to ( link_text , polymorphic_path ( args [ :record ] , :display => args [ :display ] ) ) else link_to ( link_text , link_params , tag_attrs ) end end else content_tag ( :li , :class => "disabled" ) do link_to ( link_text , "#" ) end end end
Function returns a HTML fragment that represents a link to related entity
or list of related entities of certain type in case of a condition being
met or information about non-existence of such entity if condition is not
met.
Function returns a HTML fragment that represents a link to related entity or list of related entities of certain type in case of a condition being met or information about non - existence of such entity if condition is not met .
args
<not_specific>