Enable friendly message when users Distro/Arch not supported
Bug #1046364 reported by
Anthony Lenton
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Software Center Agent |
Fix Released
|
Undecided
|
Michael Nelson |
Bug Description
It would be great to display a friendly message on the campaign "Thank You" page, if we know the user is on a distroseries that the campaign doesn't support.
As campaign templates are stored in the DB this could be updated through the web, except that there currently isn't a context variable that reports the user's distroseries.
It would be great to provide this context variable, so that campaign templates can display friendly messages when the user is running an unsupported distroseries.
summary: |
- Provide distroseries and arch data in context variables for campaign - templates + Enable friendly message when users Distro/Arch not supported |
Changed in software-center-agent: | |
status: | New → Fix Committed |
Changed in software-center-agent: | |
assignee: | nobody → Michael Nelson (michael.nelson) |
Changed in software-center-agent: | |
milestone: | none → 12.08.2 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I'll add a branch with a test demoing that this does work without a code-change.
15:16 <noodles> So what does the bug require that the current implementation doesn't do? A per-campaign flag, instead of per-app? whateverflag" >Some of the applications are not available for your computer.</p>{% endif %}
15:17 <achuni> yep
15:18 <noodles> Why not use the unsupported_apps context variable? ie.
15:18 <noodles> Currently it already shows you for each app if it's not available, but you could also add at the top, without any code change:
15:19 <noodles> {% if unsupported_apps %}<p class="
15:20 <achuni> yeah
15:20 <achuni> and something similar for when all apps are unsupported
15:20 <noodles> yep {% if apps == unsupported_apps %}...
15:21 * noodles checks if they would be equal lists in that case.
15:21 * achuni will give that a try
15:21 <achuni> sigh
15:21 <achuni> ...at some point
15:22 <noodles> I can check it out tomorrow, I just want to make sure I'm not missing something from the bug.
15:27 <noodles> Yep, according to CouponFormForUser, the two lists will indeed be equal when none of the apps are supported. I can add a test demoing it to the bug, or if there is something else required for the bug, just say so on the bug.