/[drupal]/contributions/modules/facebook_status/facebook_status_views_handler_field_delete.inc
ViewVC logotype

Contents of /contributions/modules/facebook_status/facebook_status_views_handler_field_delete.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Fri Jun 5 04:13:33 2009 UTC (5 months, 3 weeks ago) by icecreamyou
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--2
File MIME type: text/x-php
Fixed missing class on "View conversation" link for the view field
Added edit field in Views
Added delete field in Views
Added a "Most Popular Tags" block to FBSST
Added theme_facebook_status_popular_tags($count = NULL, $time = NULL)
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Provides an edit link to Views.
7 */
8
9 /**
10 * Field handler to add a field with an edit link.
11 */
12 class facebook_status_views_handler_field_delete extends views_handler_field {
13 function render($values) {
14 $status = facebook_status_load($values->facebook_status_sid);
15 if (user_access('edit all statuses') || (user_access('edit own status') && $status->pid == $GLOBALS['user']->uid)) {
16 drupal_add_css(drupal_get_path('module', 'facebook_status') .'/facebook_status.css');
17 return '<span id="facebook_status_edit_delete">'. l(t('Delete'), 'statuses/'. $status->sid .'/delete') .'</span>';
18 }
19 }
20 }

  ViewVC Help
Powered by ViewVC 1.1.2