<h3><a id="files"><?php echo ucwords(__('Files')); ?> </a></h3> <div style='background-color:#D9E1FF;border:1px solid #72BE44;padding: 4px;'> <?php if ($task->getProject()->hasPermission('create-task')) { ?> <div style="border-bottom: 1px solid white; padding-bottom: 2px;margin-bottom: 4px;"> <?php echo file_link_to_add('task', $task->getId(), array('icon' => 'true', 'modalbox' => 'true')); ?> </div><?php } ?> <?php foreach (sfFileGalleryPeer::getFiles('task', $task->getId()) as $file) { ?> <div class="file-holder"> <span style="float:right;"><?php echo 'Added by ' . link_to("Sean Grove", '#') . ' on ' . format_date($file->getCreatedAt()); ?> </span><?php echo link_to($file->getName(), "@download_file?id=" . $file->getUuid()); ?> <div style="border-top:1px solid white;margin-top:2px;padding-top:4px;"><?php echo $file->getDescription(); ?> </div> </div> <?php
public function executeFileBrowser() { $filter = $this->getRequestParameter('filter'); $category = $this->getRequestParameter('category'); $type = $this->getRequestParameter('type'); $object_uuid = $this->getRequestParameter('id'); if ($type == 'task') { $object = TaskPeer::retrieveByUuid($object_uuid); } $this->files = sfFileGalleryPeer::getFiles($type, $object->getId()); }