Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
This commit is contained in:
commit
c0bae505d9
|
@ -277,6 +277,13 @@ class Action extends HTMLOutputter // lawsuit
|
||||||
$this->cssLink('css/display.css', $baseTheme, $media);
|
$this->cssLink('css/display.css', $baseTheme, $media);
|
||||||
}
|
}
|
||||||
$this->cssLink('css/display.css', $mainTheme, $media);
|
$this->cssLink('css/display.css', $mainTheme, $media);
|
||||||
|
|
||||||
|
// Additional styles for RTL languages
|
||||||
|
if (is_rtl(common_language())) {
|
||||||
|
if (file_exists(Theme::file('css/rtl.css'))) {
|
||||||
|
$this->cssLink('css/rtl.css', $mainTheme, $media);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -241,13 +241,13 @@ class ApiAction extends Action
|
||||||
|
|
||||||
// Is the requesting user following this user?
|
// Is the requesting user following this user?
|
||||||
$twitter_user['following'] = false;
|
$twitter_user['following'] = false;
|
||||||
$twitter_user['statusnet:blocking'] = false;
|
$twitter_user['statusnet_blocking'] = false;
|
||||||
$twitter_user['notifications'] = false;
|
$twitter_user['notifications'] = false;
|
||||||
|
|
||||||
if (isset($this->auth_user)) {
|
if (isset($this->auth_user)) {
|
||||||
|
|
||||||
$twitter_user['following'] = $this->auth_user->isSubscribed($profile);
|
$twitter_user['following'] = $this->auth_user->isSubscribed($profile);
|
||||||
$twitter_user['statusnet:blocking'] = $this->auth_user->hasBlocked($profile);
|
$twitter_user['statusnet_blocking'] = $this->auth_user->hasBlocked($profile);
|
||||||
|
|
||||||
// Notifications on?
|
// Notifications on?
|
||||||
$sub = Subscription::pkeyGet(array('subscriber' =>
|
$sub = Subscription::pkeyGet(array('subscriber' =>
|
||||||
|
@ -317,6 +317,7 @@ class ApiAction extends Action
|
||||||
|
|
||||||
$twitter_status['source'] = $source;
|
$twitter_status['source'] = $source;
|
||||||
$twitter_status['id'] = intval($notice->id);
|
$twitter_status['id'] = intval($notice->id);
|
||||||
|
$twitter_status['statusnet_conversation_id'] = intval($notice->conversation);
|
||||||
|
|
||||||
$replier_profile = null;
|
$replier_profile = null;
|
||||||
|
|
||||||
|
|
|
@ -289,6 +289,21 @@ function get_nice_language_list()
|
||||||
return $nice_lang;
|
return $nice_lang;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check whether a language is right-to-left
|
||||||
|
*
|
||||||
|
* @param string $lang language code of the language to check
|
||||||
|
*
|
||||||
|
* @return boolean true if language is rtl
|
||||||
|
*/
|
||||||
|
|
||||||
|
function is_rtl($lang)
|
||||||
|
{
|
||||||
|
$all_languages = common_config('site', 'languages');
|
||||||
|
$lang = $all_languages[$lang];
|
||||||
|
return ($lang['direction'] == 'rtl');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all languages that are enabled in the default config
|
* Get a list of all languages that are enabled in the default config
|
||||||
*
|
*
|
||||||
|
|
|
@ -84,7 +84,7 @@ class ActivityPlugin extends Plugin
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
$sub = Subscription::pkeyGet(array('subscriber' => $subscriber->id,
|
$sub = Subscription::pkeyGet(array('subscriber' => $subscriber->id,
|
||||||
'subscribed' => $other->id));
|
'subscribed' => $other->id));
|
||||||
$rendered = sprintf(_m('<em><a href="%s">%s</a> started following <a href="%s">%s</a></em>.'),
|
$rendered = sprintf(_m('<a href="%s">%s</a> started following <a href="%s">%s</a>.'),
|
||||||
$subscriber->profileurl,
|
$subscriber->profileurl,
|
||||||
$subscriber->getBestName(),
|
$subscriber->getBestName(),
|
||||||
$other->profileurl,
|
$other->profileurl,
|
||||||
|
@ -114,7 +114,7 @@ class ActivityPlugin extends Plugin
|
||||||
if(!$this->StopFollowUser) return true;
|
if(!$this->StopFollowUser) return true;
|
||||||
$user = $subscriber->getUser();
|
$user = $subscriber->getUser();
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
$rendered = sprintf(_m('<em><a href="%s">%s</a> stopped following <a href="%s">%s</a></em>.'),
|
$rendered = sprintf(_m('<a href="%s">%s</a> stopped following <a href="%s">%s</a>.'),
|
||||||
$subscriber->profileurl,
|
$subscriber->profileurl,
|
||||||
$subscriber->getBestName(),
|
$subscriber->getBestName(),
|
||||||
$other->profileurl,
|
$other->profileurl,
|
||||||
|
@ -156,7 +156,7 @@ class ActivityPlugin extends Plugin
|
||||||
$fave = Fave::pkeyGet(array('user_id' => $user->id,
|
$fave = Fave::pkeyGet(array('user_id' => $user->id,
|
||||||
'notice_id' => $notice->id));
|
'notice_id' => $notice->id));
|
||||||
|
|
||||||
$rendered = sprintf(_m('<em><a href="%s">%s</a> liked <a href="%s">%s\'s update</a></em>.'),
|
$rendered = sprintf(_m('<a href="%s">%s</a> liked <a href="%s">%s\'s update</a>.'),
|
||||||
$profile->profileurl,
|
$profile->profileurl,
|
||||||
$profile->getBestName(),
|
$profile->getBestName(),
|
||||||
$notice->bestUrl(),
|
$notice->bestUrl(),
|
||||||
|
@ -189,7 +189,7 @@ class ActivityPlugin extends Plugin
|
||||||
|
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
$author = Profile::staticGet('id', $notice->profile_id);
|
$author = Profile::staticGet('id', $notice->profile_id);
|
||||||
$rendered = sprintf(_m('<em><a href="%s">%s</a> stopped liking <a href="%s">%s\'s update</a></em>.'),
|
$rendered = sprintf(_m('<a href="%s">%s</a> stopped liking <a href="%s">%s\'s update</a>.'),
|
||||||
$profile->profileurl,
|
$profile->profileurl,
|
||||||
$profile->getBestName(),
|
$profile->getBestName(),
|
||||||
$notice->bestUrl(),
|
$notice->bestUrl(),
|
||||||
|
@ -230,7 +230,7 @@ class ActivityPlugin extends Plugin
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rendered = sprintf(_m('<em><a href="%s">%s</a> joined the group <a href="%s">%s</a></em>.'),
|
$rendered = sprintf(_m('<a href="%s">%s</a> joined the group <a href="%s">%s</a>.'),
|
||||||
$profile->profileurl,
|
$profile->profileurl,
|
||||||
$profile->getBestName(),
|
$profile->getBestName(),
|
||||||
$group->homeUrl(),
|
$group->homeUrl(),
|
||||||
|
@ -267,7 +267,7 @@ class ActivityPlugin extends Plugin
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rendered = sprintf(_m('<em><a href="%s">%s</a> left the group <a href="%s">%s</a></em>.'),
|
$rendered = sprintf(_m('<a href="%s">%s</a> left the group <a href="%s">%s</a>.'),
|
||||||
$profile->profileurl,
|
$profile->profileurl,
|
||||||
$profile->getBestName(),
|
$profile->getBestName(),
|
||||||
$group->homeUrl(),
|
$group->homeUrl(),
|
||||||
|
|
|
@ -58,7 +58,7 @@ class JoinListItem extends SystemListItem
|
||||||
$out->elementStart('div', 'join-activity');
|
$out->elementStart('div', 'join-activity');
|
||||||
$profile = $mem->getMember();
|
$profile = $mem->getMember();
|
||||||
$group = $mem->getGroup();
|
$group = $mem->getGroup();
|
||||||
$out->raw(sprintf(_m('<em><a href="%s">%s</a> joined the group <a href="%s">%s</a></em>.'),
|
$out->raw(sprintf(_m('<a href="%s">%s</a> joined the group <a href="%s">%s</a>.'),
|
||||||
$profile->profileurl,
|
$profile->profileurl,
|
||||||
$profile->getBestName(),
|
$profile->getBestName(),
|
||||||
$group->homeUrl(),
|
$group->homeUrl(),
|
||||||
|
|
|
@ -56,7 +56,7 @@ class SystemListItem extends NoticeListItemAdapter
|
||||||
function showNotice()
|
function showNotice()
|
||||||
{
|
{
|
||||||
$out = $this->nli->out;
|
$out = $this->nli->out;
|
||||||
$out->elementStart('div');
|
$out->elementStart('div', 'entry-title');
|
||||||
$this->showContent();
|
$this->showContent();
|
||||||
$out->elementEnd('div');
|
$out->elementEnd('div');
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,15 +42,6 @@ class DirectionDetectorPlugin extends Plugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* SN plugin API, here we will add css needed for modifiyed rendered
|
|
||||||
*
|
|
||||||
* @param Action $xml
|
|
||||||
*/
|
|
||||||
public function onEndShowStatusNetStyles($xml){
|
|
||||||
$xml->element('style', array('type' => 'text/css'), 'span.rtl {display:block;direction:rtl;text-align:right;float:right;} .notice .author {float:left}');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* is passed string a rtl content or not
|
* is passed string a rtl content or not
|
||||||
*
|
*
|
||||||
|
|
|
@ -1514,6 +1514,22 @@ content:'☠';
|
||||||
font-size:150%;
|
font-size:150%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#content .notice-source-system div.entry-title, .notice-source-system div.entry-content {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content .notice-source-system div.entry-title {
|
||||||
|
font-style: italic;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.rtl {
|
||||||
|
display: block;
|
||||||
|
direction: rtl;
|
||||||
|
text-align: right;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
/* override OStatus plugin style */
|
/* override OStatus plugin style */
|
||||||
|
|
||||||
#form_ostatus_connect.form_settings.dialogbox, #form_ostatus_sub.dialogbox {
|
#form_ostatus_connect.form_settings.dialogbox, #form_ostatus_sub.dialogbox {
|
||||||
|
|
1
theme/base/css/rtl.css
Normal file
1
theme/base/css/rtl.css
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/* placeholder for RTL style */
|
1
theme/neo/css/rtl.css
Normal file
1
theme/neo/css/rtl.css
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/* placeholder for RTL style */
|
Loading…
Reference in New Issue
Block a user