Replace hard-coded release download table with a view
| Project: | Project |
| Version: | 6.x-1.x-dev |
| Component: | Views integration |
| Category: | task |
| Priority: | normal |
| Assigned: | dww |
| Status: | needs review |
| Issue tags: | packaged install profiles |
Subtask of #76726: Refactor project module to use Views [meta issue]: We should kill the hard-coded release download table and replace it with a view.
Depends on:
#539282: Denormalize release info a bit and store latest and recommended releases in {project_release_supported_versions}
#539668: Expose files attached to releases to views
#539676: Expose {project_release_supported_versions} data to views
Once those are done, it should be relatively easy to create a view of release nodes, with a project argument, and some filters from {project_release_supported_versions}. Might be so cheap we don't even have to keep caching it, but we could also keep {cache_project_release} and just use that to cache rendered copies of this view.
This will provide a lot more flexibility (both for the d.o redesign, and for other sites using project*), and will allow us to remove a bunch of ugly code.

#1
Those issues are mostly done. So, here's a work-in-progress view that sort of replaces the download table...
#2
Good work on this. One question--I must have missed something, since I didn't know it was possible to have multiple files for a given release. Is this something new or are you using custom code for a site you're building?
#3
@aclight: See #179471-12: release file attachments should use drupal upload functionality, #357920: Numerous errors when previewing/submitting a new release node and #366448: Port packaging script to new {project_release_file} schema -- Chad and I added most of the plumbing for this during the d.o upgrade sprint in Boston at the beginning of the year. This issue is finally putting a sink in with some of that plumbing. ;)
#4
Related effort. Here's the beginnings of a single view that lets you browse projects and see the recommended releases and file downloads for each one...
#5
I've committed everything this was blocked on, so this is viable again. However, I don't really have time to keep going on this right now. If anyone wants to pick this up from the views I posted above, please do!
#6
$view->is_cacheable = FALSE;
I wonder if we could simply change this to TRUE?
#7
Started working on this again since it has implications for packaged install profiles. Here's the latest iteration:
http://d6.project.drupal.org/project/views
The attached patch doesn't actually rip out all the old crufty code, it just provides the new view based on recent enhancements to project_release views support. Still working out some of the details on the UI, but it's getting a lot closer.
Part of the point of the change is to save color/icon/text inside the table for the download tables for packaged release nodes, so we can mark stuff out of date or insecure. By splitting recommended vs. supported vs. -dev into separate tables, we don't need to use color/icon/text for the status of each row in the table...