<%# # @file # this code generates the list of icons in the filter box in the upper right menu area #%> <% @mappers = [] @synapses = [] @metacodes = [] @metacodelist = '' @mapperlist = '' @synapselist = '' # There are essentially three functions happening here one to fill data to #@mappers with all people who have mapped on the selected map, which #actually gets checked twice once for topics or within @metacodes and once #for synapses on the map. @synapses get filled with all synapses on the map #and metacodes is filled with all the metacodes that are being used on the map. if @map @map.topics.each_with_index do |topic, index| if @metacodes.index(topic.metacode) == nil @metacodes.push(topic.metacode) end if @mappers.index(topic.user) == nil @mappers.push(topic.user) end end @map.synapses.each_with_index do |synapse, index| if @synapses.index{|s| s.desc == synapse.desc} == nil @synapses.push(synapse) end if @mappers.index(synapse.user) == nil @mappers.push(synapse.user) end end @metacodes.sort! {|x,y| x.name <=> y.name } @synapses.sort! {|x,y| x.desc <=> y.desc } @mappers.sort! {|x,y| x.name <=> y.name } @metacodes.each_with_index do |metacode, index| @metacodelist += '
  • ' @metacodelist += '' + metacode.name + '' @metacodelist += '

    ' + metacode.name.downcase + '

  • ' end @synapses.each_with_index do |synapse, index| @synapselist += '
  • ' @synapselist += 'synapse icon

    ' + synapse.desc @synapselist += '

  • ' end @mappers.each_with_index do |mapper, index| @mapperlist += '
  • ' @mapperlist += '' + mapper.name + '' @mapperlist += '

    ' + mapper.name + '

  • ' end end %>

    metacodes

    all none

    synapses

    all none

    mappers

    all none