Replace hard-coded release download table with a view

dww - August 4, 2009 - 13:35
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
Description

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

dww - August 5, 2009 - 09:08

Those issues are mostly done. So, here's a work-in-progress view that sort of replaces the download table...

AttachmentSize
539682-1.download_table.view_.php_.txt 10.01 KB
539682-1.download_table.view_.png 23.77 KB

#2

aclight - August 5, 2009 - 14:25

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

dww - August 5, 2009 - 15:19

@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

dww - August 6, 2009 - 00:32

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...

AttachmentSize
539682-4.view_of_projects_with_release_table.png 34.93 KB
539682-4.view_of_projects_with_release_table.view_.txt 4.3 KB

#5

dww - August 6, 2009 - 00:54
Assigned to:dww» Anonymous
Status:postponed» active

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

Gerhard Killesreiter - October 21, 2009 - 18:01

$view->is_cacheable = FALSE;

I wonder if we could simply change this to TRUE?

#7

dww - November 28, 2009 - 23:06
Assigned to:Anonymous» dww
Status:active» needs review
Issue tags:+packaged install profiles

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...

AttachmentSize
539682-7.download_table_view.patch 21.48 KB
539682-7.download_table_view.png 61.03 KB
 
 

Drupal is a registered trademark of Dries Buytaert.