Loading drupalorg/includes/DrupalorgIssueFork.php +34 −32 Original line number Diff line number Diff line Loading @@ -470,12 +470,7 @@ class DrupalorgIssueFork extends Entity { 'link' => [ '#markup' => '<strong><a class="link" title="' . t('View branch in GitLab') . '">' . $branch_name_sanitized . '</a></strong> ', ], 'compare' => [ '#prefix' => '<a class="compare" title="Compare branches in the issue fork">', '#markup' => $compare_image . t('compare'), '#suffix' => '</a> ', ], 'mr' => [], 'operations' => [], 'help' => [ '#type' => 'textfield', '#title' => t('Check out this branch'), Loading @@ -489,23 +484,20 @@ class DrupalorgIssueFork extends Entity { ]; // Merge requests for the branch. if (empty($row->merge_requests)) { $branch_output['operations']['compare'] = [ '#prefix' => '<a class="compare" title="Compare branches in the issue fork">', '#markup' => $compare_image . t('compare'), '#suffix' => '</a> ', ]; if ($is_member && !is_null($this->getDevRelease())) { $branch_output['mr'] = drupal_get_form('drupalorg_issue_fork_open_merge_request_form', $this, $row->branch); } $branch_output['operations']['mr'] = drupal_get_form('drupalorg_issue_fork_open_merge_request_form', $this, $row->branch); } else { $branch_output['mr']['#markup'] = ''; } foreach ($row->merge_requests as $iid => $info) { $merge_request_url = $this->mergeRequestUrl($iid); $branch_output['mr']['#markup'] .= ' ' . l(t('<strong><abbr title="Merge Request">MR</abbr> !@iid</strong>', [ '@iid' => $iid, ]), $merge_request_url, [ 'attributes' => ['class' => ['merge-request']], 'html' => TRUE, 'external' => TRUE, ]); $branch_output['compare'] = [ $branch_output['operations'][] = [ '#prefix' => !empty($branch_output['operations']) ? ' / ' : '', 'compare' => [ '#markup' => l($compare_image . t('changes'), $merge_request_url . '/diffs', [ 'attributes' => [ 'class' => ['compare'], Loading @@ -520,6 +512,16 @@ class DrupalorgIssueFork extends Entity { 'html' => TRUE, 'external' => TRUE, ]) . ' ', ], 'mr' => [ '#markup' => l(t('<strong><abbr title="Merge Request">MR</abbr> !@iid</strong>', [ '@iid' => $iid, ]), $merge_request_url, [ 'attributes' => ['class' => ['merge-request']], 'html' => TRUE, 'external' => TRUE, ]), ], ]; } $output['branches'][$row->status][] = $branch_output; Loading Loading
drupalorg/includes/DrupalorgIssueFork.php +34 −32 Original line number Diff line number Diff line Loading @@ -470,12 +470,7 @@ class DrupalorgIssueFork extends Entity { 'link' => [ '#markup' => '<strong><a class="link" title="' . t('View branch in GitLab') . '">' . $branch_name_sanitized . '</a></strong> ', ], 'compare' => [ '#prefix' => '<a class="compare" title="Compare branches in the issue fork">', '#markup' => $compare_image . t('compare'), '#suffix' => '</a> ', ], 'mr' => [], 'operations' => [], 'help' => [ '#type' => 'textfield', '#title' => t('Check out this branch'), Loading @@ -489,23 +484,20 @@ class DrupalorgIssueFork extends Entity { ]; // Merge requests for the branch. if (empty($row->merge_requests)) { $branch_output['operations']['compare'] = [ '#prefix' => '<a class="compare" title="Compare branches in the issue fork">', '#markup' => $compare_image . t('compare'), '#suffix' => '</a> ', ]; if ($is_member && !is_null($this->getDevRelease())) { $branch_output['mr'] = drupal_get_form('drupalorg_issue_fork_open_merge_request_form', $this, $row->branch); } $branch_output['operations']['mr'] = drupal_get_form('drupalorg_issue_fork_open_merge_request_form', $this, $row->branch); } else { $branch_output['mr']['#markup'] = ''; } foreach ($row->merge_requests as $iid => $info) { $merge_request_url = $this->mergeRequestUrl($iid); $branch_output['mr']['#markup'] .= ' ' . l(t('<strong><abbr title="Merge Request">MR</abbr> !@iid</strong>', [ '@iid' => $iid, ]), $merge_request_url, [ 'attributes' => ['class' => ['merge-request']], 'html' => TRUE, 'external' => TRUE, ]); $branch_output['compare'] = [ $branch_output['operations'][] = [ '#prefix' => !empty($branch_output['operations']) ? ' / ' : '', 'compare' => [ '#markup' => l($compare_image . t('changes'), $merge_request_url . '/diffs', [ 'attributes' => [ 'class' => ['compare'], Loading @@ -520,6 +512,16 @@ class DrupalorgIssueFork extends Entity { 'html' => TRUE, 'external' => TRUE, ]) . ' ', ], 'mr' => [ '#markup' => l(t('<strong><abbr title="Merge Request">MR</abbr> !@iid</strong>', [ '@iid' => $iid, ]), $merge_request_url, [ 'attributes' => ['class' => ['merge-request']], 'html' => TRUE, 'external' => TRUE, ]), ], ]; } $output['branches'][$row->status][] = $branch_output; Loading