1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-10-27 20:34:16 +00:00

Image: Show mockup of commons.wikimedia.org page when clicking on image

This commit is contained in:
gnosygnu 2016-11-13 13:47:26 -05:00
parent 306001f311
commit 69c97838ea
3 changed files with 49 additions and 47 deletions

View File

@ -150,7 +150,8 @@ public class Xog_tab_itm implements Gfo_invk {
try { try {
if (page.Tab_data().Cancel_show()) return; // Special:Search canceled show; NOTE: must be inside try b/c finally handles thread if (page.Tab_data().Cancel_show()) return; // Special:Search canceled show; NOTE: must be inside try b/c finally handles thread
wiki.Parser_mgr().Ctx().Page_(page); wiki.Parser_mgr().Ctx().Page_(page);
if (page.Db().Page().Exists_n()) { if ( page.Db().Page().Exists_n()
&& !page.Commons_mgr().Xowa_mockup()) { // do not enter "missing" section if File_mockup; EX:en.wikipedia.org/wiki/File:Protoplanetary-disk.jpg DATE:2016-11-13
if (wiki.Db_mgr().Save_mgr().Create_enabled()) { if (wiki.Db_mgr().Save_mgr().Create_enabled()) {
page = Xoae_page.New_edit(wiki, ttl); page = Xoae_page.New_edit(wiki, ttl);
view_mode = Xopg_page_.Tid_edit; view_mode = Xopg_page_.Tid_edit;

View File

@ -24,28 +24,29 @@ public class Xoh_file_page_wtr {
public byte[] Html_alt_dlm_dflt() {return html_alt_dlm_dflt;} private byte[] html_alt_dlm_dflt = Bry_.new_a7("|"); public byte[] Html_alt_dlm_dflt() {return html_alt_dlm_dflt;} private byte[] html_alt_dlm_dflt = Bry_.new_a7("|");
public byte[] Html_alt_dlm_last() {return html_alt_dlm_last;} private byte[] html_alt_dlm_last = Bry_.new_a7("."); public byte[] Html_alt_dlm_last() {return html_alt_dlm_last;} private byte[] html_alt_dlm_last = Bry_.new_a7(".");
public Bry_fmtr Html_main() {return html_main;} private final Bry_fmtr html_main = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last public Bry_fmtr Html_main() {return html_main;} private final Bry_fmtr html_main = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last
( "~{commons_notice}<ul id=\"filetoc\">" ( "~{commons_notice}<br/>"
, " <li>" // , "<ul id=\"filetoc\">"
, " <a href=\"#file\">" // , " <li>"
, " File" // , " <a href=\"#file\">"
, " </a>" // , " File"
, " </li>" // , " </a>"
, " <li>" // , " </li>"
, " <a href=\"#filehistory\">" // , " <li>"
, " File history" // , " <a href=\"#filehistory\">"
, " </a>" // , " File history"
, " </li>" // , " </a>"
, " <li>" // , " </li>"
, " <a href=\"#filelinks\">" // , " <li>"
, " File usage on Commons" // , " <a href=\"#filelinks\">"
, " </a>" // , " File usage on Commons"
, " </li>" // , " </a>"
, " <li>" // , " </li>"
, " <a href=\"#globalusage\">" // , " <li>"
, " File usage on other wikis" // , " <a href=\"#globalusage\">"
, " </a>" // , " File usage on other wikis"
, " </li>" // , " </a>"
, "</ul>" // , " </li>"
// , "</ul>"
, "~{media}" , "~{media}"
) )
, "media", "commons_notice"); , "media", "commons_notice");

View File

@ -103,29 +103,29 @@ class Xoh_ns_file_page_mgr_fxt {
wkr.Bld_html(wiki, bfr, file, ttl, opt, Bry_.To_a7_bry(html_file_size, 0)); // TEST: must pass in elem_val b/c test only uses 2nd Bld_html while app uses 1st wkr.Bld_html(wiki, bfr, file, ttl, opt, Bry_.To_a7_bry(html_file_size, 0)); // TEST: must pass in elem_val b/c test only uses 2nd Bld_html while app uses 1st
Tfds.Eq_str_lines(expd, bfr.To_str_and_clear()); Tfds.Eq_str_lines(expd, bfr.To_str_and_clear());
} }
public static final String Hdr = String_.Concat_lines_nl_skip_last public static final String Hdr = String_.Concat_lines_nl_skip_last("<br/>");
( "<ul id=\"filetoc\">" // ( "<ul id=\"filetoc\">"
, " <li>" // , " <li>"
, " <a href=\"#file\">" // , " <a href=\"#file\">"
, " File" // , " File"
, " </a>" // , " </a>"
, " </li>" // , " </li>"
, " <li>" // , " <li>"
, " <a href=\"#filehistory\">" // , " <a href=\"#filehistory\">"
, " File history" // , " File history"
, " </a>" // , " </a>"
, " </li>" // , " </li>"
, " <li>" // , " <li>"
, " <a href=\"#filelinks\">" // , " <a href=\"#filelinks\">"
, " File usage on Commons" // , " File usage on Commons"
, " </a>" // , " </a>"
, " </li>" // , " </li>"
, " <li>" // , " <li>"
, " <a href=\"#globalusage\">" // , " <a href=\"#globalusage\">"
, " File usage on other wikis" // , " File usage on other wikis"
, " </a>" // , " </a>"
, " </li>" // , " </li>"
, "</ul>" // , "</ul>"
); // );
} }