layout.html 5.71 KB
Newer Older
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2

3
<html xmlns="http://www.w3.org/1999/xhtml">
4 5

    <head>
6
	{% block head %}
7 8 9 10 11 12 13 14
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />

        <title>Buildout runner</title>

        <meta name="keywords" content="" />

        <meta name="description" content="" />

15 16 17 18 19 20 21 22 23 24 25
        <link href="{{ url_for('static', filename='css/styles.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
        <script src="{{ url_for('static', filename='jquery/jquery-1.6.2.min.js') }}" type="text/javascript" charset="utf-8"></script>
        {% if request.path == '/editSoftwareProfile' or request.path == '/editInstanceProfile' %}
        <script src="{{ url_for('static', filename='ace/ace-uncompressed.js') }}" type="text/javascript" charset="utf-8"></script>
        <script src="{{ url_for('static', filename='ace/theme-crimson_editor.js') }}" type="text/javascript" charset="utf-8"></script>
        <script src="{{ url_for('static', filename='ace/mode-buildout.js') }}" type="text/javascript" charset="utf-8"></script>        
        
        <script type="text/javascript">
            $(document).ready(function() {
                var editor = ace.edit("editor");
                editor.setTheme("ace/theme/crimson_editor");
26

27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
                var CurentMode = require("ace/mode/buildout").Mode;
                editor.getSession().setMode(new CurentMode());
                editor.getSession().setTabSize(2);
                editor.getSession().setUseSoftTabs(true);
                editor.renderer.setHScrollBarAlwaysVisible(false);
                $('#save').click(function(){
                    $('#editor_content').val(editor.getSession().getValue());
                });
            });
        </script>
        {% endif %}
        <script type=text/javascript>
          $SCRIPT_ROOT = {{ request.script_root|tojson|safe }};
        </script>
        <script type="text/javascript">
		$(document).ready(function() {
			$('input[type="text"]').addClass("idleField");
       		$('input[type="text"]').focus(function() {
       			$(this).removeClass("idleField").addClass("focusField");
    		    if (this.value == this.defaultValue){ 
    		    	this.value = '';
				}
				if(this.value != this.defaultValue){
	    			this.select();
	    		}
    		});
    		$('input[type="text"]').blur(function() {
    			$(this).removeClass("focusField").addClass("idleField");
    		    if ($.trim(this.value) == ''){
			    	this.value = (this.defaultValue ? this.defaultValue : '');
				}
    		});
		});			
	</script>
	{% endblock %}
62
    </head>
63
    <body>
64
        <div id="page">
65 66 67
            <div id="logo">
                <a href="{{ url_for('home') }}"><img src="{{ url_for('static', filename='images/logo.png') }}" alt="" /></a>
            </div>
68 69 70
            <div id="header">
                <div class="block_header">
                    <a href="{{ url_for('home') }}" style="float:left"><img alt="" src="{{ url_for('static', filename='images/home.png') }}" /></a>
71
                    <h2 class="info">{% block title %}{% endblock %} - {{session.title}}</h2>
72 73 74
                </div>
                <div class="wmenu">
                    <ul>
75
                        <li><span class="title_software">Software</span></li>
76 77 78 79 80
                        <li><a href="{{ url_for('editSoftwareProfile') }}">Edit</a></li>
                        <li><a href="{{ url_for('runSoftwareProfile') }}">Run</a></li>
                        <li><a href="{{ url_for('viewSoftwareLog') }}">Build log</a></li>
                        <li><a href="{{ url_for('inspectSoftware') }}">Inspect</a></li>
                        <li><a href="{{ url_for('removeSoftware') }}">Remove</a></li>
81

82
                        <li class="space"><span class="title_instance">Instance</span></li>
83 84 85 86 87 88
                        <li><a href="{{ url_for('editInstanceProfile') }}">Edit</a></li>
                        <li><a href="{{ url_for('runInstanceProfile') }}">Run</a></li>
                        <li><a href="{{ url_for('viewInstanceLog') }}">Build log</a></li>
                        <li><a href="{{ url_for('inspectInstance') }}">Inspect</a></li>
                        <li><a href="{{ url_for('stopAllPartition') }}">Stop all</a></li>
                        <li><a href="{{ url_for('removeInstance') }}">Remove</a></li>
89 90 91
                    </ul>
                </div>
                <div class="clear"></div>
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
            </div>            
            <div id="main">                
                <div class="flash" id="flash">
                    {% with messages = get_flashed_messages() %}
                    {% if messages %}
                    <ul class="flashes">
                        {% for message in messages %}
                        <li>{{ message }}</li>
                        {% endfor %}
                    </ul>
                    {% endif %}
                    {% endwith %}
                </div>                
                <div {% if request.path == '/' %} id="home_box" {%else%} id="content" {% endif %}>
                    {% if request.path != '/' %}
                        <div class="main_head">
                        </div>
                        <div class="content">
                    {% endif %}
                    {% block body %}{% endblock %}
                    {% if request.path != '/' %}
                        </div>
                        <div class="main_foot">
                        </div>
                    {% endif %}
                </div>
118 119 120 121 122 123 124
            </div>
            <div id="footer">
                &copy; Vifib SARL 2011 - All right reserved - Creative Commons Shared Alike Non Commercial
            </div>
        </div>
    </body>
</html>