Merge lp:~sinzui/launchpad/hide-license-info into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12546 |
Proposed branch: | lp:~sinzui/launchpad/hide-license-info |
Merge into: | lp:launchpad |
Diff against target: |
157 lines (+60/-36) 4 files modified
lib/lp/registry/browser/product.py (+7/-1) lib/lp/registry/browser/tests/product-views.txt (+0/-31) lib/lp/registry/browser/tests/test_product.py (+49/-0) lib/lp/registry/templates/product-index.pt (+4/-4) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/hide-license-info |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | code | Approve | |
Review via email: mp+52467@code.launchpad.net |
Description of the change
Hide license_info when Other/* licenses are not selected.
Launchpad bug: https:/
Pre-
Test command: ./bin/test -vv -t TestProductView
The Other/Open Source and Other/Proprietary license info is shown even
when Other/Open Source and Other/Proprietary are not selected. The
information in the field is often historical, and may contradict the
current license. Some users do not know that they need to manually delete
the text when editing the licenses, and they may not see the field once
they have unselected the license. Some users do not want to delete the
historical info, they want it hidden.
I have spent several hours this year helping users with this. I do not
want to explain this again. I can fix the display issue in less time that
it takes to help two more users.
-------
RULES
* Add a rule to the view to tell the template to show the field
when Other/Open Source or Other/Proprietary is selected.
QA
* Visit https:/
* Verify it does not state it is both GPL and CC-NC.
LINT
lib/
lib/
lib/
lib/
IMPLEMENTATION
Replaced an doctest for the ProductView with a unittest.
lib/
lib/
Added a property to the ProductView to tell the template when to show
the license_info field.
lib/
lib/
Updated the template to use the new property. Fixed a subtle issue with
validating script tag...a html-aware checker fails the template because
the script looks empty, which is invalid HTML markup.
lib/
Looks good. Straightforward and well tested.