function theme_og_ui_admin_new_role

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 og_ui.admin.inc theme_og_ui_admin_new_role($variables)
cle7 og_ui.admin.inc theme_og_ui_admin_new_role($variables)
elmsmedia7 og_ui.admin.inc theme_og_ui_admin_new_role($variables)
icor7 og_ui.admin.inc theme_og_ui_admin_new_role($variables)
meedjum_blog7 og_ui.admin.inc theme_og_ui_admin_new_role($variables)
mooc7 og_ui.admin.inc theme_og_ui_admin_new_role($variables)

Theme the new role form.

Related topics

3 string references to the theme hook from theme_og_ui_admin_new_role()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

og_ui_forms in sites/all/modules/ulmus/og/og_ui/og_ui.module
Implement hook_forms().
og_ui_menu in sites/all/modules/ulmus/og/og_ui/og_ui.module
Implements hook_menu().
og_ui_theme in sites/all/modules/ulmus/og/og_ui/og_ui.module
Implement hook_theme().

File

sites/all/modules/ulmus/og/og_ui/og_ui.admin.inc, line 625
Admin settings for Organic groups module.

Code

function theme_og_ui_admin_new_role($variables) {
  $form = $variables['form'];
  $header = array(t('Name'), array(
    'data' => t('Operations'),
    'colspan' => 2,
  ));

  $group_type = $form['group_type']['#value'];
  $gid = $form['gid']['#value'];
  $bundle = $form['bundle']['#value'];
  $role_names = $form['role_names']['#value'];

  if ($gid) {
    $group = entity_load_single($group_type, $gid);
    $default_access = $group && og_is_group_default_access($group_type, $group);
  }
  else {
    $default_access = FALSE;
  }

  foreach ($role_names as $rid => $name) {
    $text = !$default_access ? t('edit permissions') : t('view permissions');
    $path = $gid ? "group/$group_type/$gid/admin" : 'admin/config/group';
    $permissions = l($text, "$path/permission/$rid/edit");

    if (!$default_access && !in_array($name, array(OG_ANONYMOUS_ROLE, OG_AUTHENTICATED_ROLE))) {
      $rows[] = array(check_plain($name), l(t('edit role'), "$path/role/$rid/edit"), $permissions);
    }
    else {
      $rows[] = array(check_plain($name), t('locked'), $permissions);
    }
  }

  $rows[] = array(array(
    'data' => drupal_render($form['name']) . drupal_render($form['add']),
    'colspan' => 4,
    'class' => 'edit-name',
  ));

  hide($form['actions']);
  $output = drupal_render_children($form);
  $output .= theme('table', array('header' => $header, 'rows' => $rows));
  $output .= render($form['actions']);

  return $output;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.