From: Andrew Dolgov Date: Mon, 22 Jan 2007 07:20:26 +0000 (+0100) Subject: rework headline subtoolbar X-Git-Tag: 1.2.7~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e6c115b29b44d2e0f9a93db5a8194694e3f9eeb6;p=tt-rss.git rework headline subtoolbar --- diff --git a/backend.php b/backend.php index 05a9957a..71bbcea4 100644 --- a/backend.php +++ b/backend.php @@ -403,13 +403,13 @@ print "
"._("Could not display feed (query failed). Please check label match syntax or local configuration.")."
"; return; } - - if (db_num_rows($result) > 0) { - print_headline_subtoolbar($link, $feed_site_url, $feed_title, false, - $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode, $offset); + print_headline_subtoolbar($link, $feed_site_url, $feed_title, false, + $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode, $offset); - print "
"; + print "
"; + + if (db_num_rows($result) > 0) { # print "\{$offset}"; @@ -573,8 +573,6 @@ print ""; } - print "
"; - // print_headline_subtoolbar($link, // "javascript:catchupPage()", "Mark page as read", true, $rtl_content); @@ -584,6 +582,8 @@ } print "
"; + + print ""; } if ($op == "pref-feeds") { diff --git a/functions.php b/functions.php index 7a19a79a..613832a0 100644 --- a/functions.php +++ b/functions.php @@ -949,7 +949,7 @@ } $feed = "$feed_title"; + href=\"javascript:viewfeed('$feed_id', '', false);\">$feed_title"; print "
  • "; if (get_pref($link, 'ENABLE_FEED_ICONS')) { @@ -2696,6 +2696,8 @@ $is_cat = false, $search = false, $match_on = false, $search_mode = false, $offset = 0) { + $user_page_offset = $offset + 1; + if (!$bottom) { $class = "headlinesSubToolbar"; $tid = "headlineActionsTop"; @@ -2713,13 +2715,9 @@ $rtl_cpart = ""; } -# if ($offset > 0) { -# $prev_page_link = "<<"; -# } else { -# $prev_page_link = "<<"; -# } -# $r_offset = $offset + 1; -# $next_page_link = "[$r_offset] >>"; + $page_prev_link = "javascript:viewFeedGoPage(-1)"; + $page_next_link = "javascript:viewFeedGoPage(1)"; + $page_first_link = "javascript:viewFeedGoPage(0)"; $catchup_page_link = "catchupPage()"; $catchup_feed_link = "catchupCurrentFeed()"; @@ -2744,22 +2742,37 @@ } -/* print " + print " - "; */ +
  • This Page
  • +
  • Entire Feed
  • +
  • -
  • + + +
  • Next Page
  • + + + "; - print "". + // old style subtoolbar: + +/* print "". _('Select:')." All, Unread, @@ -2771,7 +2784,7 @@ _('Mark as read:')." Page, Feed"; - print ""; + print ""; */ if ($search && $feed_id >= 0 && get_pref($link, 'ENABLE_LABELS') && GLOBAL_ENABLE_LABELS) { print " @@ -2795,8 +2808,12 @@ $search_q = "&q=$search&m=$match_on&smode=$search_mode"; } + if ($user_page_offset > 1) { + print " [$user_page_offset] "; + } + if (!$bottom) { - print "  + print "