Merge lp:~sinzui/launchpad/unlock-sprite into lp:launchpad

Proposed by Curtis Hovey on 2012-06-07
Status: Merged
Approved by: j.c.sackett on 2012-06-07
Approved revision: no longer in the source branch.
Merged at revision: 15381
Proposed branch: lp:~sinzui/launchpad/unlock-sprite
Merge into: lp:launchpad
Diff against target: 832 lines (+349/-54)
10 files modified
lib/canonical/launchpad/icing/css/base.css (+166/-47)
lib/canonical/launchpad/icing/inline-sprites-1.css.in (+4/-0)
lib/canonical/launchpad/images/src/public.svg (+141/-0)
lib/lp/app/browser/informationtype.py (+7/-0)
lib/lp/bugs/browser/tests/test_bugview.py (+8/-0)
lib/lp/bugs/javascript/information_type_choice.js (+3/-0)
lib/lp/bugs/javascript/tests/test_information_type_choice.html (+6/-2)
lib/lp/bugs/javascript/tests/test_information_type_choice.js (+3/-0)
lib/lp/bugs/templates/bug-portlet-privacy.pt (+7/-3)
lib/lp/code/templates/branch-portlet-privacy.pt (+4/-2)
To merge this branch: bzr merge lp:~sinzui/launchpad/unlock-sprite
Reviewer Review Type Date Requested Status
j.c.sackett (community) 2012-06-07 Approve on 2012-06-07
Review via email: mp+109206@code.launchpad.net

Commit Message

Show the public/private lock in the information portlet.

Description of the Change

Pre-implementation: purple squad

