You are here

function theme_flag_lists_user_page in Flag Lists 7

Same name and namespace in other branches
  1. 6 flag_lists.module \theme_flag_lists_user_page()
  2. 7.3 flag_lists.module \theme_flag_lists_user_page()

Theme the output for a user flag administration page.

1 theme call to theme_flag_lists_user_page()
flag_lists_user_page in ./flag_lists.module
User flag page. Display a list of user-created flag lists.

File

./flag_lists.module, line 167
The Flag Lists module.

Code

function theme_flag_lists_user_page($variables) {
  $uid = $variables['uid'];
  $account = user_load($uid);
  drupal_set_title(t('Lists'));
  if ($flags = flag_lists_get_user_flags(NULL, $account)) {

    // Build the list of flag lists for this node.
    foreach ($flags as $flag) {
      $ops = theme('flag_lists_ops', array(
        'flag' => $flag,
      ));
      $items[] = l($flag->title, "user/{$uid}/flags/lists/" . $flag->fid) . $ops;
    }
  }
  drupal_add_css(drupal_get_path('module', 'flag_lists') . '/theme/flag_lists.css');
  return theme('item_list', array(
    'items' => $items,
  ));
}