Initial commit
This commit is contained in:
commit
06be2e2122
20 changed files with 403 additions and 0 deletions
18
rattail_tempmon_demo/web/templates/base.mako
Normal file
18
rattail_tempmon_demo/web/templates/base.mako
Normal file
|
@ -0,0 +1,18 @@
|
|||
## -*- coding: utf-8; mode: html; -*-
|
||||
<%inherit file="tailbone:templates/themes/better/base.mako" />
|
||||
|
||||
<%def name="app_title()">Tempmon Demo</%def>
|
||||
|
||||
<%def name="favicon()">
|
||||
<link rel="icon" type="image/x-icon" href="${request.static_url('tailbone:static/img/rattail.ico')}" />
|
||||
</%def>
|
||||
|
||||
<%def name="header_logo()">
|
||||
${h.image(request.static_url('tailbone:static/img/rattail.ico'), "Header Logo", height='49')}
|
||||
</%def>
|
||||
|
||||
<%def name="footer()">
|
||||
${h.link_to("Tempmon Demo {}{}".format(rattail_tempmon_demo.__version__, '' if request.rattail_config.production() else '+dev'), url('about'))}
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
12
rattail_tempmon_demo/web/templates/home.mako
Normal file
12
rattail_tempmon_demo/web/templates/home.mako
Normal file
|
@ -0,0 +1,12 @@
|
|||
## -*- coding: utf-8; mode: html; -*-
|
||||
<%inherit file="tailbone:templates/home.mako" />
|
||||
|
||||
<%def name="title()">Home</%def>
|
||||
|
||||
<div class="logo">
|
||||
|
||||
${h.image(request.static_url('tailbone:static/img/home_logo.png'), "Rattail Logo")}
|
||||
|
||||
</div>
|
||||
|
||||
<h1 style="text-align: center;">Welcome to the Tempmon Demo</h1>
|
17
rattail_tempmon_demo/web/templates/login.mako
Normal file
17
rattail_tempmon_demo/web/templates/login.mako
Normal file
|
@ -0,0 +1,17 @@
|
|||
## -*- coding: utf-8; mode: html; -*-
|
||||
<%inherit file="tailbone:templates/login.mako" />
|
||||
|
||||
<%def name="extra_styles()">
|
||||
${parent.extra_styles()}
|
||||
<style type="text/css">
|
||||
#logo {
|
||||
margin: 40px auto;
|
||||
}
|
||||
</style>
|
||||
</%def>
|
||||
|
||||
<%def name="logo()">
|
||||
${h.image(request.static_url('tailbone:static/img/home_logo.png'), "Rattail Logo", id='logo')}
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
63
rattail_tempmon_demo/web/templates/menu.mako
Normal file
63
rattail_tempmon_demo/web/templates/menu.mako
Normal file
|
@ -0,0 +1,63 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
|
||||
<%def name="main_menu_items()">
|
||||
|
||||
% if request.has_any_perm('tempmon.clients.list', 'tempmon.probes.list', 'tempmon.readings.list'):
|
||||
<li>
|
||||
<a>Tempmon</a>
|
||||
<ul>
|
||||
% if request.has_perm('tempmon.clients.list'):
|
||||
<li>${h.link_to("Clients", url('tempmon.clients'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('tempmon.probes.list'):
|
||||
<li>${h.link_to("Probes", url('tempmon.probes'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('tempmon.readings.list'):
|
||||
<li>${h.link_to("Readings", url('tempmon.readings'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
% if request.has_any_perm('people.list', 'users.list', 'roles.list', 'settings.list', 'emailprofiles.list'):
|
||||
<li>
|
||||
<a>Admin</a>
|
||||
<ul>
|
||||
% if request.has_perm('people.list'):
|
||||
<li>${h.link_to("People", url('people'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('users.list'):
|
||||
<li>${h.link_to("Users", url('users'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('roles.list'):
|
||||
<li>${h.link_to("Roles", url('roles'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('settings.list'):
|
||||
<li>${h.link_to("Settings", url('settings'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('emailprofiles.list'):
|
||||
<li>${h.link_to("Email Profiles", url('emailprofiles'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
% if request.user:
|
||||
<li>
|
||||
<a${' class="root-user"' if request.is_root else ''|n}>${request.user}${" ({})".format(inbox_count) if inbox_count else ''}</a>
|
||||
<ul>
|
||||
% if request.is_root:
|
||||
<li class="root-user">${h.link_to("Stop being root", url('stop_root'))}</li>
|
||||
% elif request.is_admin:
|
||||
<li class="root-user">${h.link_to("Become root", url('become_root'))}</li>
|
||||
% endif
|
||||
<li>${h.link_to("Messages{}".format(" ({})".format(inbox_count) if inbox_count else ''), url('messages.inbox'))}</li>
|
||||
<li>${h.link_to("Change Password", url('change_password'))}</li>
|
||||
<li>${h.link_to("Logout", url('logout'))}</li>
|
||||
</ul>
|
||||
</li>
|
||||
% else:
|
||||
<li>${h.link_to("Login", url('login'))}</li>
|
||||
% endif
|
||||
|
||||
</%def>
|
27
rattail_tempmon_demo/web/templates/mobile/base.mako
Normal file
27
rattail_tempmon_demo/web/templates/mobile/base.mako
Normal file
|
@ -0,0 +1,27 @@
|
|||
## -*- coding: utf-8; mode: html; -*-
|
||||
<%inherit file="tailbone:templates/mobile/base.mako" />
|
||||
|
||||
<%def name="app_title()">Tempmon Demo</%def>
|
||||
|
||||
<%def name="mobile_usermenu()">
|
||||
<div id="usermenu" data-role="panel" data-display="overlay">
|
||||
<ul data-role="listview">
|
||||
<li data-icon="home">${h.link_to("Home", url('mobile.home'))}</li>
|
||||
% if request.is_root:
|
||||
<li class="root-user" data-icon="forbidden">${h.link_to("Stop being root", url('stop_root'), **{'data-ajax': 'false'})}</li>
|
||||
% elif request.is_admin:
|
||||
<li class="root-user" data-icon="forbidden">${h.link_to("Become root", url('become_root'), **{'data-ajax': 'false'})}</li>
|
||||
% endif
|
||||
<li data-icon="lock">${h.link_to("Logout", url('logout'), **{'data-ajax': 'false'})}</li>
|
||||
<li data-icon="info">${h.link_to("About {}".format(capture(self.app_title)), url('mobile.about'))}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="mobile_footer()">
|
||||
<div data-role="footer">
|
||||
<h4>${h.link_to("Tempmon Demo {}{}".format(rattail_tempmon_demo.__version__, '' if request.rattail_config.production() else '+dev'), url('mobile.about'))}</h4>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
7
rattail_tempmon_demo/web/templates/mobile/home.mako
Normal file
7
rattail_tempmon_demo/web/templates/mobile/home.mako
Normal file
|
@ -0,0 +1,7 @@
|
|||
## -*- coding: utf-8; mode: html; -*-
|
||||
<%inherit file="tailbone:templates/mobile/home.mako" />
|
||||
|
||||
<div style="text-align: center;">
|
||||
${h.image(request.static_url('tailbone:static/img/home_logo.png'), "Rattail Logo", width='400')}
|
||||
<h3>Welcome to ${self.app_title()}</h3>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue