mysociety / yournextrepresentative

A website for crowd-sourcing structured election candidate data
https://candidates.democracyclub.org.uk/
GNU Affero General Public License v3.0
56 stars 21 forks source link

Showing areas view rather than election view when there's only one election in that area #836

Open jf1 opened 8 years ago

jf1 commented 8 years ago

In GM we only have local elections, eg: https://candidates.democracyclub.org.uk/areas/MTW-gss:E05000836,WMC-gss:E14000979 https://candidates.democracyclub.org.uk/election/local.trafford.2016-05-05/post/MTW:E05000836/stretford-ward

Areas with only a PCC election are handled the same way: https://candidates.democracyclub.org.uk/areas/PDG-police:surrey,WMC-gss:E14000824 https://candidates.democracyclub.org.uk/election/pcc.2016-05-05/post/police:surrey/police-and-crime-commissioner-for-surrey-police

Both of the area links above have a WMC-gss code despite no-one currently having a Westminster election. Should the homepage's search facility suppress the WMC codes from its output when there are no WMC elections?

Even if the WMC code isn't suppressed then since there's only one current election for each of the above examples, should the user be taken straight to the election page for that post, rather than to an area page that lists only one post?

I'm aware there may be value for admins etc in seeing an area page that contains only one election, but feel this is the exception so it should be handled by eg. appending a noredirect flag to the /areas/ links above.

For info, Lock/unlock candidates list and adding single candidates is possible from /area pages, with those features and "bulk add" and "suggest locking" available in /election pages. Personally I'd simplify the /area pages by removing the edit buttons from them.