You are here

function _drupagram_account_list_row in Drupagram 6

Same name and namespace in other branches
  1. 7 drupagram.pages.inc \_drupagram_account_list_row()
1 call to _drupagram_account_list_row()
drupagram_account_list_form in ./drupagram.pages.inc

File

./drupagram.pages.inc, line 86
Provieds drupagram forms.

Code

function _drupagram_account_list_row($account) {
  $form['#account'] = $account;
  $form['id'] = array(
    '#type' => 'value',
    '#value' => $account->id,
  );
  $form['uid'] = array(
    '#type' => 'value',
    '#value' => $account->uid,
  );
  $form['username'] = array(
    '#type' => 'value',
    '#value' => $account->username,
  );
  $form['image'] = array(
    '#type' => 'markup',
    '#value' => '<img src="' . url($account->profile_picture, array(
      'absolute' => TRUE,
    )) . '"/>',
  );
  $form['visible_name'] = array(
    '#type' => 'markup',
    '#value' => l($account->username, 'http://web.stagram.com/user/' . $account->id, array(
      'attributes' => array(
        'target' => '_blank',
      ),
    )),
  );
  $form['description'] = array(
    '#type' => 'markup',
    '#value' => filter_xss($account->bio),
  );
  if (variable_get('drupagram_import', TRUE) && user_access('Import own media to the site')) {
    $form['import'] = array(
      '#type' => 'checkbox',
      '#default_value' => user_access('Import own media to the site') ? $account->import : '',
    );
  }
  $form['delete'] = array(
    '#type' => 'checkbox',
  );
  return $form;
}