diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-05-19 10:12:19 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-05-19 10:12:19 -0400 |
commit | 749178f34371aabb8a22166fe64920a42679dcc5 (patch) | |
tree | 59779e38ccc73b17decbd01dd279dbf3688a0cc9 /actions | |
parent | c87951f89518e276a85f41eaecf34da0720f49c5 (diff) |
better headers
Added H1 headers to all pages. Added H2 headers to sections of pages,
where appropriate.
Moved a lot of TODOs around.
Made the public stream the default if no action is specified.
darcs-hash:20080519141219-84dde-f9917a8351596060faa7ff5d231417773764a8fd.gz
Diffstat (limited to 'actions')
-rw-r--r-- | actions/all.php | 1 | ||||
-rw-r--r-- | actions/newnotice.php | 2 | ||||
-rw-r--r-- | actions/shownotice.php | 2 | ||||
-rw-r--r-- | actions/showstream.php | 27 |
4 files changed, 25 insertions, 7 deletions
diff --git a/actions/all.php b/actions/all.php index 7cd1f5beb..3994e8666 100644 --- a/actions/all.php +++ b/actions/all.php @@ -43,6 +43,7 @@ class AllAction extends ShowstreamAction { $notice->find(); common_element_start('div', 'notices'); + common_element('h2', 'notices', _t('Notices')); while ($notice->fetch()) { $this->show_notice($notice); diff --git a/actions/newnotice.php b/actions/newnotice.php index fa7badd3d..dd1f71b41 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -53,6 +53,7 @@ class NewnoticeAction extends Action { } function show_form() { + common_show_header(_t('New notice')); common_element_start('form', array('id' => 'newnotice', 'method' => 'POST', 'action' => common_local_url('newnotice'))); common_element('span', 'nickname', $profile->nickname); @@ -61,5 +62,6 @@ class NewnoticeAction extends Action { 'id' => 'content')); common_element('input', array('type' => 'submit', 'value' => 'Send')); common_element_end('form'); + common_show_footer(); } }
\ No newline at end of file diff --git a/actions/shownotice.php b/actions/shownotice.php index b7a96f0ab..ec91f1d4f 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -36,7 +36,7 @@ class ShownoticeAction extends Action { # Looks like we're good; show the header - common_show_header($profile->nickname); + common_show_header($profile->nickname." status on ".$notice->created); $this->show_notice($notice); diff --git a/actions/showstream.php b/actions/showstream.php index 82a55518d..63ba0d9af 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -92,6 +92,9 @@ class ShowstreamAction extends StreamAction { function show_profile($profile) { common_element_start('div', 'profile'); + + common_element('h2', 'nickname', $profile->nickname); + $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); if ($avatar) { common_element('img', array('src' => $avatar->url, @@ -100,7 +103,6 @@ class ShowstreamAction extends StreamAction { 'height' => AVATAR_PROFILE_SIZE, 'title' => $profile->nickname)); } - common_element('span', 'nickname', $profile->nickname); if ($profile->fullname) { if ($profile->homepage) { common_element('a', array('href' => $profile->homepage, @@ -136,7 +138,7 @@ class ShowstreamAction extends StreamAction { 'name' => 'unsubscribeto', 'type' => 'hidden', 'value' => $profile->nickname)); - common_element('input', array('type' => 'submit'), _t('unsubscribe')); + common_element('input', array('type' => 'submit'), _t('Unsubscribe')); common_element_end('form'); } @@ -147,6 +149,8 @@ class ShowstreamAction extends StreamAction { common_element_start('div', 'subscriptions'); + common_element('h2', 'subscriptions', _t('Subscriptions')); + $cnt = 0; if ($subs) { @@ -212,6 +216,9 @@ class ShowstreamAction extends StreamAction { $notice_count = 0; } + common_element_start('div', 'statistics'); + common_element('h2', 'statistics', _t('Statistics')); + # Other stats...? common_element_start('dl', 'statistics'); common_element('dt', _t('Subscriptions')); @@ -221,6 +228,8 @@ class ShowstreamAction extends StreamAction { common_element('dt', _t('Notices')); common_element('dd', $notice_count); common_element_end('dl'); + + common_element_end('div'); } function show_notices($profile) { @@ -237,7 +246,8 @@ class ShowstreamAction extends StreamAction { $notice->find(); common_element_start('div', 'notices'); - + common_element('h2', 'notices', _t('Notices')); + while ($notice->fetch()) { $this->show_notice($notice); } @@ -246,18 +256,23 @@ class ShowstreamAction extends StreamAction { } function show_last_notice($profile) { + + common_element_start('div', 'lastnotice'); + common_element('h2', 'lastnotice', _t('Currently')); + $notice = DB_DataObject::factory('notice'); $notice->profile_id = $profile->id; $notice->orderBy('created DESC'); $notice->limit(0, 1); - $notice->find(); - - while ($notice->fetch()) { + + if ($notice->find(true)) { # FIXME: URL, image, video, audio common_element('span', array('class' => 'content'), $notice->content); common_element('span', array('class' => 'date'), common_date_string($notice->created)); } + + common_element_end('div'); } } |