<ul> <?php $nodes = $root->getBranch(); ?> <?php foreach ($nodes as $page_pk) { ?> <li class="<?php echo $page_pk->getIsPublished() ? 'published' : 'unpublished'; ?> "> <?php foreach (sfPlop::get('sf_plop_cultures') as $localization) { ?> <?php echo link_to(image_flag($localization, array('alt' => format_language($localization))), '@sf_plop_page_show?slug=' . $page_pk->getSlug() . '&sf_culture=' . $localization, array('class' => 'element flag w-img-link', 'title' => $page_pk->getSlug())); ?> <?php } ?> <?php echo link_to_unless($page->getSlug() == $page_pk->getSlug(), str_repeat('-', $page_pk->getLevel()) . ' ' . $page_pk->getSlug(), '@sf_plop_page_show?sf_culture=' . $culture . '&slug=' . $page_pk->getSlug(), array('class' => 'element', 'title' => $page_pk->getSlug())); ?> <?php echo widgetIndicator($page_pk->isTemplate(), 'edit', __('This indicates if the page is a template (lock icon).', '', 'plopAdmin'), array('rel' => $page_pk->getSlug())); ?> <?php echo widgetIndicator($page_pk->isPublished(), 'publish', __('This indicates if the page is published (green tick) or not (red bullet).', '', 'plopAdmin'), array('rel' => $page_pk->getSlug())); ?> </li> <?php
?> <?php if (!$current || $current && !$hide_current) { ?> <li class="<?php if ($current) { ?> current<?php } ?> "> <?php $node_title = ucfirst(format_language($localization, $localization)); ?> <?php $node_label = ($use_flag ? image_flag($localization, array('alt' => $node_title)) : null) . ($use_label ? content_tag('strong', $node_title) : null); ?> <?php echo link_to_unless($relative_slug == '' && $settings['culture'] == $localization, $node_label, '@sf_plop_page_show?sf_culture=' . $localization . '&slug=' . ($relative_slug != '' ? $relative_slug : $page->getSlug()), array('class' => 'element lang-' . $localization, 'title' => $node_title)); ?> </li> <?php } ?> <?php $current = false; ?> <?php } ?>