print "<tr>\n"; print " <th>" . $currentLanguage . "</th>\n"; // get languages in use for all categories $allLanguages = PMF_Utils::languageAvailable(0, $table = 'faqcategories'); asort($allLanguages); foreach ($allLanguages as $language) { if ($languageCodes[strtoupper($language)] != $currentLanguage) { print " <th>" . $languageCodes[strtoupper($language)] . "</th>\n"; } } $categoryDataProvider = new PMF_Category_Tree_DataProvider_SingleQuery(); $categoryTreeHelper = new PMF_Category_Tree_Helper(new PMF_Category_Tree($categoryDataProvider)); $categoryHelper = new PMF_Category_Helper(); foreach ($categoryTreeHelper as $categoryId => $categoryName) { $indent = str_repeat(' ', $categoryTreeHelper->indent); $categoryLang = $categoryTreeHelper->getInnerIterator()->current()->getLanguage(); if ($categoryLang == $LANGCODE) { print "</tr>\n"; print "<tr>\n"; } printf(" <td> %s<strong>· %s</strong> </td>\n", $indent, $categoryName); foreach ($allLanguages as $language) { if ($language != $categoryLang && !$categoryHelper->hasTranslation($categoryId, $language)) { // translate category printf(" <td class=\"needsTranslation\"> %s<strong>· %s</strong> ", $indent, $categoryName); printf('<a href="index.php?action=translatecategory&cat=%d&trlang=%s" title="%s">', $categoryId, $LANGCODE, $PMF_LANG['ad_categ_translate']); printf('<img src="images/translate.png" width="13" height="16" border="0" title="%s" alt="%s" /></a>', $PMF_LANG['ad_categ_translate'], $PMF_LANG['ad_categ_translate']); print "</td>\n"; } } }
print $PMF_LANG["ad_categ_change"]; ?> </legend> <input type="hidden" name="cat" value="<?php print $categoryId; ?> " /> <input type="hidden" name="csrf" value="<?php print $user->getCsrfTokenFromSession(); ?> " /> <div class="row"> <select name="change" size="1"> <?php foreach ($categoryTreeHelper as $catId => $categoryName) { $parent = $categoryTreeHelper->getInnerIterator()->current()->getParentId(); if ($categoryId != $catId && $parentId == $parent) { printf(" <option value=\"%s\">%s</option>\n", $catId, $categoryName); } } ?> </select> <input class="submit" type="submit" name="submit" value="<?php print $PMF_LANG["ad_categ_updatecateg"]; ?> " /> </div> </fieldset> </form> <?php printf('<p>%s</p>', $PMF_LANG['ad_categ_remark_move']);