+ $consumer = $this->application->getConsumer();
+
+ $this->elementStart('div', 'entity_profile h-card');
+ // TRANS: Header on the OAuth application page.
+ $this->element('h2', null, _('Application profile'));
+ if (!empty($this->application->icon)) {
+ $this->element('img', array('src' => $this->application->icon,
+ 'class' => 'u-photo logo entity_depiction'));
+ }
+
+ $this->element('a', array('href' => $this->application->source_url,
+ 'class' => 'u-url p-name entity_fn'),
+ $this->application->name);
+
+ $this->element('a', array('href' => $this->application->homepage,
+ 'class' => 'u-url entity_org'),
+ $this->application->organization);
+
+ $this->element('div',
+ 'note entity_note',
+ $this->application->description);
+
+ $this->elementStart('div', 'entity_statistics');
+ $defaultAccess = ($this->application->access_type & Oauth_application::$writeAccess)
+ ? 'read-write' : 'read-only';
+ $profile = Profile::getKV($this->application->owner);
+
+ $appUsers = new Oauth_application_user();
+ $appUsers->application_id = $this->application->id;
+ $userCnt = $appUsers->count();
+
+ $this->raw(sprintf(
+ // TRANS: Information output on an OAuth application page.
+ // TRANS: %1$s is the application creator, %2$s is "read-only" or "read-write",
+ // TRANS: %3$d is the number of users using the OAuth application.
+ _m('Created by %1$s - %2$s access by default - %3$d user',
+ 'Created by %1$s - %2$s access by default - %3$d users',
+ $userCnt),
+ $profile->getBestName(),
+ $defaultAccess,
+ $userCnt
+ ));
+ $this->elementEnd('div');
+
+ $this->elementEnd('div');
+