diff options
author | Claire Revillet <grenoya@mageia.org> | 2014-01-10 23:06:05 +0000 |
---|---|---|
committer | Claire Revillet <grenoya@mageia.org> | 2014-01-10 23:06:05 +0000 |
commit | 0a860198ad45d536a51f310cd94d9757de3acd9f (patch) | |
tree | 7491379ad826825ffb8c4887318289091b715b16 /en/doc/index.php | |
parent | 80b7264f9831f21c714c96a10938f704f107c7e3 (diff) | |
download | www-0a860198ad45d536a51f310cd94d9757de3acd9f.tar www-0a860198ad45d536a51f310cd94d9757de3acd9f.tar.gz www-0a860198ad45d536a51f310cd94d9757de3acd9f.tar.bz2 www-0a860198ad45d536a51f310cd94d9757de3acd9f.tar.xz www-0a860198ad45d536a51f310cd94d9757de3acd9f.zip |
- add new section for mga4
- modification of the doc_list function to show links for epub and pdf files (optional)
Diffstat (limited to 'en/doc/index.php')
-rw-r--r-- | en/doc/index.php | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/en/doc/index.php b/en/doc/index.php index 0e9dad056..0cc61853a 100644 --- a/en/doc/index.php +++ b/en/doc/index.php @@ -3,7 +3,7 @@ define('HLANG', true); require '../../langs.php'; _lang_load($locale, 'documentation'); -function doc_list($languages, $link) +function doc_list($languages, $link, $epub_link = null, $pdf_link = null) { global $locale; global $langs; @@ -13,23 +13,36 @@ function doc_list($languages, $link) $your_language_present = FALSE; $other_languages_present = FALSE; foreach ($languages as $lng) { - // hopefully temporary exception for pt-br as convention for lang-abbrev in /langs.inc.php is different as link in doc.mageia.org + // hopefully temporary exception for pt-br and sv as convention for lang-abbrev in /langs.inc.php is different as link in doc.mageia.org if ($lng == 'pt_br') { $lng_name = $langs['pt-br']; } else { - $lng_name = $langs[$lng]; + // hopefully temporary exception for sv which does not exist yet in www.mageia.org + if ($lng == 'sv') { + $lng_name = 'Swedish'; + } else { + $lng_name = $langs[$lng]; + } } if ($locale == $lng) { $your_language_present = TRUE; - $your_language = sprintf($link . '<br/><br/>', $lng, $lng_name); + if (is_null($epub_link) or is_null($pdf_link)) { + $your_language = sprintf($link . '<br/><br/>', $lng, $lng_name); + } else { + $your_language = sprintf($link . ' <span style="font-size: 07pt;">( ' . $epub_link . ', ' . $pdf_link . ')</span><br/><br/>', $lng, $lng_name, $lng, $lng); + } } else { $other_languages_present = TRUE; - $others .= sprintf($link . '<br/>', $lng, $lng_name); + if (is_null($epub_link) or is_null($pdf_link)) { + $others .= sprintf($link . '<br/>', $lng, $lng_name); + } else { + $others .= sprintf($link . ' <span style="font-size: 07pt;">( ' . $epub_link . ', ' . $pdf_link . ')</span><br/>', $lng, $lng_name, $lng, $lng); + } } } if ($your_language_present) { - $text_your_language = _t('Documentation in your language:'); + $text_your_language = _t('Documentation in your language:') . '<br/>'; if ($other_languages_present) { $text_others = _t('There are also:') . '<br/>'; } @@ -59,6 +72,26 @@ function doc_list($languages, $link) <p><?php _e('Select the manual, the release of Mageia and the language you want to see.')?><br/> <?php _e('(If no documentation is availlable in your language, try with the old versions <a href="archive.php">here</a>)')?></p> <hr> + <h3>Mageia 4</h3> + <div style="float: left; margin: 2em;"> + <h4><?php _e('Installer')?></h4> + <p><?php + $mga4_installer = array('ca','cs','de','el','en','eo','es','et','fr','id','nl','pl','pt_br','ro','ru','sv','tr','uk'); + doc_list($mga4_installer, '<a href="//doc.mageia.org/installer/4/%s/content/index.html">%s</a>', + '<a href="//doc.mageia.org/installer/4/%s/content/index.html">EPUB</a>', + '<a href="//doc.mageia.org/installer/4/%s/content/index.html">PDF</a>'); + ?></p> + </div> + <div style="float: right; margin: 2em;"> + <h4><?php _e('Control Center')?></h4> + <p><?php + $mga4_control_center = array('de','en','et','fr','id','nl','ru','tr','uk'); + doc_list($mga4_control_center, '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">%s</a>', + '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">EPUB</a>', + '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">PDF</a>'); + ?></p> + </div> + <hr style="clear: both;"> <h3>Mageia 3</h3> <div style="float: left; margin: 2em;"> <h4><?php _e('Installer')?></h4> |