Move docs menu to site primary menu

This commit is contained in:
Evan Prodromou 2011-09-30 14:24:27 -04:00
parent 89ecda2c52
commit 82badb19c7
4 changed files with 74 additions and 34 deletions

View File

@ -162,4 +162,72 @@ class DocAction extends Action
Event::handle('EndLoadDoc', array($this->title, &$this->output)); Event::handle('EndLoadDoc', array($this->title, &$this->output));
} }
} }
function showLocalNav()
{
$menu = new DocNav($this);
$menu->show();
}
}
class DocNav extends Menu
{
function show()
{
$stub = new HomeStubNav($this->action);
$this->submenu(_m('MENU','Home'), $stub);
$docs = new DocListNav($this->action);
$this->submenu(_m('MENU','Docs'), $docs);
}
}
class DocListNav extends Menu
{
function getItems()
{
$items = array();
if (Event::handle('StartDocsMenu', array(&$items))) {
$items = array(array('doc',
array('title' => 'help'),
_m('MENU', 'Help'),
_('Getting started'),
'nav_doc_help'),
array('doc',
array('title' => 'about'),
_m('MENU', 'About'),
_('About this site'),
'nav_doc_about'),
array('doc',
array('title' => 'faq'),
_m('MENU', 'FAQ'),
_('Frequently asked questions'),
'nav_doc_faq'),
array('doc',
array('title' => 'contact'),
_m('MENU', 'Contact'),
_('Contact info'),
'nav_doc_contact'),
array('doc',
array('title' => 'tags'),
_m('MENU', 'Tags'),
_('Using tags'),
'nav_doc_tags'),
array('doc',
array('title' => 'groups'),
_m('MENU', 'Groups'),
_('Using groups'),
'nav_doc_groups'),
array('doc',
array('title' => 'api'),
_m('MENU', 'API'),
_('RESTful API'),
'nav_doc_api'));
Event::handle('EndDocsMenu', array(&$items));
}
return $items;
}
} }

View File

@ -16,24 +16,3 @@ To subscribe to other people's notifications, go to their profile page
and click the "subscribe" button. They'll get a notice that you're now and click the "subscribe" button. They'll get a notice that you're now
subscribed to their notifications, and, who knows?, they might subscribe subscribed to their notifications, and, who knows?, they might subscribe
back. back.
More help
---------
Here are some documents that you might find helpful in understanding
%%site.name%% and how to use it.
* [About](%%doc.about%%) - an overview of the service
* [FAQ](%%doc.faq%%) - frequently-asked questions about %%site.name%%
* [Contact](%%doc.contact%%) - who to contact with questions about the service
* [IM](%%doc.im%%) - using the instant-message (IM) features of %%site.name%%
* [SMS](%%doc.sms%%) - tying your cellphone to %%site.name%%
* [Tags](%%doc.tags%%) - different ways to use tagging
* [Groups](%%doc.groups%%) - joining together in groups
* [Lists](%%doc.lists%%) - organize your contacts
* [OpenMicroBlogging](%%doc.openmublog%%) - subscribing to remote users
* [Privacy](%%doc.privacy%%) - %%site.name%%'s privacy policy
* [Source](%%doc.source%%) - How to get the StatusNet source code
* [Badge](%%doc.badge%%) - How to put a StatusNet badge on your blog or homepage
* [Bookmarklet](%%doc.bookmarklet%%) - Bookmarklet for posting Web pages
* [API](%%doc.api%%) - API for use by external clients

View File

@ -52,10 +52,6 @@ private prepend a '.' to the tag in the tags editing box. To set
an existing public tag as private or vice-versa, go to the tag's an existing public tag as private or vice-versa, go to the tag's
edit page. edit page.
The most used public tags are displayed in the
[public people tag cloud](%%action.publicpeopletagcloud%%). Their
size shows their frequency of use.
Remote people tags Remote people tags
------------------ ------------------

View File

@ -536,15 +536,12 @@ class OpenIDPlugin extends Plugin
* *
* @return boolean hook value * @return boolean hook value
*/ */
function onEndLoadDoc($title, &$output) function onEndDocsMenu(&$items) {
{ $items[] = array('doc',
if ($title == 'help') { array('title' => 'openid'),
// TRANS: Item on help page. This message contains Markdown links in the form [description](link). _m('MENU', 'OpenID'),
$menuitem = _m('* [OpenID](%%doc.openid%%) - What OpenID is and how to use it with this service.'); _('Logging in with OpenID'),
'nav_doc_openid');
$output .= common_markup_to_html($menuitem);
}
return true; return true;
} }