alphagov/whitehall — pull request #412 by h-lame (2013-04-04 13:12:31+00:00)
Title: Featured topics and policies

For: https://www.pivotaltracker.com/story/show/46261023

Allow an org (executive office type only for now) to select some topics and policies to feature.

We have a new model (featured_topics_and_policies_list) to contain this information. It has a list of items (featured_item - which can contain any type of thing, but we're quite limited by UI to topic or policy at the moment) and an optional summary text. The items can be reordered using the UI. This is presented on the exec org public page next to the social media links, with a link to see all the orgs policies at the bottom. This 'see all' link is controlled by a flag on the list to allow for it to go to /policies or /policies?departments[]=.

The models share (via copy and paste) some functionality (ordering, basic list + items structure) with the existing feature_list and feature models, but are different enough (no images, allow for non-documents to be featured, belong to an org not an edition, etc...) that it didn't feel like they had an actual shared ancestor. I think we might want to think about this a bit more though. Also I appreciate that the list name is too specific and the item name is too general, happy to look for new names.

The admin UI might want some extra love as we only render one blank featured item row when you hit the form, so adding multiple items is a laborious process. I couldn't find an existing solution in the app for this though (short of just rendering more blank ones by default).

The styling should be as per the design, but @edds might want to review the css.