Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x

This commit is contained in:
Evan Prodromou 2009-04-07 17:14:10 -04:00
commit 92d18134bf
11 changed files with 68 additions and 41 deletions

View File

@ -93,6 +93,32 @@ class AllAction extends Action
$nav->show(); $nav->show();
} }
function showPageNotice()
{
$notice = $this->user->noticesWithFriends(0, 1);
if ($notice->count()) {
return;
}
$message = sprintf(_('This is the timeline for %s and friends but no one has posted anything yet.'), $this->user->nickname) . ' ';
if (common_logged_in()) {
$current_user = common_current_user();
if ($this->user->id === $current_user->id) {
$message .= _('Try subscribing to more people, [join a group](%%action.groups) or post something yourself.');
} else {
$message .= sprintf(_('You can try to [nudge %s](./) from his profile or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, '@' . $this->user->nickname);
}
}
else {
$message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to his or her attention.'), $this->user->nickname);
}
$this->elementStart('div', 'guide');
$this->raw(common_markup_to_html($message));
$this->elementEnd('div');
}
function showContent() function showContent()
{ {
$notice = $this->user->noticesWithFriends(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); $notice = $this->user->noticesWithFriends(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);

View File

@ -150,7 +150,7 @@ class FavoritedAction extends Action
return; return;
} }
$message = _('Favorite notices appear on this page but noone has favorited one yet.') . ' '; $message = _('Favorite notices appear on this page but no one has favorited one yet.') . ' ';
if (common_logged_in()) { if (common_logged_in()) {
$message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.'); $message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.');
@ -159,7 +159,7 @@ class FavoritedAction extends Action
$message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!'); $message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!');
} }
$this->elementStart('div', 'blankfiller'); $this->elementStart('div', 'guide');
$this->raw(common_markup_to_html($message)); $this->raw(common_markup_to_html($message));
$this->elementEnd('div'); $this->elementEnd('div');
} }

View File

@ -84,7 +84,7 @@ class GroupsearchAction extends SearchAction
else { else {
$message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!'); $message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!');
} }
$this->elementStart('div', 'blankfiller'); $this->elementStart('div', 'guide');
$this->raw(common_markup_to_html($message)); $this->raw(common_markup_to_html($message));
$this->elementEnd('div'); $this->elementEnd('div');
$user_group->free(); $user_group->free();

View File

@ -124,7 +124,7 @@ class NoticesearchAction extends SearchAction
$message = sprintf(_('Why not [register an account](%%%%action.register%%%%) and be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q)); $message = sprintf(_('Why not [register an account](%%%%action.register%%%%) and be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q));
} }
$this->elementStart('div', 'blankfiller'); $this->elementStart('div', 'guide');
$this->raw(common_markup_to_html($message)); $this->raw(common_markup_to_html($message));
$this->elementEnd('div'); $this->elementEnd('div');
return; return;

View File

@ -179,7 +179,7 @@ class PublicAction extends Action
return; return;
} }
$message = _('This is the public timeline for %%site.name%% but noone has posted anything yet.') . ' '; $message = _('This is the public timeline for %%site.name%% but no one has posted anything yet.') . ' ';
if (common_logged_in()) { if (common_logged_in()) {
$message .= _('Be the first to post!'); $message .= _('Be the first to post!');
@ -188,7 +188,7 @@ class PublicAction extends Action
$message .= _('Why not [register an account](%%action.register%%) and be the first to post!'); $message .= _('Why not [register an account](%%action.register%%) and be the first to post!');
} }
$this->elementStart('div', 'blankfiller'); $this->elementStart('div', 'guide');
$this->raw(common_markup_to_html($message)); $this->raw(common_markup_to_html($message));
$this->elementEnd('div'); $this->elementEnd('div');
} }

View File

