i2psnark: Show start-all button even if tunnel is open,

if at least one torrent is stopped (ticket #808)
This commit is contained in:
zzz
2013-06-20 21:21:07 +00:00
parent 25feb745bc
commit 5bd028bff5

View File

@ -502,6 +502,23 @@ public class I2PSnarkServlet extends BasicServlet {
out.write("\">"); out.write("\">");
if (isDegraded) if (isDegraded)
out.write("</a>"); out.write("</a>");
for (Snark s : snarks) {
if (s.isStopped()) {
// show startall too
out.write("<br>");
if (isDegraded)
out.write("<a href=\"/" + _contextPath + "/?action=StartAll&amp;nonce=" + _nonce + "\"><img title=\"");
else
out.write("<input type=\"image\" name=\"action_StartAll\" value=\"foo\" title=\"");
out.write(_("Start all stopped torrents"));
out.write("\" src=\"" + _imgPath + "start_all.png\" alt=\"");
out.write(_("Start All"));
out.write("\">");
if (isDegraded)
out.write("</a>");
break;
}
}
} else if ((!_manager.util().isConnecting()) && !snarks.isEmpty()) { } else if ((!_manager.util().isConnecting()) && !snarks.isEmpty()) {
if (isDegraded) if (isDegraded)
out.write("<a href=\"/" + _contextPath + "/?action=StartAll&amp;nonce=" + _nonce + "\"><img title=\""); out.write("<a href=\"/" + _contextPath + "/?action=StartAll&amp;nonce=" + _nonce + "\"><img title=\"");