Redbeard / templates / layout.html

<!DOCTYPE html>
<html class="no-js">
	<meta charset="utf-8">
	<title>{% block title %}Redbeard{% endblock %}</title>
	<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.png') }}">
	<link rel="stylesheet" href="{{ url_for('static', filename='css/html5reset-1.6.1.css') }}" media="screen" charset="utf-8">
	<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" media="screen" charset="utf-8">
	<link rel="stylesheet" href="{{ url_for('static', filename='css/jquery.confirm.css') }}" media="screen" charset="utf-8">
	<header id="masthead">
	{% block header %}
		<a href="{{ url_for('index') }}">
			<h1 id="logo">RedBeard</h1>
		{% if session %}
				<a href="{{ url_for('setup') }}">
					<h2>Redis connection info</h2>
				<dd>{{ session.redis_host }}</dd>
				<dd>{{ session.redis_port }}</dd>
				<dd>{{ session.redis_db }}</dd>
				<dt>DB Size:</dt>
				<dd>{{ db_size }} keys</dd>
		{% endif %}
	{% endblock %}

	<form action="{{ url_for('change_db') }}" method="post" id="switch_db">
			<label for="id_redis_db">Current Redis DB:</label>
			<input type="number" name="redis_db" id="id_redis_db" value="{{ session.redis_db }}" min="0">

	<ul id="flashes">
	{% with messages = get_flashed_messages() %}
        {% if messages %}
        	{% for message in messages %}
        	<li>{{ message }}</li>
        	{% endfor %}
        {% endif %}
    {% endwith %}

	<div id="left">
		<div class="jstest">This application is running with Javascript turned 
		<header id="keyheader">
		<ul id="keylist"></ul>
		{% block leftblock %}{% endblock %}

	<div id="right">
		{% block content %}{% endblock %}

	<p>&copy; <a href="">Brack3t</a>. Design by <a href="">Changemode Design</a>. Icons from <a 
	<script src="{{ url_for('static', filename='js/LAB.min.js') }}"></script>
			.script("{{ url_for('static', filename='js/jquery-1.5.1.min.js') }}").wait()
			.script("{{ url_for('static', filename='js/modernizr-1.6.min.js') }}")
			.script("{{ url_for('static', filename='js/jquery.tmpl.min.js') }}")
			.script("{{ url_for('static', filename='js/underscore-min.js') }}")
			.script("{{ url_for('static', filename='js/backbone-min.js') }}")
			.script("{{ url_for('static', filename='js/cacheprovider.js') }}")
			.script("{{ url_for('static', filename='js/jquery.confirm.js') }}")
			.script("{{ url_for('static', filename='js/jquery.hashchange.min.js') }}")
			.script("{{ url_for('static', filename='js/jquery.scrollTo-1.4.2-min.js') }}").wait()
			.script("{{ url_for('static', filename='js/redbeard.js') }}");
	<script type="text/x-jquery-tmpl" id="indexTemplate">
		<header id="keyheader">
		<ul id="keylist"></ul>
	<script type="text/x-jquery-tmpl" id="keyTemplate">
		<li><a href="#key/${attributes.key}">${attributes.key}</a></li>
	<script type="text/x-jquery-tmpl" id="editTemplate">
			<form action="{{ url_for('save', key=key) }}" method="post" id="key">
					<h2>{{ rtype }}</h2>
					<input type="text" name="key_name" value="${attribute.key}">
					<input type="hidden" name="saved_key_name" value="${attribute.key}">
					{% if ttl %}
					<h3>Key expires in: {{ ttl }} seconds</h3>
					{% endif %}
				<textarea name="value" cols="60" rows="20">${attribute.value}</textarea>
				<div id="controls">
					<a id="refresh" href="{{ url_for('key', key=key) }}" title="refresh">refresh</a>
					<a id="delete" href="{{ url_for('delete', key=key) }}" title="delete">delete</a>
					<input type="submit" value="save" title="save">
	{% block extra_scripts %}{% endblock %}