Commit 0958764b authored by Neil Drumm's avatar Neil Drumm 👋
Browse files

Issue #3277496 by B_man, drumm: Use same set of tabs on your user profile as other profiles

parent 964a75cc
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -841,6 +841,11 @@ function drupalorg_field_extra_fields() {
            'description' => t('User’s Vetted status'),
            'weight' => 0,
          ],
          'drupalorg_users_maintained_projects' => array(
            'label' => t('Projects maintained'),
            'description' => t('Projects a user maintains'),
            'weight' => 0,
          ),
        ),
      ),
    ),
@@ -5538,6 +5543,16 @@ function drupalorg_user_view($account, $view_mode) {
    $account->content['drupalorg_user_issue_credit']['issue']['#prefix'] = '<h4>' . format_plural($issues, 'Credited on 1 issue fixed in the past @time', 'Credited on @count issues fixed in the past @time', array('@time' => ltrim($filter['value']['value'], '-'))) . '</h4>';
  }

  // User's maintained projects
  $view = views_get_view('users_maintained_projects');
  $output = $view->preview('block_1', [$account->uid]);
  if ($view->result) {
    $account->content['drupalorg_users_maintained_projects'] = [
      '#prefix' => '<h3>' . t('Projects maintained') . '</h3>',
      '#markup' => $output,
    ];
  }

  // User Git Vetted.
  if ($account->git_vetted) {
    $account->content['drupalorg_user_vetted'] = [
+2 −0
Original line number Diff line number Diff line
@@ -1431,6 +1431,8 @@ function drupalorg_project_bingo_block_output() {
  $threshold_statuses = [1, 4, 8, 13, 14, 15];

  $links = [
    l(t('Your projects'), '/project/user'),
    l(t('Your documentation guides'), 'user/' . $GLOBALS['user']->uid . '/documentation'),
    l(t('Community'), 'community'),
    l(t('New contributor tasks'), 'new-contributors'),
    l(t('Community initiatives'), 'community-initiatives'),
+5 −5
Original line number Diff line number Diff line
@@ -262,11 +262,11 @@ function drupalorg_user_field_group_info() {
      2 => 'field_events_attended',
      3 => 'field_drupal_contributions',
      4 => 'summary',
      5 => 'versioncontrol_project_user_commits',
      6 => 'drupalorg_documentation_guides',
      7 => 'drupalorg_user_issue_credit',
      8 => 'drupalorg_user_contributor_roles',
      9 => 'drupalorg_user_vetted',
      5 => 'drupalorg_documentation_guides',
      6 => 'drupalorg_user_issue_credit',
      7 => 'drupalorg_user_contributor_roles',
      8 => 'drupalorg_user_vetted',
      9 => 'drupalorg_users_maintained_projects',
    ),
    'format_type' => 'div',
    'format_settings' => array(
+1 −0
Original line number Diff line number Diff line
@@ -136,3 +136,4 @@ features[views_view][] = contributor_roles
features[views_view][] = issue_credit
features[views_view][] = user_mentees
features[views_view][] = user_profile_my_mentor_list
features[views_view][] = users_maintained_projects
+7 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ function drupalorg_user_strongarm() {
        'versioncontrol_project_user_commits' => array(
          'default' => array(
            'weight' => '13',
            'visible' => TRUE,
            'visible' => FALSE,
          ),
        ),
        'drupalorg_membership' => array(
@@ -115,6 +115,12 @@ function drupalorg_user_strongarm() {
            'visible' => TRUE,
          ),
        ),
        'drupalorg_users_maintained_projects' => array(
          'default' => array(
            'weight' => '15',
            'visible' => TRUE,
          ),
        ),
      ),
    ),
  );
Loading