@ -68,7 +68,7 @@ class PublictagcloudAction extends Action
return; return;
} }
$message = _('Noone has posted a notice with a [hashtag](%%doc.tags%%) yet.') . ' '; $message = _('No one has posted a notice with a [hashtag](%%doc.tags%%) yet.') . ' ';
if (common_logged_in()) { if (common_logged_in()) {
$message .= _('Be the first to post one!'); $message .= _('Be the first to post one!');
@ -77,7 +77,7 @@ class PublictagcloudAction extends Action
$message .= _('Why not [register an account](%%action.register%%) and be the first to post one!'); $message .= _('Why not [register an account](%%action.register%%) and be the first to post one!');
} }
$this->elementStart('div', 'blankfiller'); $this->elementStart('div', 'guide');
$this->raw(common_markup_to_html($message)); $this->raw(common_markup_to_html($message));
$this->elementEnd('div'); $this->elementEnd('div');
} }

View File

@ -402,13 +402,8 @@ class Action extends HTMLOutputter // lawsuit
if ($user) { if ($user) {
$this->menuItem(common_local_url('all', array('nickname' => $user->nickname)), $this->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
_('Home'), _('Personal profile and friends timeline'), false, 'nav_home'); _('Home'), _('Personal profile and friends timeline'), false, 'nav_home');
}
$this->menuItem(common_local_url('peoplesearch'),
_('Search'), _('Search for people or text'), false, 'nav_search');
if ($user) {
$this->menuItem(common_local_url('profilesettings'), $this->menuItem(common_local_url('profilesettings'),
_('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account'); _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account');
if (common_config('xmpp', 'enabled')) { if (common_config('xmpp', 'enabled')) {
$this->menuItem(common_local_url('imsettings'), $this->menuItem(common_local_url('imsettings'),
_('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect'); _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect');
@ -416,20 +411,28 @@ class Action extends HTMLOutputter // lawsuit
$this->menuItem(common_local_url('smssettings'), $this->menuItem(common_local_url('smssettings'),
_('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect'); _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
} }
$this->menuItem(common_local_url('invite'),
_('Invite'),
sprintf(_('Invite friends and colleagues to join you on %s'),
common_config('site', 'name')),
false, 'nav_invitecontact');
$this->menuItem(common_local_url('logout'), $this->menuItem(common_local_url('logout'),
_('Logout'), _('Logout from the site'), false, 'nav_logout'); _('Logout'), _('Logout from the site'), false, 'nav_logout');
} else { }
$this->menuItem(common_local_url('login'), else {
_('Login'), _('Login to the site'), false, 'nav_login');
if (!common_config('site', 'closed')) { if (!common_config('site', 'closed')) {
$this->menuItem(common_local_url('register'), $this->menuItem(common_local_url('register'),
_('Register'), _('Create an account'), false, 'nav_register'); _('Register'), _('Create an account'), false, 'nav_register');
} }
$this->menuItem(common_local_url('openidlogin'), $this->menuItem(common_local_url('openidlogin'),
_('OpenID'), _('Login with OpenID'), false, 'nav_openid'); _('OpenID'), _('Login with OpenID'), false, 'nav_openid');
$this->menuItem(common_local_url('login'),
_('Login'), _('Login to the site'), false, 'nav_login');
} }
$this->menuItem(common_local_url('doc', array('title' => 'help')), $this->menuItem(common_local_url('doc', array('title' => 'help')),
_('Help'), _('Help me!'), false, 'nav_help'); _('Help'), _('Help me!'), false, 'nav_help');
$this->menuItem(common_local_url('peoplesearch'),
_('Search'), _('Search for people or text'), false, 'nav_search');
Event::handle('EndPrimaryNav', array($this)); Event::handle('EndPrimaryNav', array($this));
} }
$this->elementEnd('ul'); $this->elementEnd('ul');

View File

@ -152,8 +152,11 @@ You can also try your search on other engines:
E_O_T E_O_T
), $qe, $qe, $qe, $qe); ), $qe, $qe, $qe, $qe);
$this->elementStart('div', 'blankfiller'); $this->elementStart('dl', array('id' => 'help_search', 'class' => 'help'));
$this->element('dt', null, _('Search help'));
$this->elementStart('dd', 'instructions');
$this->raw(common_markup_to_html($message)); $this->raw(common_markup_to_html($message));
$this->elementEnd('dd');
$this->elementEnd('div'); $this->elementEnd('div');
} }
} }

