{# # @file # The inner HTML for switching your metacode set #} { metacodes = current_user.settings.metacodes } { selectedSet = metacodes[0].include?("metacodeset") ? metacodes[0].sub("metacodeset-","") : "custom" } { allMetacodeSets = MetacodeSet.order("name").all.to_a } { if selectedSet == "custom" index = allMetacodeSets.length + 2 elsif selectedSet == 'Recent' index = 0 elsif selectedSet == 'Most' index = 1 else set = MetacodeSet.find(selectedSet.to_i) index = allMetacodeSets.index(set) + 2 end }

Switch Metacode Set

Use metacode sets to enter different modes of mapping.

{ recent = user_recent_metacodes() }
{ @list = '' } { recent.each_with_index do |m, index| } { @list += '
  • ' + m.name + '

    ' + m.name.downcase + '

  • ' } { end }

    The 5 Metacodes you've used most recently.

      { @list.html_safe }
    { most_used = user_most_used_metacodes() }
    { @list = '' } { most_used.each_with_index do |m, index| } { @list += '
  • ' + m.name + '

    ' + m.name.downcase + '

  • ' } { end }

    The 5 Metacodes you've used the most.

      { @list.html_safe }
    { allMetacodeSets.each_with_index do |m, localindex| }
    { @list = '' } { m.metacodes.sort{|x,y| x.name <=> y.name }.each_with_index do |m, index| } { @list += '
  • ' + m.name + '

    ' + m.name.downcase + '

  • ' } { end }

    { m.desc }

      { @list.html_safe }
    { end }
    Choose Your Metacodes
    NONE
    ALL
    { @list = '' } { metacodesInUse = user_metacodes() } { Metacode.order("name").all.each_with_index do |m, index| } { mClass = metacodesInUse.index(m) == nil ? "toggledOff" : "" } { @list += '
  • ' + m.name + '

    ' + m.name.downcase + '

  • ' } { end }
      { @list.html_safe }