Merge lp:~michael.nelson/ubuntu-webcatalog/923633-link-to-dev into lp:ubuntu-webcatalog

Proposed by Michael Nelson
Status: Merged
Approved by: Łukasz Czyżykowski
Approved revision: 76
Merged at revision: 74
Proposed branch: lp:~michael.nelson/ubuntu-webcatalog/923633-link-to-dev
Merge into: lp:ubuntu-webcatalog
Diff against target: 78 lines (+28/-3)
4 files modified
src/webcatalog/static/light/css/styles.css (+4/-1)
src/webcatalog/templates/light/index.1col.html (+12/-2)
src/webcatalog/templates/webcatalog/base.html (+4/-0)
src/webcatalog/tests/test_views.py (+8/-0)
To merge this branch: bzr merge lp:~michael.nelson/ubuntu-webcatalog/923633-link-to-dev
Reviewer Review Type Date Requested Status
Łukasz Czyżykowski Pending
Review via email: mp+96734@code.launchpad.net

Commit message

Add "Create your own apps for Ubunut!" link to footer.

Description of the change

Simply adds a "Create your own apps for Ubuntu!" link to the footer, as shown:

https://bugs.launchpad.net/ubuntu-webcatalog/+bug/923633/+attachment/2839004/+files/923633-link-to-devportal.png

I couldn't find a way to neatly add the link without adding it directly to the absolute footer. I tried the actual footer block which we override, but it adds way to much whitespace etc.

To post a comment you must log in.
74. By Michael Nelson

Updated copyright to 2012.

75. By Michael Nelson

Added XXX and linked bug for updating to use thee light theme template.

76. By Michael Nelson

Rework the copyright block to be more extensible.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/webcatalog/static/light/css/styles.css'
2--- src/webcatalog/static/light/css/styles.css 2011-04-12 13:16:43 +0000
3+++ src/webcatalog/static/light/css/styles.css 2012-03-12 09:08:18 +0000
4@@ -128,7 +128,10 @@
5 height: 40px;
6 line-height: 14px;
7 }
8-#copyright a {
9+#copyright p {
10+ display: inline;
11+}
12+#copyright a.logo {
13 background-image: url(/assets/light/images/footer_logo.png);
14 width: 118px;
15 height: 27px;
16
17=== modified file 'src/webcatalog/templates/light/index.1col.html'
18--- src/webcatalog/templates/light/index.1col.html 2012-03-05 17:41:06 +0000
19+++ src/webcatalog/templates/light/index.1col.html 2012-03-12 09:08:18 +0000
20@@ -136,8 +136,18 @@
21 {% endblock %}
22 </div>
23 <div id="copyright">
24- <a href="http://www.ubuntu.com"></a>
25- <p>&copy; 2010, 2011 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.</p>
26+ {% block copyright %}
27+ <a class="logo" href="http://www.ubuntu.com"></a>
28+ <p>&copy; 2012 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.</p>
29+ {% endblock %}
30+ {% comment %}
31+ XXX bug=952802 2012-03-12 michaeln Update light theme.
32+ We should not need to customise the complete index.1col.html
33+ here, we should either make the light theme itself extensible,
34+ or stop using it. Our link here to dev.ubuntu.com should
35+ really be in the footer section, but we're not currently
36+ using it.
37+ {% endcomment %}
38 </div>
39 </div>
40
41
42=== modified file 'src/webcatalog/templates/webcatalog/base.html'
43--- src/webcatalog/templates/webcatalog/base.html 2012-03-05 17:41:06 +0000
44+++ src/webcatalog/templates/webcatalog/base.html 2012-03-12 09:08:18 +0000
45@@ -1,4 +1,5 @@
46 {% extends "light/index.1col.html" %}
47+{% load i18n %}
48
49 {% block menus %}{% endblock %}
50
51@@ -20,3 +21,6 @@
52 {% endblock %}
53
54 {% block footer %}{% endblock %}
55+{% block copyright %}
56+{{ block.super }}
57+<p><a href="http://developer.ubuntu.com">{% trans "Create your own apps for Ubuntu!"%}</a></p>{% endblock %}
58
59=== modified file 'src/webcatalog/tests/test_views.py'
60--- src/webcatalog/tests/test_views.py 2012-03-09 22:03:27 +0000
61+++ src/webcatalog/tests/test_views.py 2012-03-12 09:08:18 +0000
62@@ -524,8 +524,16 @@
63
64 self.assertEqual([app], response.context[0]['featured_apps'])
65
66+ def test_link_to_dev_site(self):
67+ response = self.client.get(reverse('wc-index'))
68+
69+ self.assertContains(response,
70+ '<a href="http://developer.ubuntu.com">'
71+ 'Create your own apps for Ubuntu!</a>')
72+
73
74 class OverviewTestCase(TestCaseWithFactory):
75+
76 def test_department_contains_links_to_subdepartments(self):
77 dept = self.factory.make_department('foo')
78 subdept = self.factory.make_department('bar', parent=dept)

Subscribers

People subscribed via source and target branches