View File

@ -83,12 +83,13 @@ left:0;
border:0; border:0;
} }
#page_notice .error, .error,
#page_notice .success { .success {
padding:4px 7px; padding:4px 7px;
border-radius:4px; border-radius:4px;
-moz-border-radius:4px; -moz-border-radius:4px;
-webkit-border-radius:4px; -webkit-border-radius:4px;
margin-bottom:18px;
} }
form label.submit { form label.submit {
display:none; display:none;
@ -384,6 +385,7 @@ margin-bottom:1em;
#content { #content {
width:64.009%; width:64.009%;
min-height:259px;
padding:1.795%; padding:1.795%;
float:left; float:left;
border-radius:7px; border-radius:7px;
@ -403,6 +405,7 @@ float:left;
#aside_primary { #aside_primary {
width:27.917%; width:27.917%;
min-height:259px;
float:left; float:left;
margin-left:0.395%; margin-left:0.395%;
padding:1.795%; padding:1.795%;
@ -1143,4 +1146,13 @@ clear:both;
margin-bottom:0; margin-bottom:0;
} }
.instructions ul {
list-style-position:inside;
}
.instructions p,
.instructions ul {
margin-bottom:18px;
}
.help dt {
display:none;
}

View File

@ -37,7 +37,6 @@ background:none;
input.submit, input.submit,
#form_notice.warning #notice_text-count, #form_notice.warning #notice_text-count,
#nav_register a,
.form_settings .form_note, .form_settings .form_note,
.entity_remote_subscribe { .entity_remote_subscribe {
background-color:#A9BF4F; background-color:#A9BF4F;
@ -48,7 +47,6 @@ input:focus, textarea:focus, select:focus,
border-color:#A9BF4F; border-color:#A9BF4F;
} }
input.submit, input.submit,
#nav_register a,
.entity_remote_subscribe { .entity_remote_subscribe {
color:#fff; color:#fff;
} }
@ -97,13 +95,6 @@ cursor:wait;
text-indent:-9999px; text-indent:-9999px;
} }
#nav_register a {
text-decoration:none;
font-weight:bold;
padding:2px 4px;
}
#content, #content,
#site_nav_local_views a, #site_nav_local_views a,
#aside_primary { #aside_primary {
@ -122,10 +113,10 @@ background-color:rgba(255, 255, 255, 0.7);
} }
#page_notice .error { .error {
background-color:#F7E8E8; background-color:#F7E8E8;
} }
#page_notice .success { .success {
background-color:#EFF3DC; background-color:#EFF3DC;
} }

View File

@ -37,7 +37,6 @@ background:none;
input.submit, input.submit,
#form_notice.warning #notice_text-count, #form_notice.warning #notice_text-count,
#nav_register a,
.form_settings .form_note, .form_settings .form_note,
.entity_remote_subscribe { .entity_remote_subscribe {
background-color:#9BB43E; background-color:#9BB43E;
@ -48,7 +47,6 @@ input:focus, textarea:focus, select:focus,
border-color:#9BB43E; border-color:#9BB43E;
} }
input.submit, input.submit,
#nav_register a,
.entity_remote_subscribe { .entity_remote_subscribe {
color:#fff; color:#fff;
} }
@ -97,12 +95,6 @@ cursor:wait;
text-indent:-9999px; text-indent:-9999px;
} }
#nav_register a {
text-decoration:none;
font-weight:bold;
padding:2px 4px;
}
#content, #content,
#site_nav_local_views a, #site_nav_local_views a,
#aside_primary { #aside_primary {
@ -121,10 +113,10 @@ background-color:rgba(255, 255, 255, 0.7);
} }
#page_notice .error { .error {
background-color:#F7E8E8; background-color:#F7E8E8;
} }
#page_notice .success { .success {
background-color:#EFF3DC; background-color:#EFF3DC;
} }