Fix template references for app_title

make sure we only look to /base_meta.mako for that
This commit is contained in:
Lance Edgar 2018-11-27 18:20:15 -06:00
parent acaa83c31a
commit 508359a939
5 changed files with 13 additions and 12 deletions

View file

@ -1,7 +1,8 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" />
<%namespace name="base_meta" file="/base_meta.mako" />
<%def name="title()">About ${self.app_title()}</%def>
<%def name="title()">About ${base_meta.app_title()}</%def>
<h2>${project_title} ${project_version}</h2>

View file

@ -1,5 +1,6 @@
## -*- coding: utf-8; -*-
<%inherit file="/base.mako" />
<%namespace name="base_meta" file="/base_meta.mako" />
<%def name="title()">Home</%def>
@ -16,6 +17,6 @@
</%def>
<div class="logo">
${h.image(image_url, "{} logo".format(capture(self.app_title)), id='logo', width=500)}
<h1>Welcome to ${self.app_title()}</h1>
${h.image(image_url, "{} logo".format(capture(base_meta.app_title)), id='logo', width=500)}
<h1>Welcome to ${base_meta.app_title()}</h1>
</div>

View file

@ -1,5 +1,6 @@
## -*- coding: utf-8; -*-
<%inherit file="/base.mako" />
<%namespace name="base_meta" file="/base_meta.mako" />
<%def name="title()">Login</%def>
@ -14,7 +15,7 @@
</%def>
<%def name="logo()">
${h.image(image_url, "{} logo".format(capture(self.app_title)), id='logo', width=500)}
${h.image(image_url, "{} logo".format(capture(base_meta.app_title)), id='logo', width=500)}
</%def>
<%def name="login_form()">

View file

@ -1,7 +1,8 @@
## -*- coding: utf-8 -*-
<%inherit file="/mobile/base.mako" />
<%namespace name="base_meta" file="/base_meta.mako" />
<%def name="title()">About ${self.app_title()}</%def>
<%def name="title()">About ${base_meta.app_title()}</%def>
<h2>${project_title} ${project_version}</h2>

View file

@ -1,9 +1,10 @@
## -*- coding: utf-8 -*-
<%namespace name="base_meta" file="/base_meta.mako" />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>${self.global_title()} &raquo; ${self.title()}</title>
<title>${base_meta.global_title()} &raquo; ${self.title()}</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
${self.jquery()}
@ -64,10 +65,6 @@
</body>
</%def>
<%def name="app_title()">Rattail Demo</%def>
<%def name="global_title()">${"[STAGE] " if not request.rattail_config.production() else ''}${self.app_title()}</%def>
<%def name="page_url()">${request.current_route_url()}</%def>
<%def name="page_title()">${self.title()}</%def>
@ -88,7 +85,7 @@
<%def name="mobile_header()">
<div data-role="header">
${self.mobile_header_link()}
<h1>${self.global_title()}</h1>
<h1>${base_meta.global_title()}</h1>
</div>
</%def>
@ -116,7 +113,7 @@
<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('mobile.logout'), **{'data-ajax': 'false'})}</li>
<li data-icon="info">${h.link_to("About {}".format(capture(self.app_title)), url('mobile.about'))}</li>
<li data-icon="info">${h.link_to("About {}".format(capture(base_meta.app_title)), url('mobile.about'))}</li>
</ul>
</div>
</%def>