]> git.wh0rd.org Git - tt-rss.git/commitdiff
tweak new version dialog
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 25 Nov 2010 11:57:32 +0000 (14:57 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 25 Nov 2010 11:57:32 +0000 (14:57 +0300)
functions.php
modules/popup-dialog.php

index 5f88c5552c765b4084205a8cca5c0bd8d7c43a92..23638fea9d9b35f46099a28c0054a113da92a576 100644 (file)
                                if ($version_data && $version_data['version']) {        
 
                                        if (version_compare(VERSION, $version_data['version']) == -1) {
-                                               return $version_data['version'];
+                                               return $version_data;
                                        }
                                }
                        }
index 394ee16a07e852124ab2ff64f4b5c05260902d24..16b727fd1f5a0a0cac9941c9efa174cadcdd2bf1 100644 (file)
                }
 
                if ($id == "newVersion") {
-                       $version = check_for_update($link);
-
-                       $version_link = "<a class=\"visibleLink\" target=\"_blank\" 
-                               href=\"http://tt-rss.org\">http://tt-rss.org</a>";
+                       $version_data = check_for_update($link);
+                       $version = $version_data['version'];
+                       $id = $version_data['version_id'];
 
                        print "<div class='tagCloudContainer'>";
 
-                       print T_sprintf("New version of Tiny Tiny RSS is available (%s).<br/>Visit %s for more information.", "<b>$version</b>", $version_link);
+                       print T_sprintf("New version of Tiny Tiny RSS is available (%s).", 
+                               "<b>$version</b>");
 
                        print "</div>";
 
+                       $details = "http://tt-rss.org/redmine/versions/show/$id";
+                       $download = "http://tt-rss.org/#Download";
+
                        print "<div style='text-align : center'>";
+                       print "<button dojoType=\"dijit.form.Button\" 
+                               onclick=\"return window.open('$details')\">".__("Details")."</button>";
+                       print "<button dojoType=\"dijit.form.Button\" 
+                               onclick=\"return window.open('$download')\">".__("Download")."</button>";
                        print "<button dojoType=\"dijit.form.Button\" 
                                onclick=\"return dijit.byId('newVersionDlg').hide()\">".
                                __('Close this window')."</button>";