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
=== modified file 'src/webcatalog/static/light/css/styles.css'
--- src/webcatalog/static/light/css/styles.css 2011-04-12 13:16:43 +0000
+++ src/webcatalog/static/light/css/styles.css 2012-03-12 09:08:18 +0000
@@ -128,7 +128,10 @@
128 height: 40px;128 height: 40px;
129 line-height: 14px;129 line-height: 14px;
130}130}
131#copyright a {131#copyright p {
132 display: inline;
133}
134#copyright a.logo {
132 background-image: url(/assets/light/images/footer_logo.png);135 background-image: url(/assets/light/images/footer_logo.png);
133 width: 118px;136 width: 118px;
134 height: 27px;137 height: 27px;
135138
=== modified file 'src/webcatalog/templates/light/index.1col.html'
--- src/webcatalog/templates/light/index.1col.html 2012-03-05 17:41:06 +0000
+++ src/webcatalog/templates/light/index.1col.html 2012-03-12 09:08:18 +0000
@@ -136,8 +136,18 @@
136 {% endblock %}136 {% endblock %}
137 </div>137 </div>
138 <div id="copyright">138 <div id="copyright">
139 <a href="http://www.ubuntu.com"></a>139 {% block copyright %}
140 <p>&copy; 2010, 2011 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.</p>140 <a class="logo" href="http://www.ubuntu.com"></a>
141 <p>&copy; 2012 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.</p>
142 {% endblock %}
143 {% comment %}
144 XXX bug=952802 2012-03-12 michaeln Update light theme.
145 We should not need to customise the complete index.1col.html
146 here, we should either make the light theme itself extensible,
147 or stop using it. Our link here to dev.ubuntu.com should
148 really be in the footer section, but we're not currently
149 using it.
150 {% endcomment %}
141 </div>151 </div>
142 </div>152 </div>
143153
144154
=== modified file 'src/webcatalog/templates/webcatalog/base.html'
--- src/webcatalog/templates/webcatalog/base.html 2012-03-05 17:41:06 +0000
+++ src/webcatalog/templates/webcatalog/base.html 2012-03-12 09:08:18 +0000
@@ -1,4 +1,5 @@
1{% extends "light/index.1col.html" %}1{% extends "light/index.1col.html" %}
2{% load i18n %}
23
3{% block menus %}{% endblock %}4{% block menus %}{% endblock %}
45
@@ -20,3 +21,6 @@
20{% endblock %}21{% endblock %}
2122
22{% block footer %}{% endblock %}23{% block footer %}{% endblock %}
24{% block copyright %}
25{{ block.super }}
26<p><a href="http://developer.ubuntu.com">{% trans "Create your own apps for Ubuntu!"%}</a></p>{% endblock %}
2327
=== modified file 'src/webcatalog/tests/test_views.py'
--- src/webcatalog/tests/test_views.py 2012-03-09 22:03:27 +0000
+++ src/webcatalog/tests/test_views.py 2012-03-12 09:08:18 +0000
@@ -524,8 +524,16 @@
524524
525 self.assertEqual([app], response.context[0]['featured_apps'])525 self.assertEqual([app], response.context[0]['featured_apps'])
526526
527 def test_link_to_dev_site(self):
528 response = self.client.get(reverse('wc-index'))
529
530 self.assertContains(response,
531 '<a href="http://developer.ubuntu.com">'
532 'Create your own apps for Ubuntu!</a>')
533
527534
528class OverviewTestCase(TestCaseWithFactory):535class OverviewTestCase(TestCaseWithFactory):
536
529 def test_department_contains_links_to_subdepartments(self):537 def test_department_contains_links_to_subdepartments(self):
530 dept = self.factory.make_department('foo')538 dept = self.factory.make_department('foo')
531 subdept = self.factory.make_department('bar', parent=dept)539 subdept = self.factory.make_department('bar', parent=dept)

Subscribers

People subscribed via source and target branches