Merge 'better' theme into base templates
i.e. for now there is no 'better' (or any other) theme
This commit is contained in:
parent
c0a28716f5
commit
7d0bb80a90
15 changed files with 241 additions and 423 deletions
|
@ -1,154 +0,0 @@
|
|||
## -*- coding: utf-8; -*-
|
||||
<%namespace name="base" file="tailbone:templates/base.mako" />
|
||||
<%namespace file="/menu.mako" import="main_menu_items" />
|
||||
<%namespace file="/grids/nav.mako" import="grid_index_nav" />
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<title>${self.global_title()} » ${capture(self.title)|n}</title>
|
||||
${self.favicon()}
|
||||
${self.header_core()}
|
||||
|
||||
% if not request.rattail_config.production():
|
||||
<style type="text/css">
|
||||
body { background-image: url(${request.static_url('tailbone:static/img/testing.png')}); }
|
||||
</style>
|
||||
% endif
|
||||
|
||||
${self.head_tags()}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="body-wrapper">
|
||||
|
||||
<header>
|
||||
<nav>
|
||||
<ul class="menubar">
|
||||
${main_menu_items()}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="global">
|
||||
<a class="home" href="${url('home')}">
|
||||
${self.header_logo()}
|
||||
<span class="title">${self.global_title()}</span>
|
||||
</a>
|
||||
% if master:
|
||||
<span class="global">»</span>
|
||||
% if master.listing:
|
||||
<span class="global">${index_title}</span>
|
||||
% else:
|
||||
${h.link_to(index_title, index_url, class_='global')}
|
||||
% if parent_url is not Undefined:
|
||||
<span class="global">»</span>
|
||||
${h.link_to(parent_title, parent_url, class_='global')}
|
||||
% elif instance_url is not Undefined:
|
||||
<span class="global">»</span>
|
||||
${h.link_to(instance_title, instance_url, class_='global')}
|
||||
% endif
|
||||
% if master.viewing and grid_index:
|
||||
${grid_index_nav()}
|
||||
% endif
|
||||
% endif
|
||||
% endif
|
||||
|
||||
<div class="feedback">
|
||||
${h.link_to("Feedback", url('feedback'), class_='button')}
|
||||
</div>
|
||||
|
||||
</div><!-- global -->
|
||||
|
||||
<div class="page">
|
||||
${self.content_title()}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
<div id="scrollpane">
|
||||
<div id="content">
|
||||
<div class="inner-content">
|
||||
|
||||
% if request.session.peek_flash('error'):
|
||||
<div class="error-messages">
|
||||
% for error in request.session.pop_flash('error'):
|
||||
<div class="ui-state-error ui-corner-all">
|
||||
<span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
|
||||
${error}
|
||||
</div>
|
||||
% endfor
|
||||
</div>
|
||||
% endif
|
||||
|
||||
% if request.session.peek_flash():
|
||||
<div class="flash-messages">
|
||||
% for msg in request.session.pop_flash():
|
||||
<div class="ui-state-highlight ui-corner-all">
|
||||
<span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-info"></span>
|
||||
${msg|n}
|
||||
</div>
|
||||
% endfor
|
||||
</div>
|
||||
% endif
|
||||
|
||||
${self.body()}
|
||||
|
||||
</div><!-- inner-content -->
|
||||
</div><!-- content -->
|
||||
</div><!-- scrollpane -->
|
||||
|
||||
</div><!-- content-wrapper -->
|
||||
|
||||
<div id="footer">
|
||||
${self.footer()}
|
||||
</div>
|
||||
|
||||
</div><!-- body-wrapper -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<%def name="app_title()">Rattail</%def>
|
||||
|
||||
<%def name="global_title()">${"[STAGE] " if not request.rattail_config.production() else ''}${self.app_title()}</%def>
|
||||
|
||||
<%def name="content_title()">
|
||||
<h1>${self.title()}</h1>
|
||||
</%def>
|
||||
|
||||
<%def name="favicon()"></%def>
|
||||
|
||||
<%def name="header_core()">
|
||||
${base.core_javascript()}
|
||||
${self.extra_javascript()}
|
||||
${base.core_styles(jquery_theme=self.jquery_theme)}
|
||||
${self.extra_styles()}
|
||||
</%def>
|
||||
|
||||
<%def name="jquery_theme()">
|
||||
${h.stylesheet_link('https://code.jquery.com/ui/1.11.4/themes/dark-hive/jquery-ui.css')}
|
||||
</%def>
|
||||
|
||||
<%def name="extra_javascript()"></%def>
|
||||
|
||||
<%def name="extra_styles()">
|
||||
${h.stylesheet_link(request.static_url('tailbone:static/css/theme-better.css'))}
|
||||
</%def>
|
||||
|
||||
<%def name="head_tags()"></%def>
|
||||
|
||||
<%def name="header_logo()"></%def>
|
||||
|
||||
<%def name="footer()">
|
||||
powered by ${h.link_to("Rattail", url('about'))}
|
||||
</%def>
|
||||
|
||||
<%def name="wtfield(form, name, **kwargs)">
|
||||
<div class="field-wrapper${' error' if form[name].errors else ''}">
|
||||
<label for="${name}">${form[name].label}</label>
|
||||
<div class="field">
|
||||
${form[name](**kwargs)}
|
||||
</div>
|
||||
</div>
|
||||
</%def>
|
|
@ -1,6 +0,0 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="tailbone:templates/master/create.mako" />
|
||||
|
||||
<%def name="context_menu_items()"></%def>
|
||||
|
||||
${parent.body()}
|
|
@ -1,18 +0,0 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="tailbone:templates/master/edit.mako" />
|
||||
|
||||
<%def name="title()">Edit: ${instance_title}</%def>
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
% if master.viewable and request.has_perm('{}.view'.format(permission_prefix)):
|
||||
<li>${h.link_to("View this {}".format(model_title), action_url('view', instance))}</li>
|
||||
% endif
|
||||
% if master.deletable and instance_deletable and request.has_perm('{}.delete'.format(permission_prefix)):
|
||||
<li>${h.link_to("Delete this {}".format(model_title), action_url('delete', instance))}</li>
|
||||
% endif
|
||||
% if master.creatable and request.has_perm('{}.create'.format(permission_prefix)):
|
||||
<li>${h.link_to("Create a new {}".format(model_title), url('{}.create'.format(route_prefix)))}</li>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
|
@ -1,6 +0,0 @@
|
|||
## -*- coding: utf-8; -*-
|
||||
<%inherit file="tailbone:templates/master/index.mako" />
|
||||
|
||||
<%def name="content_title()"></%def>
|
||||
|
||||
${parent.body()}
|
|
@ -1,6 +0,0 @@
|
|||
## -*- coding: utf-8; -*-
|
||||
<%inherit file="tailbone:templates/master/view.mako" />
|
||||
|
||||
## TODO: remove this once it's safe (no callers use it)...
|
||||
|
||||
${parent.body()}
|
Loading…
Add table
Add a link
Reference in a new issue