<%doc>Copyright (C) 2009 HDE, Inc.</%doc>
<%inherit file="../include/base.html" />

<%def name="breadcrumbs()">
        <%!
        from karesansui.lib.template import img_status, str_status, clipping
        from karesansui.lib.const import MACHINE_NAME_CLIPPING_RANGE
        %>

        <div class="left"></div>
        <div class="text">
            <img src="${ctx.homepath}/static/images/top.png"/><a href="${ctx.homepath}/" class="path-a">${_('Top')}</a>
            &nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;&nbsp;
            <img src="${ctx.homepath}/static/images/host-icon.png"/><a href="${ctx.homepath}/host/${model.id}" class="path-a">${clipping(model.name, MACHINE_NAME_CLIPPING_RANGE) | h}</a>
        </div>
        <div class="right"></div>
</%def>

<%def name="tab()">
<script type="text/javascript">
<!--
g_current_tree_id = "#tree-host" + ${model.id};
$(document).ready(function(){
    var tab_url = null;
    $("#tab .text li a").click(function(){
        if(tab_url == null || $("#tab .text ul li[class='ui-tabs-selected']").find("a").attr("id") == tab_url){
            tab_url = $(this).attr("id");
        }
    });
    $(function() {
        $('#tab .text > ul').tabs({
            select: function(ev){
                if(tab_url != null){
                    goto_tab(tab_url, null);
                }
            },
        });
    });
});
// -->
</script>
	            <div class="text">
	                <ul>
                        <li><a href="#show" id="${ctx.homepath}/host/${model.id}/guest.part"><span>${_('Guests')}</span></a></li>
                        <li><a href="#show" id="${ctx.homepath}/host/${model.id}/network.part"><span>${_('Network')}</span></a></li>
                        <li><a href="#show" id="${ctx.homepath}/host/${model.id}/job.part"><span>${_('Job')}</span></a></li>
                        <li><a href="#show" id="${ctx.homepath}/host/${model.id}/firewall.part"><span>${_('Firewall')}</span></a></li>
                    </ul>
                </div>
</%def>


<%def name="show()">
<script type="text/javascript">
<!--
$(document).ready(function(){
    $(function() {
        goto_tab('${ctx.homepath}/host/${model.id}/guest.part','');
    });
});
// -->
</script>
</%def>
