forked from GNUsocial/gnu-social
Added link to Subscriptions page to XHR get the ostatus sub form
This commit is contained in:
parent
e6ce04cbce
commit
3569493ba7
@ -497,4 +497,21 @@ class OStatusPlugin extends Plugin
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -55,8 +55,21 @@ class OStatusSubAction extends Action
|
||||
function showForm($error=null)
|
||||
{
|
||||
$this->error = $error;
|
||||
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()
|
||||
{
|
||||
@ -81,7 +94,7 @@ class OStatusSubAction extends Action
|
||||
$profile = $user->getProfile();
|
||||
|
||||
$this->elementStart('form', array('method' => 'post',
|
||||
'id' => 'ostatus_sub',
|
||||
'id' => 'form_ostatus_sub',
|
||||
'class' => 'form_settings',
|
||||
'action' =>
|
||||
common_local_url('ostatussub')));
|
||||
@ -141,7 +154,7 @@ class OStatusSubAction extends Action
|
||||
if ($this->profile_uri) {
|
||||
$this->validateAndPreview();
|
||||
} else {
|
||||
$this->showPage();
|
||||
$this->showForm();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,24 +7,42 @@
|
||||
* @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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user