Author: marcus
Date: Sat Jul 27 09:30:50 2013
New Revision: 1507616

URL: http://svn.apache.org/r1507616
Log:
Recognize unknown platforms/OS better  and show this in the green download box, 
then offer the 'other.html' webpage with alternative download links

Modified:
    openoffice/ooo-site/trunk/content/download/test/analyze.html

Modified: openoffice/ooo-site/trunk/content/download/test/analyze.html
URL: 
http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/analyze.html?rev=1507616&r1=1507615&r2=1507616&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/analyze.html (original)
+++ openoffice/ooo-site/trunk/content/download/test/analyze.html Sat Jul 27 
09:30:50 2013
@@ -25,24 +25,33 @@
   var NL_LANGUAGE = "";
   var LINK        = getLink();
 
-  if ( hasMirrorLink( NL_LANGUAGE ) ) {
+  if ( hasMirrorLink() ) {
+    if ( LINK.toLowerCase().indexOf( "sourceforge" ) ) {
       // Download directly from a mirror with displayed platform and language.
       document.write( "<div class=\"first button green\" id=\"optionitem1\" 
onclick=\"openItem('optionitem1','"
       + LINK + "');" + "return false;\">" );
-      document.write( "<h2><a href='" + LINK + "' title='Version " + VERSION
-      + " - Milestone " + MILESTONE + " - Build ID " + BUILD + " - SVN " + 
SVN_REV + "'>"
-      + "Download Apache OpenOffice " + VERSION + "</a></h2>"
-      + "<p><a href='" + LINK + "' title='" + LINK + "'>Click here for the 
most recent version for "
+      document.write( "<h2><a href='" + LINK + "' title='Version " + VERSION + 
" - Milestone " + MILESTONE
+      + " - Build ID " + BUILD + " - SVN " + SVN_REV + "'>Download Apache 
OpenOffice " + VERSION + "</a></h2>"
+      + "<p><a href='" + LINK + "' title='Version " + VERSION + " - Milestone 
" + MILESTONE + " - Build ID " + BUILD
+      + " - SVN " + SVN_REV + "'>Click here for the most recent version for "
       + "<b>" + UI_PLATFORM + "</b> and <b>" + LANG_ARRAY[ 2 ] + 
"</b>.</a></p>");
+    } else {
+      // OS and/or package manager was not recognized, therefore use 
"other.html" as download link.
+      document.write( "<div class=\"first button green\" id=\"optionitem1\" 
onclick=\"openItem('optionitem1','"
+      + LINK + "');" + "return false;\">" );
+      document.write( "<h2><a href='" + LINK + "' title='" + LINK + "'>Apache 
OpenOffice " + VERSION
+      + " is not available for:<br />" + UI_PLATFORM + "</a></h2>"
+      + "<p><a href='" + LINK + "' title='" + LINK + "'>Please choose from the 
alternative download webpage.</a></p>");
+    }
   } else {
-    // Download from an alternative webpage if hasMirrorLink( NL_LANGUAGE ) == 
false.
+    // Download from an alternative webpage if hasMirrorLink() == false.
     document.write( "<div class=\"first button green\" id=\"optionitem1\" 
onclick=\"openItem('optionitem1','"
     + LANG_ARRAY[ 3 ] + "');" + "return false;\">" );
     document.write( "<h2><a href='" + LANG_ARRAY[ 4 ] + "' title='" + 
LANG_ARRAY[ 4 ] + "'>"
     + "Download Apache OpenOffice " + VERSION + "</a></h2>"
     + "<p><a href='" + LANG_ARRAY[ 4 ] + "' title='" + LANG_ARRAY[ 4 ] + "'>A 
release for "
-    + "<b>" + LANG_ARRAY[ 2 ] + " (" + LANG_ARRAY[ 1 ] + ")</b> is not 
available. Please "
-    + "choose another language from the alternative download webpage.</a></p>" 
);
+    + "<b>" + LANG_ARRAY[ 2 ] + " (" + LANG_ARRAY[ 1 ] + ")</b> is not 
available. Please choose another language from the "
+    + "alternative download webpage.</a></p>" );
   }
   document.write( "</div>" );
 
@@ -97,8 +106,8 @@
     document.write( "<tr><td>Language name                             
</td><td>" + LANG_NAME                                  + "</td></tr>" );
     document.write( "<tr><td>Language ISO code                         
</td><td>" + LANG_ISO                                   + "</td></tr>" );
     document.write( "<tr><td>Language array data                       
</td><td>" + LANG_ARRAY                                 + "</td></tr>" );
-    document.write( "<tr><td>Platform name                             
</td><td>" + UI_PLATFORM                                + "</td></tr>" );
-    document.write( "<tr><td>Mirror platform name                      
</td><td>" + PLATFORM                                   + "</td></tr>" );
+    document.write( "<tr><td>UI Platform name                          
</td><td>" + UI_PLATFORM                                + "</td></tr>" );
+    document.write( "<tr><td>Mirror platform name                      
</td><td>" + URL_PLATFORM                                       + "</td></tr>" 
);
     document.write( "<tr><td>File name                                 
</td><td>" + FILENAME                                   + "</td></tr>" );
     document.write( "<tr><td>File extension                            
</td><td>" + EXTENSION                                  + "</td></tr>" );
     document.write( "<tr><td>Checksum file (here for MD5)              
</td><td>" + CHECKSUM_MD5                               + "</td></tr>" );


Reply via email to