Theme for upload attachments based on node type

stefano@tipic.com - August 8, 2006 - 18:22
Project:Drupal
Version:7.x-dev
Component:upload.module
Category:task
Priority:normal
Assigned:Unassigned
Status:needs work
Description

The default function theme_upload_attachments() doesn't allow to customize the attachment list for each node type. This function should have the node as optional parameter, and then search for a theme_[nodetype]_upload_attachments() function: if the function exists the attachment list is displayed using that function, otherwise the default theme_upload_attachments() will be used.
This what the attached patch does.

AttachmentSizeStatusTest resultOperations
upload.patch_0.txt1000 bytesIgnoredNoneNone

#1

moshe weitzman - June 30, 2008 - 15:06
Version:x.y.z» 7.x-dev
Status:active» needs review

Here is a small patch which submits the whole node to the theme function so it can take smart action based on node type if needed.

AttachmentSizeStatusTest resultOperations
mw.patch1.34 KBIdleFailed: Failed to apply patch.View details | Re-test

#2

Anonymous (not verified) - November 11, 2008 - 09:15
Status:needs review» needs work

The last submitted patch failed testing.

 
 

Drupal is a registered trademark of Dries Buytaert.