Code review comment for lp:~michael.nelson/launchpad/429353-site-message-to-footer

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Barry Warsaw wrote:
> Review: Approve ui*
>

Thanks Barry, I've attached the diff for the enable link.

--
Michael

1=== modified file 'lib/canonical/launchpad/pagetests/basics/demo-and-lpnet.txt'
2--- lib/canonical/launchpad/pagetests/basics/demo-and-lpnet.txt 2009-09-16 17:13:23 +0000
3+++ lib/canonical/launchpad/pagetests/basics/demo-and-lpnet.txt 2009-09-17 15:24:12 +0000
4@@ -146,8 +146,8 @@
5 ... browser.contents, 'sitemessage')[0])
6 This is a beta site.
7
8-Similarly, once the redirection has been inhibited, the link will no longer
9-appear in the footer of edge pages.
10+Similarly, once the redirection has been inhibited, the link changes to
11+enable redirects..
12
13 # Workaround bug in mechanize where you cannot use the Cookie
14 # header with the CookieJar
15@@ -165,9 +165,11 @@
16 >>> site_message = find_tags_by_class(
17 ... beta_browser.contents, 'sitemessage')[0]
18 >>> print extract_text(site_message)
19- This is a beta site.
20- >>> print site_message.find('a')
21- None
22+ This is a beta site. Enable edge redirect.
23+ >>> print extract_text(site_message.find(
24+ ... 'a', onclick="setBetaRedirect(true)"))
25+ Enable edge redirect.
26+
27
28 # Remove the specific site-message config data before continuing.
29 >>> dummy = config.pop('edge_config_data')
30
31=== modified file 'lib/lp/app/templates/base-layout-macros.pt'
32--- lib/lp/app/templates/base-layout-macros.pt 2009-09-16 10:03:52 +0000
33+++ lib/lp/app/templates/base-layout-macros.pt 2009-09-17 15:24:12 +0000
34@@ -392,6 +392,10 @@
35 tal:condition="not:view/isRedirectInhibited">
36 Disable edge redirect.
37 </a>
38+ <a href="#" class="js-action" onclick="setBetaRedirect(true)"
39+ tal:condition="view/isRedirectInhibited">
40+ Enable edge redirect.
41+ </a>
42 </tal:beta_user>
43 </tal:normal_lp_view>
44 </tal:edge_only>

« Back to merge proposal