forked from I2P_Developers/i2p.i2p
i2psnark: Edit torrent page cleanup - remove unneeded info
This commit is contained in:
@@ -3112,7 +3112,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
// first table - torrent info
|
// first table - torrent info
|
||||||
buf.append("<table class=\"snarkTorrentInfo\">\n" +
|
buf.append("<table class=\"snarkTorrentInfo\">\n" +
|
||||||
"<tr><th></th><th><b>")
|
"<tr><th></th><th><b>")
|
||||||
.append(_t("Torrent"))
|
.append(showEdit ? _t("Edit Torrent") : _t("Torrent"))
|
||||||
.append("</b></th><th>")
|
.append("</b></th><th>")
|
||||||
.append(DataHelper.escapeHTML(snark.getBaseName()))
|
.append(DataHelper.escapeHTML(snark.getBaseName()))
|
||||||
.append("</th></tr>\n");
|
.append("</th></tr>\n");
|
||||||
@@ -3126,7 +3126,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
.append("</b></td><td><a href=\"").append(_contextPath).append('/').append(baseName).append("\">")
|
.append("</b></td><td><a href=\"").append(_contextPath).append('/').append(baseName).append("\">")
|
||||||
.append(DataHelper.escapeHTML(fullPath))
|
.append(DataHelper.escapeHTML(fullPath))
|
||||||
.append("</a></td></tr>\n");
|
.append("</a></td></tr>\n");
|
||||||
if (storage != null) {
|
if (storage != null && !showEdit) {
|
||||||
buf.append("<tr><td>");
|
buf.append("<tr><td>");
|
||||||
toThemeImg(buf, "file");
|
toThemeImg(buf, "file");
|
||||||
buf.append("</td><td><b>")
|
buf.append("</td><td><b>")
|
||||||
@@ -3136,13 +3136,15 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
.append("</td></tr>\n");
|
.append("</td></tr>\n");
|
||||||
}
|
}
|
||||||
String hex = I2PSnarkUtil.toHex(snark.getInfoHash());
|
String hex = I2PSnarkUtil.toHex(snark.getInfoHash());
|
||||||
buf.append("<tr><td>");
|
if (!showEdit) {
|
||||||
toThemeImg(buf, "details");
|
buf.append("<tr><td>");
|
||||||
buf.append("</td><td><b>")
|
toThemeImg(buf, "details");
|
||||||
.append(_t("Info hash"))
|
buf.append("</td><td><b>")
|
||||||
.append("</b></td><td><span id=\"infohash\">")
|
.append(_t("Info hash"))
|
||||||
.append(hex.toUpperCase(Locale.US))
|
.append("</b></td><td><span id=\"infohash\">")
|
||||||
.append("</span></td></tr>\n");
|
.append(hex.toUpperCase(Locale.US))
|
||||||
|
.append("</span></td></tr>\n");
|
||||||
|
}
|
||||||
|
|
||||||
String announce = null;
|
String announce = null;
|
||||||
MetaInfo meta = snark.getMetaInfo();
|
MetaInfo meta = snark.getMetaInfo();
|
||||||
@@ -3284,6 +3286,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!showEdit) { // don't bother to reindent
|
||||||
if (meta == null || !meta.isPrivate()) {
|
if (meta == null || !meta.isPrivate()) {
|
||||||
buf.append("<tr><td><a href=\"")
|
buf.append("<tr><td><a href=\"")
|
||||||
.append(MagnetURI.MAGNET_FULL).append(hex);
|
.append(MagnetURI.MAGNET_FULL).append(hex);
|
||||||
@@ -3386,6 +3389,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
.append(":</b> ")
|
.append(":</b> ")
|
||||||
.append(formatSize(snark.getPieceLength(0)))
|
.append(formatSize(snark.getPieceLength(0)))
|
||||||
.append("</span></td></tr>\n");
|
.append("</span></td></tr>\n");
|
||||||
|
} // !showEdit
|
||||||
|
|
||||||
// buttons
|
// buttons
|
||||||
if (showStopStart) {
|
if (showStopStart) {
|
||||||
@@ -4183,9 +4187,11 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
MetaInfo meta = snark.getMetaInfo();
|
MetaInfo meta = snark.getMetaInfo();
|
||||||
if (meta == null)
|
if (meta == null)
|
||||||
return;
|
return;
|
||||||
buf.append("<div id=\"snarkCommentSection\"><table class=\"snarkTorrentInfo\">\n<tr><th colspan=\"5\">")
|
buf.append("<div id=\"snarkCommentSection\"><table class=\"snarkTorrentInfo\">\n")
|
||||||
.append(_t("Edit Torrent"))
|
//.append("<tr><th colspan=\"5\">")
|
||||||
.append("</th></tr>");
|
//.append(_t("Edit Torrent"))
|
||||||
|
//.append("</th>")
|
||||||
|
.append("</tr>");
|
||||||
boolean isRunning = !snark.isStopped();
|
boolean isRunning = !snark.isStopped();
|
||||||
if (isRunning) {
|
if (isRunning) {
|
||||||
// shouldn't happen
|
// shouldn't happen
|
||||||
|
|||||||
Reference in New Issue
Block a user