diff options
author | Andrew Dolgov <[email protected]> | 2008-03-30 06:49:28 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-03-30 06:49:28 +0100 |
commit | 4bfe3b4341006fe3b78cb597cfa091cd77e61b65 (patch) | |
tree | fcf5e2e500f146f72782cf8fa5495a4f8335453a /mobile/functions.php | |
parent | c1fb4a5e205689d1b2dca5a7c52dd9643502ad40 (diff) |
mobile: add view mode selection dropbox
Diffstat (limited to 'mobile/functions.php')
-rw-r--r-- | mobile/functions.php | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/mobile/functions.php b/mobile/functions.php index 99afe10c6..fe9dab4ed 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -317,7 +317,16 @@ $subop = $_GET["subop"]; $catchup_op = $_GET["catchup_op"]; - if (!$view_mode) $view_mode = "Adaptive"; + if (!$view_mode) { + if ($_SESSION["mobile:viewmode"]) { + $view_mode = $_SESSION["mobile:viewmode"]; + } else { + $view_mode = "adaptive"; + } + } + + $_SESSION["mobile:viewmode"] = $view_mode; + if (!$limit) $limit = 30; if (!$feed) $feed = 0; @@ -418,12 +427,37 @@ print "<a href=\"tt-rss.php\">Back</a>, "; print "<a href=\"tt-rss.php?go=sform&aid=$feed&ic=$cat_view\">Search</a>, "; print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=ForceUpdate\">Update</a>"; + # print "Mark as read: "; # print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkAsRead\">Page</a>, "; # print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkAllRead\">Feed</a>"; print ")</span>"; - + + print " " . __('View:'); + + print "<form style=\"display : inline\" method=\"GET\" action=\"tt-rss.php\">"; + + /* print "<select name=\"viewmode\"> + <option selected value=\"adaptive\"> " . __('Adaptive') . "</option> + <option value=\"all_articles\">" . __('All Articles') . "</option> + <option value=\"marked\">" . __('Starred') . "</option> + <option value=\"unread\">" . __('Unread') . "</option> + </select>"; */ + + $sel_values = array( + "adaptive" => __("Adaptive"), + "all_articles" => __("All Articles"), + "unread" => __("Unread"), + "marked" => __("Starred")); + + print_select_hash("viewmode", $view_mode, $sel_values); + + print "<input type=\"hidden\" name=\"id\" value=\"$feed\"> + <input type=\"hidden\" name=\"go\" value=\"vf\"> + <input type=\"submit\" value=\"".__('Refresh')."\">"; + print "</form>"; + print "</div>"; if (db_num_rows($result) > 0) { |