This branch does two things: shows the count of users affected by a
bug (previously this has not been shown), and moves the "Does this bug
affect you" line to above the bug task table.
Pass a new argument, others_affected_count, into the
MeTooChoiceSource constructor. Accept it too :)
New method, _getNewSourceNames(), that figures out the strings that
will be used in the page to represent the current state of the
choice source in the page. The results of this are used to override
the defaults in the choice source's "items" array.
New property BugTasksAndNominationsView.other_users_affected_count
which returns the number of users affected by the current bug
*excluding* the logged-in user, if he/she is affected.
New property BugTasksAndNominationsView.affected_statement, which
returns a sentence or two to describe what the current state is. It
takes into consideration whether or not the current user has voted
either way or not, and also how many other users are affected.
Move the me-too widget to above the task table. Apart from that
there are very few changes. The affected_statement replaces the
static text in the static and dynamic parts of the supporting HTML,
and other_users_affected_count is passed into setup_me_too().
This branch does two things: shows the count of users affected by a
bug (previously this has not been shown), and moves the "Does this bug
affect you" line to above the bug task table.
Lint free.
To test:
bin/test -vvct 'test_bugtask| xx-bug- affects- me-too' launchpad/ javascript/ bugs/tests/ test_me_ too.html
bin/test -vvct test_bug_me_too.py --layer BugsWindmillLayer
firefox lib/canonical/
File by file:
lib/canonical/ launchpad/ javascript/ bugs/bugtask- index.js
Pass a new argument, others_ affected_ count, into the
MeTooChoiceSource constructor. Accept it too :)
New method, _getNewSourceNa mes(), that figures out the strings that
will be used in the page to represent the current state of the
choice source in the page. The results of this are used to override
the defaults in the choice source's "items" array.
lib/canonical/ launchpad/ javascript/ bugs/tests/ test_me_ too.js
Test the above.
lib/lp/ bugs/browser/ bugtask. py
New property BugTasksAndNomi nationsView. other_users_ affected_ count
which returns the number of users affected by the current bug
*excluding* the logged-in user, if he/she is affected.
New property BugTasksAndNomi nationsView. affected_ statement, which
returns a sentence or two to describe what the current state is. It
takes into consideration whether or not the current user has voted
either way or not, and also how many other users are affected.
lib/lp/ bugs/browser/ tests/test_ bugtask. py
Test the above.
lib/lp/ bugs/stories/ bugs/xx- bug-affects- me-too. txt
The affected_statement is used for both clients with and without
Javascript enabled, so this pagetest was updated.
lib/lp/ bugs/templates/ bugtasks- and-nominations -table. pt
Move the me-too widget to above the task table. Apart from that affected_ count is passed into setup_me_too().
there are very few changes. The affected_statement replaces the
static text in the static and dynamic parts of the supporting HTML,
and other_users_
lib/lp/ bugs/windmill/ tests/test_ bug_me_ too.py
Windmill test updated to reflect wording changes.