Skip to content
Snippets Groups Projects

Issue #3432912: Add a link to the credit abuse policy under owner tools

+ 5
3
@@ -1261,24 +1261,26 @@ function drupalorg_org_owner_tools(stdClass $node) {
$year_credit_count = $credit_view->total_rows;
if ($year_credit_count >0) {
if ($year_credit_count > 0) {
$content['issues_fixed'] = [
'#markup' => t('<div class="partner-tier-content"><div>' . format_plural(ceil($year_credit_count), '<strong>@count</strong> issue (closed/fixed) <br>in the last 12 months<br><strong>→ @year_issue_cred_weighted weighted credit</strong></div><div><br>You have @ninety-day-weighted-credits weighted credits over the past 90 days.<p><br>Issue credits are granted by project maintainers. Contributors should follow <a href="@con-guidelines-url">org contribution guidelines</a>, <a href="@issue-ettiquette-url">issue ettiquette</a>, and the <a href="@standards-of-conduct-url">standards of conduct for the marketplace</a></p></div></div>.', '<strong>@count</strong> issues (closed/fixed) <br>in the last 12 months <br><strong>→ @year_issue_cred_weighted weighted credits</strong></div><div><br>You have @ninety-day-weighted-credits weighted credits over the past 90 days.<p><br>Issue credits are granted by project maintainers. Contributors should follow <a href="@con-guidelines-url">org contribution guidelines</a>, <a href="@issue-ettiquette-url">issue ettiquette</a>, and the <a href="@standards-of-conduct-url">standards of conduct for the marketplace</a></p></div></div>.', [
'#markup' => t('<div class="partner-tier-content"><div>' . format_plural(ceil($year_credit_count), '<strong>@count</strong> issue (closed/fixed) <br>in the last 12 months<br><strong>→ @year_issue_cred_weighted weighted credit</strong></div><div><br>You have @ninety-day-weighted-credits weighted credits over the past 90 days.<p><br>Issue credits are granted by project maintainers. Contributors should follow <a href="@con-guidelines-url">org contribution guidelines</a>, <a href="@issue-ettiquette-url">issue ettiquette</a>, and the <a href="@standards-of-conduct-url">standards of conduct for the marketplace</a>. <a href="@credit-abuse-policy">Abuse of the credit system</a> can have a negative impact.</p></div></div>', '<strong>@count</strong> issues (closed/fixed) <br>in the last 12 months <br><strong>→ @year_issue_cred_weighted weighted credits</strong></div><div><br>You have @ninety-day-weighted-credits weighted credits over the past 90 days.<p><br>Issue credits are granted by project maintainers. Contributors should follow <a href="@con-guidelines-url">org contribution guidelines</a>, <a href="@issue-ettiquette-url">issue ettiquette</a>, and the <a href="@standards-of-conduct-url">standards of conduct for the marketplace</a>. <a href="@credit-abuse-policy">Abuse of the credit system</a> can have a negative impact.</p></div></div>', [
'@year_issue_cred_weighted' => ceil($node->field_weighted_org_issue_cred_yr[LANGUAGE_NONE][0]['value']),
'@ninety-day-weighted-credits' => ceil(empty($node->field_drupalorg_rank_components[LANGUAGE_NONE][0]['value']) ? 0 : $node->field_drupalorg_rank_components[LANGUAGE_NONE][0]['value']),
'@con-guidelines-url' => 'https://www.youtube.com/watch?v=lu7ND0JT-8A',
'@issue-ettiquette-url' => url('docs/develop/issues/issue-procedures-and-etiquette/issue-etiquette'),
'@standards-of-conduct-url' => url('drupalorg/docs/marketplace/services-listing', ['fragment' => 's-standards-of-conduct-once-listed']),
'@credit-abuse-policy' => url('drupalorg/docs/marketplace/abuse-of-the-contribution-credit-system', ['fragment' => 's-what-is-considered-abuse-of-the-contribution-credit-system']),
])),
];
}
else {
$content['issues_fixed'] = [
'#markup' => t('<div class="partner-tier-content"><div>No issues closed/fixed<br>in the past 12 months.</div><div><br>You have @ninety-day-weighted-credits weighted credits over the past 90 days.<p><br>Issue credits are granted by project maintainers. Contributors should follow <a href="@con-guidelines-url">org contribution guidelines</a>, <a href="@issue-ettiquette-url">issue ettiquette</a>, and the <a href="@standards-of-conduct-url">standards of conduct for the marketplace</a></p></div></div>', [
'#markup' => t('<div class="partner-tier-content"><div>No issues closed/fixed<br>in the past 12 months.</div><div><br>You have @ninety-day-weighted-credits weighted credits over the past 90 days.<p><br>Issue credits are granted by project maintainers. Contributors should follow <a href="@con-guidelines-url">org contribution guidelines</a>, <a href="@issue-ettiquette-url">issue ettiquette</a>, and the <a href="@standards-of-conduct-url">standards of conduct for the marketplace</a>. <a href="@credit-abuse-policy">Abuse of the credit system</a> can have a negative impact.</p></div></div>', [
'@ninety-day-weighted-credits' => ceil(empty($node->field_drupalorg_rank_components[LANGUAGE_NONE][0]['value']) ? 0 : $node->field_drupalorg_rank_components[LANGUAGE_NONE][0]['value']),
'@con-guidelines-url' => 'https://www.youtube.com/watch?v=lu7ND0JT-8A',
'@issue-ettiquette-url' => url('docs/develop/issues/issue-procedures-and-etiquette/issue-etiquette'),
'@standards-of-conduct-url' => url('drupalorg/docs/marketplace/services-listing', ['fragment' => 's-standards-of-conduct-once-listed']),
'@credit-abuse-policy' => url('drupalorg/docs/marketplace/abuse-of-the-contribution-credit-system', ['fragment' => 's-what-is-considered-abuse-of-the-contribution-credit-system']),
])
];
}
Loading