HTML
end
end
end
expose do |connection|
if Pakyow.env?(:prototype)
connection.set(:__modes, connection.params[:modes])
end
end
end
# @api private
def self.ui_modes_html(view, current_modes)
current_modes = current_modes.map(&:to_sym)
modes = view.object.each_significant_node(:mode).map { |node|
node.label(:mode)
}
modes.unshift(
(view.info(:mode) || :default).to_sym
).uniq!
options = modes.map { |each_mode|
selected = if current_modes.include?(each_mode)
" selected=\"selected\""
else
""
end
nice_mode = Support.inflector.humanize(Support.inflector.underscore(each_mode))
""
}.join
<<~HTML
UI Mode:
HTML
end
end
end
end
end
end