/
base.html
79 lines (78 loc) · 3.43 KB
/
base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!doctype html>
<html>
<head>
<title>SQLite Web: {{ dataset.base_name }}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/bootstrap.min.css') }}" />
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/sqlbrowse.css') }}" />
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/syntax-highlight.css') }}" />
{% block extra_head %}{% endblock %}
<script src="{{ url_for('static', filename='js/jquery-1.11.0.min.js') }}" type="text/javascript"></script>
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
<script type="text/javascript">
$(function() {
$('a#toggle-helper-tables').on('click', function(e) {
e.preventDefault();
$('ul#helper-tables').toggle();
});
$('input#table-search').on('keyup', function(e) {
var searchQuery = $(this).val().toUpperCase();
$('li.table-link').each(function() {
var elem = $(this),
tableName = elem.find('a').prop('innerText').toUpperCase();
elem.toggle(tableName.indexOf(searchQuery) != -1);
});
});
});
</script>
{% block extra_scripts %}{% endblock %}
</head>
<body class="{% block body_class %}{% endblock %}">
<div class="container">
{% block page_header %}
<div class="page-header">
{% block content_header %}
{% if not dataset.is_readonly %}
<form action="{{ url_for('table_create') }}" class="form-inline float-right" method="post" style="margin-top: 10px;">
<input name="redirect" type="hidden" value="{{ request.full_path }}" />{# full-path begins with "/" and includes querystring #}
<input class="form-control form-control-sm" name="table_name" placeholder="new_table_name" />
<button class="btn btn-primary btn-sm" type="submit">Create</button>
</form>
{% endif %}
{% endblock %}
<h1>{% block content_title %}{% endblock %}</h1>
</div>
{% endblock %}
<div class="row">
<div class="col-3" id="sidebar">
{% block sidebar %}{% endblock %}
{% block logout %}{% if login_required %}<a href="{{ url_for('logout') }}">Log-out</a>{% endif %}{% endblock %}
</div>
<div class="col-9" id="content">
{% for category, message in get_flashed_messages(with_categories=true) %}
<div class="alert alert-{{ category }} alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<p>{{ message }}</p>
</div>
{% endfor %}
{% block content %}{% endblock %}
</div>
</div>
<div class="row">
<div class="col-9 offset-3">
<footer>
<hr />
<p>
Web-based SQLite database browser, powered by
<a href="http://flask.pocoo.org/">Flask</a> and <a href="http://docs.peewee-orm.com/">Peewee</a>.
© {{ now.year }} <a href="http://charlesleifer.com/">Charles Leifer</a>
</p>
</footer>
</div>
</div>
</div>
</body>
</html>