Merge lp:~michael.nelson/ubuntu-webcatalog/8133346-depend-on-rnr-client into lp:ubuntu-webcatalog

Proposed by Michael Nelson
Status: Merged
Approved by: Łukasz Czyżykowski
Approved revision: 46
Merged at revision: 45
Proposed branch: lp:~michael.nelson/ubuntu-webcatalog/8133346-depend-on-rnr-client
Merge into: lp:ubuntu-webcatalog
Diff against target: 61 lines (+18/-1)
4 files modified
debian/control (+2/-1)
src/webcatalog/static/css/webcatalog.css (+5/-0)
src/webcatalog/templates/webcatalog/application_detail.html (+1/-0)
src/webcatalog/tests/test_views.py (+10/-0)
To merge this branch: bzr merge lp:~michael.nelson/ubuntu-webcatalog/8133346-depend-on-rnr-client
Reviewer Review Type Date Requested Status
Canonical ISD hackers Pending
Review via email: mp+69415@code.launchpad.net

Commit message

Adds dependency on rnrclient package and adds star ratings to detail pages.

Description of the change

Overview
========

This branch adds the dependency on python-ubuntu-rnr-client. I've added a packaging branch with the build recipe at:

https://code.launchpad.net/~rnr-developers/+recipe/rnr-client-lucid

and build/published the result to our canonical-isd-hackers PPA.

While I was there, I also took the chance to add the start ratings to the details page:

http://people.canonical.com/~michaeln/tmp/8133346-stars-on-detail.png

It's not perfect - to match USC the stars on the details page should be larger - but we can tweak that later (IMO).

Tests: `fab bootstrap` followed by `fab test`.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2011-07-05 16:09:31 +0000
+++ debian/control 2011-07-27 09:24:40 +0000
@@ -24,6 +24,7 @@
24 python-django-south,24 python-django-south,
25 python-django-openid-auth,25 python-django-openid-auth,
26 python-wsgi-oops,26 python-wsgi-oops,
27 python-apt27 python-apt,
28 python-ubuntu-rnr-client
28Description: Ubuntu Web Catalog29Description: Ubuntu Web Catalog
29 Providing web access to the Ubuntu Software Center.30 Providing web access to the Ubuntu Software Center.
3031
=== modified file 'src/webcatalog/static/css/webcatalog.css'
--- src/webcatalog/static/css/webcatalog.css 2011-07-21 13:38:37 +0000
+++ src/webcatalog/static/css/webcatalog.css 2011-07-27 09:24:40 +0000
@@ -202,6 +202,11 @@
202}202}
203.star-rating {203.star-rating {
204 width: 100px;204 width: 100px;
205 float: right;
206}
207#sc-mockup .star-rating img {
208 margin: 0;
209 float: none;
205}210}
206211
207/* Breadcrumbs styles */212/* Breadcrumbs styles */
208213
=== modified file 'src/webcatalog/templates/webcatalog/application_detail.html'
--- src/webcatalog/templates/webcatalog/application_detail.html 2011-07-04 14:47:05 +0000
+++ src/webcatalog/templates/webcatalog/application_detail.html 2011-07-27 09:24:40 +0000
@@ -24,6 +24,7 @@
24 </div>24 </div>
25 <div id="sc-mockup">25 <div id="sc-mockup">
26 <div class="header">26 <div class="header">
27 {% rating_summary application %}
27 {% if application.icon %}28 {% if application.icon %}
28 <img class="icon64" src="{{ application.icon.url }}"/>29 <img class="icon64" src="{{ application.icon.url }}"/>
29 {% else %}30 {% else %}
3031
=== modified file 'src/webcatalog/tests/test_views.py'
--- src/webcatalog/tests/test_views.py 2011-07-21 13:38:37 +0000
+++ src/webcatalog/tests/test_views.py 2011-07-27 09:24:40 +0000
@@ -166,6 +166,16 @@
166 self.assertContains(response, '<td>Proprietary</td>')166 self.assertContains(response, '<td>Proprietary</td>')
167 self.assertNotContains(response, '<td>Open Source</td>')167 self.assertNotContains(response, '<td>Open Source</td>')
168168
169 def test_response_includes_rating_summary(self):
170 distro = self.factory.make_distroseries(code_name='lucid')
171 self.factory.make_application(package_name='foo', distroseries=distro,
172 ratings_average=Decimal('3.5'), ratings_total=23)
173
174 url = reverse('wc-package-detail', args=['lucid', 'foo'])
175 response = self.client.get(url)
176
177 self.assertContains(response, 'images/star-1.png', 3)
178 self.assertContains(response, '23 Ratings', 1)
169179
170180
171class ApplicationDetailNoSeriesTestCase(TestCaseWithFactory):181class ApplicationDetailNoSeriesTestCase(TestCaseWithFactory):

Subscribers

People subscribed via source and target branches