}
return true;
}
+
+ function onStartShowSubscriptionsContent($action)
+ {
+ $user = common_current_user();
+ if ($user && ($user->id == $action->profile->id)) {
+ $action->elementStart('div', 'entity_actions');
+ $action->elementStart('p', array('id' => 'entity_remote_subscribe',
+ 'class' => 'entity_subscribe'));
+ $action->element('a', array('href' => common_local_url('ostatussub'),
+ 'class' => 'entity_remote_subscribe')
+ , _m('Subscribe to remote user'));
+ $action->elementEnd('p');
+ $action->elementEnd('div');
+ }
+
+ return true;
+ }
}
function showForm($error=null)
{
$this->error = $error;
- $this->showPage();
+ if ($this->boolean('ajax')) {
+ header('Content-Type: text/xml;charset=utf-8');
+ $this->xw->startDocument('1.0', 'UTF-8');
+ $this->elementStart('html');
+ $this->elementStart('head');
+ $this->element('title', null, _m('Subscribe to user'));
+ $this->elementEnd('head');
+ $this->elementStart('body');
+ $this->showContent();
+ $this->elementEnd('body');
+ $this->elementEnd('html');
+ } else {
+ $this->showPage();
+ }
}
function showPageNotice()
$profile = $user->getProfile();
$this->elementStart('form', array('method' => 'post',
- 'id' => 'ostatus_sub',
+ 'id' => 'form_ostatus_sub',
'class' => 'form_settings',
'action' =>
common_local_url('ostatussub')));
if ($this->profile_uri) {
$this->validateAndPreview();
} else {
- $this->showPage();
+ $this->showForm();
}
}
}
* @link http://status.net/
*/
-#form_ostatus_connect.dialogbox {
+#form_ostatus_connect.dialogbox,
+#form_ostatus_sub.dialogbox {
width:70%;
background-image:none;
}
-#form_ostatus_connect.dialogbox .form_data label {
+#form_ostatus_sub.dialogbox {
+width:65%;
+}
+#form_ostatus_connect.dialogbox .form_data label,
+#form_ostatus_sub.dialogbox .form_data label {
width:34%;
}
-#form_ostatus_connect.dialogbox .form_data input {
+#form_ostatus_connect.dialogbox .form_data input,
+#form_ostatus_sub.dialogbox .form_data input {
width:57%;
}
-#form_ostatus_connect.dialogbox .form_data .form_guide {
+#form_ostatus_connect.dialogbox .form_data .form_guide,
+#form_ostatus_sub.dialogbox .form_data .form_guide {
margin-left:36%;
}
-#form_ostatus_connect.dialogbox #ostatus_nickname {
+#form_ostatus_connect.dialogbox #ostatus_nickname,
+#form_ostatus_sub.dialogbox #ostatus_nickname {
display:none;
}
-#form_ostatus_connect.dialogbox .submit_dialogbox {
+#form_ostatus_connect.dialogbox .submit_dialogbox,
+#form_ostatus_sub.dialogbox .submit_dialogbox {
min-width:96px;
}
+
+#subscriptions #entity_remote_subscribe {
+padding:0;
+float:right;
+}
+
+#subscriptions .entity_remote_subscribe {
+float:right;
+}