Differential D14474 Diff 35005 src/applications/subscriptions/view/SubscriptionListStringBuilder.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/subscriptions/view/SubscriptionListStringBuilder.php
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | private function buildString($list_uri) { | ||||
if ($subscribers_count <= ($show_count + 1)) { | if ($subscribers_count <= ($show_count + 1)) { | ||||
return phutil_implode_html(', ', mpull($handles, 'renderLink')); | return phutil_implode_html(', ', mpull($handles, 'renderLink')); | ||||
} | } | ||||
$show = array_slice($handles, 0, $show_count); | $show = array_slice($handles, 0, $show_count); | ||||
$show = array_values($show); | $show = array_values($show); | ||||
$not_shown_count = $subscribers_count - $show_count; | $not_shown_count = $subscribers_count - $show_count; | ||||
$not_shown_txt = pht('%d other(s)', $not_shown_count); | $not_shown_txt = pht('%s other(s)', new PhutilNumber($not_shown_count)); | ||||
$not_shown_link = javelin_tag( | $not_shown_link = javelin_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => $list_uri, | 'href' => $list_uri, | ||||
'sigil' => 'workflow', | 'sigil' => 'workflow', | ||||
), | ), | ||||
$not_shown_txt); | $not_shown_txt); | ||||
Show All 9 Lines |