The information type portlet could show a lock icon to re-enforce the
lock shown in privacy banner. This branch adds the public lock icon that
was provided by mpt many years ago. Sorry about the svg in the diff :(

--------------------------------------------------------------------

RULES

    * Update the mixin view to provide the needed css to show the two locks.
    * Update the template to use the view's css.
    * Update the change information success handler to replace the css classes
      to match the new state.

QA

    * Visit https://bugs.qastaging.launchpad.net/launchpad/+bug/246964
    * Verify you see the unlocked public icon at the start of the information
      type portlet.
    * Change the bug to embargoed security.
    * Verify you see the locked private icon at the start of the information
      type portlet when the privacy banner appears.

    See http://people.canonical.com/~curtis/public-information-type.png
    and http://people.canonical.com/~curtis/private-information-type.png

LINT

    lib/canonical/launchpad/icing/inline-sprites-1.css.in
    lib/canonical/launchpad/icing/css/base.css
    lib/canonical/launchpad/images/public.png
    lib/canonical/launchpad/images/src/public.svg
    lib/lp/app/browser/informationtype.py
    lib/lp/bugs/browser/tests/test_bugview.py
    lib/lp/bugs/javascript/information_type_choice.js
    lib/lp/bugs/javascript/tests/test_information_type_choice.html
    lib/lp/bugs/javascript/tests/test_information_type_choice.js
    lib/lp/bugs/templates/bug-portlet-privacy.pt
    lib/lp/code/templates/branch-portlet-privacy.pt

    ^ There is some formatting issues in the CSS that I can fix after the
    review.

TEST

    ./bin/test -vvc -t information_type lp.bugs.browser.tests.test_bugview
    ./bin/test -vvc -t information_type lp.bugs.tests.test_yuitests

IMPLEMENTATION

Added the images attached to the bug:
    lib/canonical/launchpad/images/public.png
    lib/canonical/launchpad/images/src/public.svg

Added a sprite for public. Added a rule to not show the sprite on the body
element -- seeing that was quite a surprise as I was testing.
    lib/canonical/launchpad/icing/inline-sprites-1.css.in
    lib/canonical/launchpad/icing/css/base.css

Added information_type_css to InformationTypeViewMixin to provide the CSS
that matches the current aretefact state. The icon is shown at the start
of the portlet as the lock was shown in the original portlet.
    lib/lp/app/browser/informationtype.py
    lib/lp/bugs/browser/tests/test_bugview.py
    lib/lp/bugs/templates/bug-portlet-privacy.pt
    lib/lp/code/templates/branch-portlet-privacy.pt

Updated the success handler to replace the public or private class in the
portlet to match what happens with the privacy banner is updated.
    lib/lp/bugs/javascript/information_type_choice.js
    lib/lp/bugs/javascript/tests/test_information_type_choice.html
    lib/lp/bugs/javascript/tests/test_information_type_choice.js

To post a comment you must log in.
j.c.sackett (jcsackett) wrote :

Thanks, Curtis.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/icing/css/base.css'
2--- lib/canonical/launchpad/icing/css/base.css 2012-05-17 21:04:18 +0000
3+++ lib/canonical/launchpad/icing/css/base.css 2012-06-07 18:40:26 +0000
4@@ -1,29 +1,31 @@
5 body {
6+ /* line-height is the same as the sprite height. */
7 font-family: Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif;
8 font-size: 12px;
9- line-height: 18px; /* The same as the sprite height. */
10+ line-height: 18px;
11 color: #333;
12 }
13-body.private {
14+
15+body.private,
16+body.public {
17 /* It must be obvious to the user that the context is private */
18 background-image: none;
19 }
20+
21 body.private .private-disallow {
22 /* We want to disable/hide some actions on private artifacts */
23- display: none
24+ display: none;
25 }
26+
27 .private-only {
28 /* We want to only show some items on private artifacts */
29 display: none;
30 }
31+
32 body.private .private-only {
33 /* We want to only show some items on private artifacts */
34 display: block;
35 }
36-* html body {
37- /* stops floats dropping in IE 5.5/6 */
38- word-wrap: break-word;
39- }
40
41 hr {
42 display: none;
43@@ -34,122 +36,164 @@
44 margin-top: 0.5em;
45 font-weight: bold;
46 }
47+
48 dt dfn {
49 font-weight: bold;
50 }
51+
52 dd {
53 margin-bottom: .8em;
54 }
55+
56 dl.faq dd {
57 margin: 1em 0 2em 4em;
58 }
59+
60 .contributors dt strong {
61 padding-left: 1em;
62 }
63+
64 ol {
65 margin-left: 1.8em;
66 }
67+
68 ol li {
69 list-style: decimal outside;
70 }
71+
72 li {
73 padding-bottom: .3em;
74 }
75-ul.news, li.news {
76+
77+ul.news,
78+li.news {
79 list-style-type: none;
80 margin-bottom: 1em;
81 }
82-ul.architecture, li.architecture {
83+
84+ul.architecture,
85+li.architecture {
86 list-style-image: url(/@@/architecture);
87 }
88-ul.build-success, li.build-success {
89+
90+ul.build-success,
91+li.build-success {
92 list-style-image: url(/@@/build-success);
93 }
94-ul.bug.remote, li.bug.remote {
95+
96+ul.bug.remote,
97+li.bug.remote {
98 list-style-image: url(/@@/bug-remote);
99 }
100-ul.language, li.language {
101+
102+ul.language,
103+li.language {
104 list-style-image: url(/@@/language);
105 /* Disable .language sprite. */
106 background: inherit;
107 }
108-ul.mail, li.mail {
109+
110+ul.mail,
111+li.mail {
112 list-style-image: url(/@@/mail);
113 }
114-ul.meeting, li.meeting {
115+
116+ul.meeting,
117+li.meeting {
118 list-style-image: url(/@@/meeting);
119 }
120-ul.rss, li.rss {
121+
122+ul.rss,
123+li.rss {
124 list-style-image: url(/@@/rss);
125 }
126-ul.translation, li.translation {
127+
128+ul.translation,
129+li.translation {
130 list-style-image: url(/@@/translation);
131 }
132-ul.webref, li.webref {
133+
134+ul.webref,
135+li.webref {
136 list-style-image: url(/@@/link);
137 }
138+
139 ul.iconed {
140 list-style-type: none;
141 padding-left: 0 !important;
142 margin: 0 !important;
143 }
144+
145 ul.buttons {
146 /* without !important, gets overridden by the '#maincontent ol' rule */
147 margin: 0.5em 0 0.5em 0 !important;
148 padding: 0 !important;
149 }
150+
151 ul.buttons li {
152 display: inline;
153 margin: 0 0 0 0;
154 }
155+
156 .bulleted {
157 margin-bottom: 0.5em;
158 }
159+
160 .bulleted li {
161 margin: 0 0 0 2em;
162 list-style-type: disc;
163 }
164+
165 .horizontal {
166 margin: 1em 0 0 0;
167 }
168+
169 .horizontal li {
170 display: inline;
171 padding: 0 1.5em 0 0;
172 }
173+
174 .subordinate {
175 margin-left: 2em;
176 }
177+
178 ol.subordinate {
179 margin-left: 4em;
180 }
181+
182 .two-column-list dl {
183 width: 48%;
184 float: left;
185 display: inline;
186 margin: 0 0.25em 0 0;
187 }
188+
189 .two-column-list dl:first-child dt,
190 .two-column-list dl:first-child + dl dt {
191 margin-top: 0;
192 }
193+
194 .three-column-list dl {
195 width: 31%;
196 float: left;
197 display: inline;
198 margin: 0 0.25em 0 0;
199 }
200+
201 .two-column-list li {
202 width: 48%;
203 float: left;
204 display: inline;
205 margin: 0 0.25em 0 0;
206 }
207+
208 .three-column-list li {
209 width: 31%;
210 float: left;
211 display: inline;
212 margin: 0 0.25em 0 0;
213 }
214+
215 .two-column-list:after,
216 .three-column-list:after {
217 content: ".";
218@@ -158,6 +202,7 @@
219 clear: both;
220 visibility: hidden;
221 }
222+
223 .two-column-list dl.unseen,
224 .two-column-list li.unseen,
225 .three-column-list dl.unseen,
226@@ -166,205 +211,279 @@
227 display: none;
228 }
229
230-
231 caption {
232 caption-side: bottom;
233 text-align: left;
234 }
235+
236 th {
237 text-align: right;
238 }
239-th, td {
240+
241+th,
242+td {
243 vertical-align: baseline;
244 }
245+
246 .head th,
247-thead th, tr.thead th {
248+thead th,
249+tr.thead th {
250 text-align: left;
251 vertical-align: bottom;
252 }
253-th.icon, td.icon {
254+
255+th.icon,
256+td.icon {
257 vertical-align: top;
258 white-space: nowrap;
259 width: 1px;
260 }
261-th.icon.left, td.icon.left {
262+
263+th.icon.left,
264+td.icon.left {
265 padding-right: 0;
266 }
267-th.icon.right, td.icon.right {
268+
269+th.icon.right,
270+td.icon.right {
271 padding-left: 0;
272 }
273-th.nowrap, td.nowrap {
274+
275+th.nowrap,
276+td.nowrap {
277 white-space: nowrap;
278 }
279-tfoot th, table.contributions th {
280+
281+tfoot th,
282+table.contributions th {
283 text-align: left;
284 }
285+
286 tr.white {
287 background-color: #fff;
288 }
289+
290 tr.shaded {
291 background-color: #f6f6f6;
292 }
293-table .amount, table .action-icons {
294+
295+table .amount,
296+table .action-icons {
297 text-align: right;
298 }
299+
300 table.contributions th {
301 font-weight: normal;
302 }
303+
304 table.contributions td {
305 vertical-align: middle;
306 width: 16px;
307 text-align: left;
308 }
309-table.latest th, table.latest td {
310+
311+table.latest th,
312+table.latest td {
313 padding-bottom: 2em;
314 }
315+
316 table.duplicate.listing * {
317 color: #999;
318 }
319+
320 .table-actions:nth-child(2) {
321- /* text-align only works here because the <li> also has the
322- style display:inline.
323- */
324+ /* text-align works because the <li> is also display:inline. */
325 text-align: right;
326 }
327+
328 .table-actions {
329 margin: 1em 0 0 0;
330 }
331+
332 .table-actions li {
333 display: inline;
334 padding: 0 1.5em 0 0;
335 }
336+
337 table.compressed {
338 width: auto;
339 }
340+
341 table.compressed td {
342 padding: 0.25em 0.5em;
343 }
344+
345 table.cozy-listing {
346 width: 20em;
347 background-color: #fff;
348 border: 1px solid #d2d2d2;
349 border-bottom: 1px solid #d2d2d2;
350 }
351+
352 table.cozy-listing td {
353 border: 1px #d2d2d2;
354 border-style: dotted none none none;
355 }
356+
357 table.sortable a.sortheader {
358 color: #666;
359 font-weight: bold;
360 text-decoration: none;
361 display: block;
362 }
363+
364 table.sortable img.sortarrow {
365 padding-left: 2px;
366 }
367+
368 table.sortable th {
369 cursor: pointer;
370 }
371+
372 th.ascending {
373 background-image: url(/@@/arrowDown);
374 background-position: center right;
375 background-repeat: no-repeat;
376 }
377+
378 th.descending {
379 background-image: url(/@@/arrowUp);
380 background-position: center right;
381 background-repeat: no-repeat;
382 }
383-.sortkey, .revsortkey {
384+
385+.sortkey,
386+.revsortkey {
387 /* Used to indicate a value to be used to sort cells in a row */
388 display: none;
389 }
390+
391 table.listing {
392 margin: 0;
393 width: 100%;
394 }
395-table.listing, table.listing tbody, table.listing td.end-of-section {
396+
397+table.listing,
398+table.listing tbody,
399+table.listing td.end-of-section {
400 border-bottom: 1px solid #d2d2d2;
401 }
402+
403 table.listing th {
404 font-weight: bold;
405 }
406-table.listing .head, table.listing .head th,
407-table.listing thead, table.listing thead th, table.listing tfoot tr,
408+
409+table.listing .head,
410+table.listing .head th,
411+table.listing thead,
412+table.listing thead th,
413+table.listing tfoot tr,
414 table.listing tr.thead th {
415 border: 1px solid #d2d2d2;
416 background-color: #fff;
417 }
418+
419 table.listing tr.category {
420 border-bottom: 1px solid #d2d2d2;
421 }
422-table.listing tr.category th, table.listing tr.category td {
423+
424+table.listing tr.category th,
425+table.listing tr.category td {
426 padding-top: 1em;
427 }
428+
429 table.listing thead td,
430-table.listing table tbody, table.listing table thead,
431-table.listing table thead th, table.listing tfoot tr,
432-table.listing table tfoot td, table.listing table td {
433+table.listing table tbody,
434+table.listing table thead,
435+table.listing table thead th,
436+table.listing tfoot tr,
437+table.listing table tfoot td,
438+table.listing table td {
439 border: none;
440 }
441+
442 table.listing tfoot td {
443 border: 1px solid #d2d2d2;
444 }
445-table.listing th, table.listing td {
446+
447+table.listing th,
448+table.listing td {
449 padding: 0.25em;
450 }
451-table.listing table th, table.listing table td {
452+
453+table.listing table th,
454+table.listing table td {
455 /* We don't want extra padding on nested tables, like batch navigation. */
456 padding: 0;
457 }
458-table.listing thead th, table.listing tr.thead th {
459+
460+table.listing thead th,
461+table.listing tr.thead th {
462 white-space: nowrap;
463 }
464+
465 table.listing td {
466 border: 1px #d2d2d2;
467 border-style: dotted none none none;
468 }
469+
470 table.listing .section-break td {
471 border-width: 1px 0 0 0;
472 border-style: solid;
473 border-color: #d2d2d2;
474 height: 1em;
475 }
476+
477 table.listing .note td {
478 border-style: none;
479 }
480+
481 table.listing img {
482 vertical-align: middle;
483 }
484-table.listing tr.secondary th, table.listing tr.secondary td {
485+
486+table.listing tr.secondary th,
487+table.listing tr.secondary td {
488 border-top: none;
489 }
490+
491 table.listing table.simple {
492 margin-left: 2em;
493 }
494+
495 table.listing table.simple td {
496 padding: 0.25em;
497 }
498+
499 table.listing .section-heading {
500 border: none;
501 padding-top: 1.5em;
502 }
503-table.summary th, table.summary td,
504-table.listing table.summary th, table.listing table.summary td {
505- /* Summary tables present information with subdued headers and a little
506- row spacing. */
507+
508+table.summary th,
509+table.summary td,
510+table.listing table.summary th,
511+table.listing table.summary td {
512+ /* Summary tables havesubdued headers and a little row spacing. */
513 padding: 0 0.5em 0.5em 0;
514 }
515+
516 table.summary th {
517 font-weight: normal;
518 }
519+
520 table.summary caption {
521 font-style: italic;
522 margin-left: 1em;
523 }
524-table.summary ul, table.summary ul li {
525+
526+table.summary ul,
527+table.summary ul li {
528 list-style-position: inside;
529 margin: 0;
530 padding: 0;
531 }
532+
533 .results {
534 background-color: #f4f4f4;
535 padding: 2px 10px 5px 10px;
536
537=== modified file 'lib/canonical/launchpad/icing/inline-sprites-1.css.in'
538--- lib/canonical/launchpad/icing/inline-sprites-1.css.in 2012-06-02 03:10:14 +0000
539+++ lib/canonical/launchpad/icing/inline-sprites-1.css.in 2012-06-07 18:40:26 +0000
540@@ -277,6 +277,10 @@
541 background-image: url(/@@/private.png); /* sprite-ref: icon-sprites */
542 background-repeat: no-repeat;
543 }
544+.public {
545+ background-image: url(/@@/public.png); /* sprite-ref: icon-sprites */
546+ background-repeat: no-repeat;
547+ }
548 .meeting {
549 background-image: url(/@@/meeting.png); /* sprite-ref: icon-sprites */
550 background-repeat: no-repeat;
551
552=== added file 'lib/canonical/launchpad/images/public.png'
553Binary files lib/canonical/launchpad/images/public.png 1970-01-01 00:00:00 +0000 and lib/canonical/launchpad/images/public.png 2012-06-07 18:40:26 +0000 differ
554=== added file 'lib/canonical/launchpad/images/src/public.svg'
555--- lib/canonical/launchpad/images/src/public.svg 1970-01-01 00:00:00 +0000
556+++ lib/canonical/launchpad/images/src/public.svg 2012-06-07 18:40:26 +0000
557@@ -0,0 +1,141 @@
558+<?xml version="1.0" encoding="utf-8"?>
559+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
560+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
561+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
562+ width="78px" height="53px" viewBox="0 0 78 53" enable-background="new 0 0 78 53" xml:space="preserve">
563+<g>
564+ <defs>
565+ <path id="SVGID_1_" d="M52.937,35.938c-0.553,0-0.999-0.447-0.999-1v-2.905c0-0.012,0-0.021,0-0.032c0.037-1.205,0.875-3,3.031-3
566+ H57c0.006,0,0.014,0,0.021,0c1.209,0.025,2.511,0.661,2.511,2.001c0,0.304-0.139,0.592-0.376,0.78l-0.782,0.625
567+ c-0.18,0.146-0.4,0.219-0.624,0.219c-0.121,0-0.242-0.021-0.358-0.065c-0.262-0.101-0.466-0.306-0.568-0.56
568+ c-0.247,0-1.77,0-1.823,0c0,0.062,0,2.938,0,2.938c0,0.553-0.447,1-1,1H52.937"/>
569+ </defs>
570+ <clipPath id="SVGID_2_">
571+ <use xlink:href="#SVGID_1_" overflow="visible"/>
572+ </clipPath>
573+ <g clip-path="url(#SVGID_2_)">
574+ <defs>
575+ <rect id="SVGID_3_" width="78" height="53"/>
576+ </defs>
577+ <clipPath id="SVGID_4_">
578+ <use xlink:href="#SVGID_3_" overflow="visible"/>
579+ </clipPath>
580+
581+ <image overflow="visible" clip-path="url(#SVGID_4_)" width="78" height="53" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
582+EAMCAwYAAAGDAAABjgAAAa//2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
583+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
584+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIADUATgMBIgACEQEDEQH/
585+xABfAAEBAQAAAAAAAAAAAAAAAAAABgcBAQAAAAAAAAAAAAAAAAAAAAAQAQEAAAAAAAAAAAAAAAAA
586+AEBgEQEAAAAAAAAAAAAAAAAAAABgEgEAAAAAAAAAAAAAAAAAAABA/9oADAMBAAIRAxEAAADQAAAA
587+AAAIG+gQBfQN8AAIG+gQBfQN8AAAAAf/2gAIAQIAAQUAJ//aAAgBAwABBQAn/9oACAEBAAEFAIb/
588+2gAIAQICBj8AJ//aAAgBAwIGPwAn/9oACAEBAQY/AA3/2Q==">
589+ </image>
590+ </g>
591+</g>
592+<g>
593+ <defs>
594+ <path id="SVGID_5_" d="M56.969,31.001h-2c0,0-0.97,0-0.97,0.968v2.969h-1.062v-2.905c0,0,0.063-2.032,2.032-2.032H57
595+ c0,0,1.531,0.031,1.531,1.001l-0.782,0.625C57.749,31.626,57.656,31.062,56.969,31.001z"/>
596+ </defs>
597+ <clipPath id="SVGID_6_">
598+ <use xlink:href="#SVGID_5_" overflow="visible"/>
599+ </clipPath>
600+ <g clip-path="url(#SVGID_6_)">
601+ <defs>
602+ <rect id="SVGID_7_" width="78" height="53"/>
603+ </defs>
604+ <clipPath id="SVGID_8_">
605+ <use xlink:href="#SVGID_7_" overflow="visible"/>
606+ </clipPath>
607+
608+ <image overflow="visible" clip-path="url(#SVGID_8_)" width="78" height="53" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
609+EAMCAwYAAAGPAAABpAAAAcj/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
610+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
611+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIADUATgMBIgACEQEDEQH/
612+xABpAAEBAQEBAAAAAAAAAAAAAAAABQYCBwEBAAAAAAAAAAAAAAAAAAAAABAAAgMBAQAAAAAAAAAA
613+AAAAABFAAhIgUBEBAQEBAAAAAAAAAAAAAAAAMQBAUBIBAAAAAAAAAAAAAAAAAAAAQP/aAAwDAQAC
614+EQMRAAAA9AAAAAAAAlVZQAqyqoAAz2hzh05HWhzmjAAAAAP/2gAIAQIAAQUAif/aAAgBAwABBQCJ
615+/9oACAEBAAEFAPDYxj73c3c3c3eN/9oACAECAgY/ACf/2gAIAQMCBj8AJ//aAAgBAQEGPwDmszOb
616+/9k=">
617+ </image>
618+ </g>
619+</g>
620+<g>
621+ <defs>
622+ <rect id="SVGID_9_" x="51" y="34.031" width="9.969" height="7.938"/>
623+ </defs>
624+ <clipPath id="SVGID_10_">
625+ <use xlink:href="#SVGID_9_" overflow="visible"/>
626+ </clipPath>
627+ <g clip-path="url(#SVGID_10_)">
628+ <defs>
629+ <rect id="SVGID_11_" width="78" height="53"/>
630+ </defs>
631+ <clipPath id="SVGID_12_">
632+ <use xlink:href="#SVGID_11_" overflow="visible"/>
633+ </clipPath>
634+
635+ <image overflow="visible" clip-path="url(#SVGID_12_)" width="78" height="53" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
636+EAMCAwYAAAGFAAABkAAAAbH/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
637+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
638+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIADUATgMBIgACEQEDEQH/
639+xABfAAEBAQAAAAAAAAAAAAAAAAAABgcBAQAAAAAAAAAAAAAAAAAAAAAQAQEAAAAAAAAAAAAAAAAA
640+AEBgEQEAAAAAAAAAAAAAAAAAAABgEgEAAAAAAAAAAAAAAAAAAABA/9oADAMBAAIRAxEAAADQAAAA
641+AAACBL5Ai+QN8AAIG+gQBfQN8AAIEAF8H//aAAgBAgABBQAn/9oACAEDAAEFACf/2gAIAQEAAQUA
642+hv/aAAgBAgIGPwAn/9oACAEDAgY/ACf/2gAIAQEBBj8ADf/Z">
643+ </image>
644+ </g>
645+</g>
646+<g>
647+ <defs>
648+ <rect id="SVGID_13_" x="52" y="34.97" width="8" height="5.999"/>
649+ </defs>
650+ <clipPath id="SVGID_14_">
651+ <use xlink:href="#SVGID_13_" overflow="visible"/>
652+ </clipPath>
653+ <g clip-path="url(#SVGID_14_)">
654+ <defs>
655+ <rect id="SVGID_15_" width="78" height="53"/>
656+ </defs>
657+ <clipPath id="SVGID_16_">
658+ <use xlink:href="#SVGID_15_" overflow="visible"/>
659+ </clipPath>
660+
661+ <image overflow="visible" clip-path="url(#SVGID_16_)" width="78" height="53" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
662+EAMCAwYAAAGNAAABoAAAAcT/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
663+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
664+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIADUATgMBIgACEQEDEQH/
665+xABnAAEBAQEBAAAAAAAAAAAAAAAABAUGBwEBAAAAAAAAAAAAAAAAAAAAABAAAwEBAAAAAAAAAAAA
666+AAAAAAMUQFARAQEBAQAAAAAAAAAAAAAAADEAQFASAQAAAAAAAAAAAAAAAAAAAED/2gAMAwEAAhED
667+EQAAAPQAAAAAAACEuQi5DcAAMjX5E12QNfX5HrgAAAAD/9oACAECAAEFAMn/2gAIAQMAAQUAyf/a
668+AAgBAQABBQDm2qLVFqi1Wb//2gAIAQICBj8AJ//aAAgBAwIGPwAn/9oACAEBAQY/AOazM5v/2Q==">
669+ </image>
670+ </g>
671+</g>
672+<g>
673+ <defs>
674+ <rect id="SVGID_17_" x="52.977" y="35.958" width="5.984" height="4.021"/>
675+ </defs>
676+ <clipPath id="SVGID_18_">
677+ <use xlink:href="#SVGID_17_" overflow="visible"/>
678+ </clipPath>
679+ <g clip-path="url(#SVGID_18_)">
680+ <defs>
681+ <rect id="SVGID_19_" width="78" height="53"/>
682+ </defs>
683+ <clipPath id="SVGID_20_">
684+ <use xlink:href="#SVGID_19_" overflow="visible"/>
685+ </clipPath>
686+
687+ <image overflow="visible" clip-path="url(#SVGID_20_)" width="78" height="53" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
688+EAMCAwYAAAGOAAABoQAAAcX/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
689+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
690+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIADUATgMBIgACEQEDEQH/
691+xABmAAEBAQEAAAAAAAAAAAAAAAAABgcFAQEAAAAAAAAAAAAAAAAAAAAAEAADAQEAAAAAAAAAAAAA
692+AAAAAxRAUBEBAQEBAAAAAAAAAAAAAAAAMQBAUBIBAAAAAAAAAAAAAAAAAAAAQP/aAAwDAQACEQMR
693+AAAA0AAAAAAAAjCzRgs0ZZgACFuszOk5o6V1memAAAAAH//aAAgBAgABBQDJ/9oACAEDAAEFAMn/
694+2gAIAQEAAQUA5tiSxJYksTm//9oACAECAgY/ACf/2gAIAQMCBj8AJ//aAAgBAQEGPwDmszOb/9k=">
695+ </image>
696+ </g>
697+</g>
698+</svg>
699
700=== modified file 'lib/lp/app/browser/informationtype.py'
701--- lib/lp/app/browser/informationtype.py 2012-06-01 05:11:24 +0000
702+++ lib/lp/app/browser/informationtype.py 2012-06-07 18:40:26 +0000
703@@ -62,3 +62,10 @@
704 'Visible only to users with whom the project has '
705 'shared private information.')
706 return description
707+
708+ @property
709+ def information_type_css(self):
710+ if self.context.information_type in PRIVATE_INFORMATION_TYPES:
711+ return 'sprite private'
712+ else:
713+ return 'sprite public'
714
715=== modified file 'lib/lp/bugs/browser/tests/test_bugview.py'
716--- lib/lp/bugs/browser/tests/test_bugview.py 2012-06-02 13:52:34 +0000
717+++ lib/lp/bugs/browser/tests/test_bugview.py 2012-06-07 18:40:26 +0000
718@@ -67,6 +67,14 @@
719 self.bug.information_type.description,
720 self.view.information_type_description)
721
722+ def test_information_type_css_class(self):
723+ self.bug.transitionToInformationType(
724+ InformationType.USERDATA, self.bug.owner)
725+ self.assertEqual('sprite private', self.view.information_type_css)
726+ self.bug.transitionToInformationType(
727+ InformationType.UNEMBARGOEDSECURITY, self.bug.owner)
728+ self.assertEqual('sprite public', self.view.information_type_css)
729+
730 def test_userdata_shown_as_private(self):
731 # When the display_userdata_as_private feature flag is enabled, the
732 # information_type is shown as 'Private'.
733
734=== modified file 'lib/lp/bugs/javascript/information_type_choice.js'
735--- lib/lp/bugs/javascript/information_type_choice.js 2012-06-05 08:10:16 +0000
736+++ lib/lp/bugs/javascript/information_type_choice.js 2012-06-07 18:40:26 +0000
737@@ -65,6 +65,7 @@
738
739 namespace.information_type_save_success = function(value) {
740 var body = Y.one('body');
741+ var summary = Y.one('#information-type-summary');
742 var private_type = (Y.Array.indexOf(LP.cache.private_types, value) >= 0);
743 var subscription_ns = Y.lp.bugs.bugtask_index.portlets.subscription;
744 var privacy_banner = Y.lp.app.banner.privacy.getPrivacyBanner();
745@@ -72,9 +73,11 @@
746 if (private_type) {
747 var banner_text = namespace.get_information_type_banner_text(value);
748 privacy_banner.updateText(banner_text);
749+ summary.replaceClass('public', 'private');
750 body.replaceClass('public', 'private');
751 privacy_banner.show();
752 } else {
753+ summary.replaceClass('private', 'public');
754 body.replaceClass('private', 'public');
755 privacy_banner.hide();
756 }
757
758=== modified file 'lib/lp/bugs/javascript/tests/test_information_type_choice.html'
759--- lib/lp/bugs/javascript/tests/test_information_type_choice.html 2012-06-05 08:10:16 +0000
760+++ lib/lp/bugs/javascript/tests/test_information_type_choice.html 2012-06-07 18:40:26 +0000
761@@ -90,9 +90,13 @@
762 <script type="text/x-template" id="portlet-template">
763 <div id="privacy">
764 <div id="privacy-text">
765- This report contains <strong id="information-type">Public</strong> information
766+ <span id="information-type-summary" class="sprite public">
767+ This report contains
768+ <strong id="information-type">Public</strong>
769+ information
770+ </span>
771 <a class="sprite edit" id="privacy-link" href="#">edit</a>
772- <div id='information-type-description'>Everyone can see this information.</div>
773+ <div id="information-type-description">Everyone can see this information.</div>
774 </div>
775 </div>
776 <div id="current_user_subscription">
777
778=== modified file 'lib/lp/bugs/javascript/tests/test_information_type_choice.js'
779--- lib/lp/bugs/javascript/tests/test_information_type_choice.js 2012-06-05 08:10:16 +0000
780+++ lib/lp/bugs/javascript/tests/test_information_type_choice.js 2012-06-07 18:40:26 +0000
781@@ -111,8 +111,11 @@
782 Y.on('test:banner:hide', function() {
783 flag = true;
784 });
785+ var summary = Y.one('#information-type-summary');
786+ summary.replaceClass('public', 'private');
787
788 ns.information_type_save_success('Public');
789+ Y.Assert.isTrue(summary.hasClass('public'));
790 var body = Y.one('body');
791 Y.Assert.isTrue(body.hasClass('public'));
792 Y.Assert.isTrue(flag);
793
794=== modified file 'lib/lp/bugs/templates/bug-portlet-privacy.pt'
795--- lib/lp/bugs/templates/bug-portlet-privacy.pt 2012-06-07 12:21:49 +0000
796+++ lib/lp/bugs/templates/bug-portlet-privacy.pt 2012-06-07 18:40:26 +0000
797@@ -10,11 +10,15 @@
798 >
799 <div id="privacy-text">
800 <tal:information_type tal:condition="view/show_information_type_in_ui">
801- This report contains <strong id="information-type"
802- tal:content="view/information_type"></strong> information&nbsp;<a
803+ <span id="information-type-summary"
804+ tal:attributes="class view/information_type_css;">This report
805+ contains
806+ <strong id="information-type" tal:content="view/information_type" />
807+ information
808+ </span>&nbsp;<a
809 class="sprite edit" id="privacy-link"
810 tal:attributes="href link/path" tal:condition="link/enabled"></a>
811- <div id='information-type-description' style='padding-top: 5px'
812+ <div id="information-type-description" style="padding-top: 5px"
813 tal:content="view/information_type_description"></div>
814 </tal:information_type>
815 <tal:privacy tal:condition="not:view/show_information_type_in_ui">
816
817=== modified file 'lib/lp/code/templates/branch-portlet-privacy.pt'
818--- lib/lp/code/templates/branch-portlet-privacy.pt 2012-05-30 05:04:40 +0000
819+++ lib/lp/code/templates/branch-portlet-privacy.pt 2012-06-07 18:40:26 +0000
820@@ -8,8 +8,10 @@
821 "
822 >
823 <tal:information_type tal:condition="view/show_information_type_in_ui">
824- This branch contains <strong id="information-type" tal:content="view/information_type"></strong> information
825- <div id='information-type-description' style='padding-top: 5px' tal:content="view/information_type_description"></div>
826+ <span id="information-type-summary"
827+ tal:attributes="class view/information_type_css;">This branch
828+ contains <strong id="information-type" tal:content="view/information_type"></strong> information</span>
829+ <div id="information-type-description" style="padding-top: 5px" tal:content="view/information_type_description"></div>
830 </tal:information_type>
831 <tal:privacy tal:condition="not:view/show_information_type_in_ui">
832 <div tal:condition="not:context/private"