1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
phorge-phorge/src/applications/conpherence/view/ConpherencePeopleWidgetView.php
Chad Little 4ab7243d7b Tweaking Widget Panel in Conpherence
Summary:
Fixes T3252. Other enhancements:

- Header in widget panel was 2px too short.
- Typeahead in add people only allowed one person
- Typeahead in add people was cutoff by overflow:hidden
- X in remove has been changed to unicode (multiply)
- Add people dialog form fields are full width
- Some other CSS tweaks.

Test Plan: Add, Remove people.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3252

Differential Revision: https://secure.phabricator.com/D6076
2013-05-30 08:30:56 -07:00

57 lines
1.5 KiB
PHP

<?php
/**
* @group conpherence
*/
final class ConpherencePeopleWidgetView extends ConpherenceWidgetView {
public function render() {
$conpherence = $this->getConpherence();
$widget_data = $conpherence->getWidgetData();
$user = $this->getUser();
$conpherence = $this->getConpherence();
$participants = $conpherence->getParticipants();
$handles = $conpherence->getHandles();
$body = array();
// future proof by using participants to iterate through handles;
// we may have non-people handles sooner or later
foreach ($participants as $user_phid => $participant) {
$handle = $handles[$user_phid];
$remove_html = '';
if ($user_phid == $user->getPHID()) {
$remove_html = javelin_tag(
'a',
array(
'class' => 'remove',
'sigil' => 'remove-person',
'meta' => array(
'remove_person' => $handle->getPHID(),
'action' => 'remove_person',
)
),
hsprintf('<span class="close-icon">&times;</span>'));
}
$body[] = phutil_tag(
'div',
array(
'class' => 'person-entry grouped'
),
array(
phutil_tag(
'a',
array(
'class' => 'pic',
),
phutil_tag(
'img',
array(
'src' => $handle->getImageURI()
),
'')),
$handle->renderLink(),
$remove_html));
}
return $body;
}
}