The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<HTML>
  <HEAD>
    <TITLE>Yote System</TITLE>

    <script src="/yote/js/jquery-latest.js"></script>
    <script src="/yote/js/jquery.cookie.js"></script>
    <script src="/yote/js/jquery.base64.min.js"></script>
    <script src="/yote/js/json2.js"></script>
    <script src="/yote/js/yote.js"></script>
    <script src="/yote/js/yote.util.js"></script>
    <link href="/yote.css" rel="stylesheet" type="text/css" media="all" />

    <STYLE>
      section { padding-top : 20px; margin : 3px; }
    </STYLE>

    <script lang="javascript">

$().ready( function() {
    $.yote.init();

    var root = $.yote.fetch_root();
    var admin_app = $.yote.fetch_app( 'Yote::Util::Admin' );
    var cms = admin_app.get_cms();

    function make_side_menu( arry ) {
	$( '#side_menu' ).empty();
	for( var i=0; i < arry.length; i++ ) {
	    var menu_item = arry[i];
	    var m_id = "to_" + menu_item.toLowerCase().replace( / /g, "_" );
	    $( '#side_menu' ).append( '<li><a href="#" id="' + m_id + '">' + menu_item + "</a></li>" );
	    (function ( item ) {
		$( '#' + item ).click( function() { eval( item + '()' ); } );
	    } )( m_id );
	}
    } //make_side_menu

    function to_accounts() {
	$.yote.util.make_paginatehash_table( {
	    obj : root,
	    list_name : '_handles',
	    size : 10,
	    col_names : [ 'Handle', 'Email', 'is superuser' ],
	    title : '<h3>Accounts</h3>',
	    col_functions : [ 
		function( k, v ) { return k },
		function( k, v ) { return v.get_email() },
		function( k, v ) { return v.is_root() }
	    ],
	    attach_point : '#main_panel_div'
	} );
	
    } //to_accounts

    function to_installed_apps() {
	$( '#main_panel_div' ).empty().append( "Installed Apps go here " );
    }

    function to_news() {
	$( '#main_panel_div' ).empty().append( "News goes here. " );
    }

    function to_edit_news() {
	var news = cms.content( { path : 'news' } );
	$( '#News' ).empty().append( news );
	$( '#main_panel_div' ).empty().append( '<textarea id="edit_news">' + news + '</textarea><BR><button type="button" id="edit_news_b">Apply</button>' );
	$( '#edit_news_b' ).click( function() {
	    cms.attach_content( { path : 'news', content : $( '#edit_news' ).val() } );
	    $( '#News' ).empty().append( $( '#edit_news' ).val() );	    
	} );
    }

    function to_edit_to_do() {
	var news = cms.content( { path : 'to_do' } );
	$( '#ToDo' ).empty().append( news );
	$( '#main_panel_div' ).empty().append( "<textarea id=edit_to_do>" + news + "</textarea><BR><button type=button id=edit_to_do_b>Apply</button>" );
	$( '#edit_to_do_b' ).click( function() {
	    cms.attach_content( { path : 'to_do', content : $( '#edit_to_do' ).val().replace( /[\r\n]+/g, '<BR>') } );
	    $( '#ToDo' ).empty().append( $( '#edit_to_do' ).val() );	    
	} );
    }

    function on_login( login, acct ) {
	make_side_menu( [ 'Accounts', 'Installed Apps', 'Edit News', 'Edit To Do', 'Stats' ] );
	var news = cms.content( { path : 'news' } );
	$( '#News' ).empty().append( news );
	$( '#ToDo' ).empty().append( cms.content( { path : 'to_do' } ) );
    } //check_login_state

    function not_logged_in() {
	make_side_menu( [ 'About', 'Documentation', 'Download' ] );
	$( '#underbar' ).empty().append( '<section id="News"><P>News Goes Here, actually</P></section>' );
	var news = cms.content( { path : 'news' } );
	$( '#News' ).empty().append( news );
	$( '#ToDo' ).empty().append( cms.content( { path : 'to_do' } ) );
    }

    $.yote.util.make_login_bar( { brand_html         : '<a class="brand"><IMG src="../yotelogo.png"> <huge>Yote Admin</huge></a>',
				  container_id       : '#nav-container',
				  logged_in_function : on_login,
				  not_logged_in_function : not_logged_in,
				  modal_div          : '#modal_div'
				} );

} );

    </script>

  </HEAD>

   <body style="background-color: #FDA;">

    <div STYLE="background-color:#181818;vertical-align:middle">
	<div id="nav-container" class="container" style="width: auto"></div>
    </div>

    <HEADER class="jumbotron subhead" style="height:70px">
      &nbsp;
      <div style="position:fixed;top:350px;left:350px;" id="modal_div"></div>
    </HEADER>

    <div class="container-fluid">
      <div class="row-fluid">
	<div class="span2" id="menu_div">
	  <ul class="nav nav-list" id="side_menu">
	    <li class="active"><a href="#" id="to_logins">Logins</a></li>
	  </ul>
          <div id="underbar">
              <section id="News"><P>News Goes Here, actually</P></section>
              <section id="ToDo"><P>ToDo here, actually</P></section>
	  </div>
	</div>
	
	<div class="span10" id="main_panel_div">
	  Stuff goes here!
	</div>
      </div>
    </div>

    <!-- Yote News....scratch....other things...probably want a cms too, I suppose. talk about what yote is, too -->
  </BODY>
</HTML>