mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-30 16:38:21 +01:00
Show inline counts on the thumb grid in Pholio
Summary: This is a little rough visually but the actual number works fine. Test Plan: {F166844} Reviewers: chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D9547
This commit is contained in:
parent
85870e79aa
commit
19ed6a1ad6
3 changed files with 30 additions and 2 deletions
|
@ -31,7 +31,7 @@ final class PholioMockViewController extends PholioController {
|
|||
->setViewer($user)
|
||||
->withIDs(array($this->id))
|
||||
->needImages(true)
|
||||
->needCoverFiles(true)
|
||||
->needInlineComments(true)
|
||||
->executeOne();
|
||||
|
||||
if (!$mock) {
|
||||
|
|
|
@ -120,6 +120,16 @@ final class PholioMockThumbGridView extends AphrontView {
|
|||
$classes[] = 'pholio-mock-thumb-grid-item-obsolete';
|
||||
}
|
||||
|
||||
$inline_count = null;
|
||||
if ($image->getInlineComments()) {
|
||||
$inline_count[] = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'pholio-mock-thumb-grid-comment-count',
|
||||
),
|
||||
pht('%s', new PhutilNumber(count($image->getInlineComments()))));
|
||||
}
|
||||
|
||||
return javelin_tag(
|
||||
'a',
|
||||
array(
|
||||
|
@ -130,7 +140,10 @@ final class PholioMockThumbGridView extends AphrontView {
|
|||
'imageID' => $image->getID(),
|
||||
),
|
||||
),
|
||||
$tag);
|
||||
array(
|
||||
$tag,
|
||||
$inline_count,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -152,3 +152,18 @@
|
|||
font-weight: bold;
|
||||
color: {$bluetext};
|
||||
}
|
||||
|
||||
.pholio-mock-thumb-grid-comment-count {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
bottom: 4px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
border-radius: 10px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
background: {$indigo};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue