ActiveAdmin.register_page "Dashboard" do

  menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") }

  content :title => proc{ I18n.t("active_admin.dashboard") } do
    div :class => "blank_slate_container", :id => "dashboard_default_message" do
      span :class => "blank_slate" do
        span "JamKazam Administration Portal"
        small ul do
          li link_to "Users", admin_users_path
          li link_to "K12 Users", admin_users_path("q[import_source_equals]": "K12")
          li link_to "Teachers", admin_teachers_path
          li link_to "Upload School Users", admin_schooluseruploads_path

        end
      end
    end

    # Here is an example of a simple dashboard with columns and panels.
    #
     columns do
       column do
         panel "Recent Sessions" do
           ul do
             MusicSession.order('created_at desc').limit(5).map do |music_session|
               li do
                 text_node "'#{music_session.description}' created by #{User.find(music_session.user_id).name} at #{music_session.created_at}, "
                 text_node " members: "
                 music_session.unique_users.each do |session_member|
                   text_node " #{session_member.name}"
                 end

               end

                 # ul do
                 #
                 # end
                #end
              # li link_to(music_session.description, admin_post_path(music_session))
             end
           end
         end
       end
     end

    #   column do
    #     panel "Info" do
    #       para "Welcome to ActiveAdmin."
    #     end
    #   end
    # end
  end # content
end
