Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conpherence/view/ConpherenceThreadListView.php
| Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | $title = phutil_tag( | ||||
| $icon, | $icon, | ||||
| $data['title'], | $data['title'], | ||||
| )); | )); | ||||
| $subtitle = $data['subtitle']; | $subtitle = $data['subtitle']; | ||||
| $unread_count = $data['unread_count']; | $unread_count = $data['unread_count']; | ||||
| $epoch = $data['epoch']; | $epoch = $data['epoch']; | ||||
| $image = $data['image']; | $image = $data['image']; | ||||
| $dom_id = $thread->getPHID().'-nav-item'; | $dom_id = $thread->getPHID().'-nav-item'; | ||||
| $glyph_pref = PhabricatorUserPreferences::PREFERENCE_TITLES; | |||||
| $preferences = $user->loadPreferences(); | |||||
| if ($preferences->getPreference($glyph_pref) == 'glyph') { | |||||
| $glyph = id(new PhabricatorConpherenceApplication()) | |||||
| ->getTitleGlyph().' '; | |||||
| } else { | |||||
| $glyph = null; | |||||
| } | |||||
| return id(new ConpherenceMenuItemView()) | return id(new ConpherenceMenuItemView()) | ||||
| ->setUser($user) | ->setUser($user) | ||||
| ->setTitle($title) | ->setTitle($title) | ||||
| ->setSubtitle($subtitle) | ->setSubtitle($subtitle) | ||||
| ->setHref($uri) | ->setHref($uri) | ||||
| ->setEpoch($epoch) | ->setEpoch($epoch) | ||||
| ->setImageURI($image) | ->setImageURI($image) | ||||
| ->setUnreadCount($unread_count) | ->setUnreadCount($unread_count) | ||||
| ->setID($thread->getPHID().'-nav-item') | ->setID($thread->getPHID().'-nav-item') | ||||
| ->addSigil('conpherence-menu-click') | ->addSigil('conpherence-menu-click') | ||||
| ->setMetadata( | ->setMetadata( | ||||
| array( | array( | ||||
| 'title' => $glyph.$data['title'], | 'title' => $data['title'], | ||||
| 'id' => $dom_id, | 'id' => $dom_id, | ||||
| 'threadID' => $thread->getID(), | 'threadID' => $thread->getID(), | ||||
| )); | )); | ||||
| } | } | ||||
| private function addRoomsToMenu( | private function addRoomsToMenu( | ||||
| PHUIListView $menu, | PHUIListView $menu, | ||||
| array $rooms, | array $rooms, | ||||
| ▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines | |||||