\r
$reply .= "<select dojoType=\"dijit.form.Select\"\r
onchange=\"headlineActionsChange(this)\">";\r
- $reply .= "<option value=\"false\">".__('Actions...')."</option>";\r
+ $reply .= "<option value=\"false\">".__('More...')."</option>";\r
\r
$reply .= "<option value=\"0\" disabled=\"1\">".__('Selection toggle:')."</option>";\r
\r
\r
}\r
\r
- $reply .= "<option value=\"emailArticle(false)\">".__('Forward by email').\r
- "</option>";\r
+ global $pluginhost;\r
+\r
+ if ($pluginhost->get_plugin("mail")) {\r
+ $reply .= "<option value=\"emailArticle(false)\">".__('Forward by email').\r
+ "</option>";\r
+ }\r
\r
$reply .= "<option value=\"0\" disabled=\"1\">".__('Feed:')."</option>";\r
\r
$next_unread_feed, $offset, $vgr_last_feed = false,\r
$override_order = false, $include_children = false) {\r
\r
+ if (isset($_REQUEST["DevForceUpdate"]))\r
+ header("Content-Type: text/plain");\r
+\r
$disable_cache = false;\r
\r
$reply = array();\r
\r
$reply['content'] .= "<div>";\r
\r
- $reply['content'] .= "<input type=\"checkbox\" onclick=\"toggleSelectRowById(this,\r
- 'RROW-$id')\" id=\"RCHK-$id\"/>";\r
+ $reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"\r
+ type=\"checkbox\" onclick=\"toggleSelectRow2(this)\"\r
+ id=\"RCHK-$id\">";\r
\r
$reply['content'] .= "$marked_pic";\r
$reply['content'] .= "$published_pic";\r
\r
$reply['content'] .= "<div style=\"float : right\">";\r
\r
- $reply['content'] .= "<img src=\"images/art-zoom.png\"\r
- onclick=\"zoomToArticle(event, $id)\"\r
- style=\"cursor : pointer\"\r
- alt='Zoom'\r
- title='".__('Open article in new tab')."'>";\r
-\r
- //$note_escaped = htmlspecialchars($line['note'], ENT_QUOTES);\r
-\r
foreach ($pluginhost->get_hooks($pluginhost::HOOK_ARTICLE_BUTTON) as $p) {\r
$reply['content'] .= $p->hook_article_button($line);\r
}\r
\r
- $reply['content'] .= "<img src=\"images/digest_checkbox.png\"\r
- style=\"cursor : pointer\" style=\"cursor : pointer\"\r
- onclick=\"dismissArticle($id)\"\r
- title='".__('Close article')."'>";\r
-\r
$reply['content'] .= "</div>";\r
$reply['content'] .= "</div>";\r
\r
* when there's nothing to load - e.g. no stuff in fresh feed */\r
\r
if ($feed == -5) {\r
- print json_encode(generate_dashboard_feed($this->link));\r
+ print json_encode($this->generate_dashboard_feed($this->link));\r
return;\r
}\r
\r
}\r
\r
if ($result && db_num_rows($result) == 0) {\r
- print json_encode(generate_error_feed($this->link, __("Feed not found.")));\r
+ print json_encode($this->generate_error_feed($this->link, __("Feed not found.")));\r
return;\r
}\r
\r
print json_encode($reply);\r
\r
}\r
+\r
+ private function generate_dashboard_feed($link) {\r
+ $reply = array();\r
+\r
+ $reply['headlines']['id'] = -5;\r
+ $reply['headlines']['is_cat'] = false;\r
+\r
+ $reply['headlines']['toolbar'] = '';\r
+ $reply['headlines']['content'] = "<div class='whiteBox'>".__('No feed selected.');\r
+\r
+ $reply['headlines']['content'] .= "<p class=\"small\"><span class=\"insensitive\">";\r
+\r
+ $result = db_query($link, "SELECT ".SUBSTRING_FOR_DATE."(MAX(last_updated), 1, 19) AS last_updated FROM ttrss_feeds\r
+ WHERE owner_uid = " . $_SESSION['uid']);\r
+\r
+ $last_updated = db_fetch_result($result, 0, "last_updated");\r
+ $last_updated = make_local_datetime($link, $last_updated, false);\r
+\r
+ $reply['headlines']['content'] .= sprintf(__("Feeds last updated at %s"), $last_updated);\r
+\r
+ $result = db_query($link, "SELECT COUNT(id) AS num_errors\r
+ FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);\r
+\r
+ $num_errors = db_fetch_result($result, 0, "num_errors");\r
+\r
+ if ($num_errors > 0) {\r
+ $reply['headlines']['content'] .= "<br/>";\r
+ $reply['headlines']['content'] .= "<a class=\"insensitive\" href=\"#\" onclick=\"showFeedsWithErrors()\">".\r
+ __('Some feeds have update errors (click for details)')."</a>";\r
+ }\r
+ $reply['headlines']['content'] .= "</span></p>";\r
+\r
+ $reply['headlines-info'] = array("count" => 0,\r
+ "vgroup_last_feed" => '',\r
+ "unread" => 0,\r
+ "disable_cache" => true);\r
+\r
+ return $reply;\r
+ }\r
+\r
+ private function generate_error_feed($link, $error) {\r
+ $reply = array();\r
+\r
+ $reply['headlines']['id'] = -6;\r
+ $reply['headlines']['is_cat'] = false;\r
+\r
+ $reply['headlines']['toolbar'] = '';\r
+ $reply['headlines']['content'] = "<div class='whiteBox'>". $error . "</div>";\r
+\r
+ $reply['headlines-info'] = array("count" => 0,\r
+ "vgroup_last_feed" => '',\r
+ "unread" => 0,\r
+ "disable_cache" => true);\r
+\r
+ return $reply;\r
+ }\r
+\r
+\r
}\r
?>\r