Commit aadec0f1 authored by Neil Drumm's avatar Neil Drumm 👋
Browse files

Issue #3253658 by drumm, hestenet: Remove Git-related information from profile...

Issue #3253658 by drumm, hestenet: Remove Git-related information from profile pages, link to git.drupalcode.org profile
parent ea0b0385
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -808,9 +808,9 @@ function drupalorg_field_extra_fields() {
        ],
      ],
    ],
    'user' => array(
      'user' => array(
        'display' => array(
    'user' => [
      'user' => [
        'display' => [
          'drupalorg_documentation_guides' => array(
            'label' => t('Documentation guides'),
            'description' => t('Documentation guides that a user maintains'),
@@ -846,9 +846,14 @@ function drupalorg_field_extra_fields() {
            'description' => t('Projects a user maintains'),
            'weight' => 0,
          ),
        ),
      ),
    ),
          'drupalorg_user_git_link' => [
            'label' => t('Git link'),
            'description' => t('Link to user’s Git account'),
            'weight' => 0,
          ],
        ],
      ],
    ],
  );
}

@@ -5329,6 +5334,13 @@ function drupalorg_user_view($account, $view_mode) {
    unset($account->content['links']['fasttoggle']['#links']['role_' . variable_get('drupalorg_crosssite_trusted_role')]);
  }

  // Link to GitLab profile.
  if (!empty($account->git_username)) {
    $account->content['drupalorg_user_git_link'] = [
      '#markup' => '<p>' . l('<img src="' . url(drupal_get_path('module', 'drupalorg') . '/images/gitlab-drop.svg') . '" alt="' . t('git.drupalcode.org icon') . '" class="icon-inline">' . t('DrupalCode profile'), variable_get('versioncontrol_gitlab_url') . '/' . $account->git_username, ['attributes' => ['class' => ['git-link']], 'html' => TRUE, 'external' => TRUE]) . '</p>',
    ];
  }

  // Hide the country if they have filled out the freeform "Location" field.
  if (!empty($account->content['field_user_location'])) {
    hide($account->content['field_country']);
+9 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<svg width="186.52541" height="243.71308" viewBox="0 0 186.52541 243.71308" xmlns="http://www.w3.org/2000/svg" xmlns:bx="https://boxy-svg.com">
  <g transform="matrix(1, 0, 0, 1, 1, -1)">
    <path d="M 130.64 52.833 C 113.491 35.692 97.129 19.352 92.26 0.923 C 87.39 19.352 71.026 35.692 53.88 52.833 C 28.16 78.536 -1 107.666 -1 151.357 C -1.024 223.151 76.681 268.047 138.868 232.171 C 167.748 215.509 185.536 184.698 185.525 151.357 C 185.525 107.669 156.367 78.536 130.64 52.833" style="fill:#009cde"/>
  </g>
  <g transform="matrix(1, 0, 0, 1, -96.733612, -67.13343)">
    <path class="cls-1" d="M 243.167 212.514 L 243.014 212.117 L 228.041 173.046 C 227.737 172.28 227.198 171.628 226.5 171.187 C 225.071 170.304 223.244 170.402 221.919 171.433 C 221.279 171.954 220.815 172.658 220.59 173.451 L 210.481 204.381 L 169.546 204.381 L 159.437 173.451 C 159.217 172.653 158.751 171.947 158.108 171.429 C 156.783 170.396 154.955 170.297 153.526 171.184 C 152.83 171.624 152.292 172.276 151.985 173.039 L 136.984 212.096 L 136.835 212.489 C 132.409 224.06 136.166 237.163 146.056 244.623 L 146.108 244.662 L 146.245 244.76 L 169.052 261.84 L 180.337 270.38 L 187.208 275.569 C 188.861 276.823 191.146 276.823 192.799 275.569 L 199.671 270.38 L 210.956 261.84 L 233.901 244.656 L 233.958 244.61 C 243.825 237.151 247.577 224.072 243.167 212.514 Z" style="fill: rgb(255, 255, 255);"/>
  </g>
</svg>
+3 −2
Original line number Diff line number Diff line
@@ -224,8 +224,9 @@ function drupalorg_user_field_group_info() {
      4 => 'field_social_links',
      5 => 'field_user_location',
      6 => 'field_slack',
      7 => 'group_profile_personal',
      8 => 'group_profile_professional',
      7 => 'drupalorg_user_git_link',
      8 => 'group_profile_personal',
      9 => 'group_profile_professional',
    ),
    'format_type' => 'div',
    'format_settings' => array(
+6 −0
Original line number Diff line number Diff line
@@ -121,6 +121,12 @@ function drupalorg_user_strongarm() {
            'visible' => TRUE,
          ),
        ),
        'drupalorg_user_git_link' => array(
          'default' => array(
            'weight' => '5',
            'visible' => TRUE,
          ),
        ),
      ),
    ),
  );