예제 #1
0
    public static function getTabbedView4TextSearch($items)
    {
        //Preparo tutti i tab per i diversi tipi di oggetto
        $tab = array();
        $content_type = gglmsHelper::content_type();
        foreach ($content_type as $type) {
            $tab[$type->id] = array();
        }
        FB::log($content_type, " list content type tabbedView4TextSearch ");
        //Popolo l'array di risultati
        foreach ($items as $item) {
            //per le categorie verifico se hanno contenuti visibili al loro interno
            if ($item['tipologia'] == '101' || $item['tipologia'] == '102') {
                $totContenuti = gglmsHelper::getTOTContenuti($item['id']);
                if ($totContenuti > 0) {
                    array_push($tab[$item['tipologia']], $item);
                }
            } else {
                array_push($tab[$item['tipologia']], $item);
            }
        }
        FB::log($tab, " list content tab tabbedView4TextSearch ");
        ?>

        <div  role="tabpanel">
            <ul id="linguettetab" class="nav nav-tabs" role="tablist">
                <?php 
        foreach ($content_type as $type) {
            if (!empty($tab[$type->id])) {
                echo "<li role='presentation' >\n\t\t\t\t\t<a  class='navtab' aria-controls='#tabs-" . $type->id . "' role='tab' data-toggle='tab'\n\t\t\t\t\t\thref='#tabs-" . $type->id . "'>" . $type->descrizione . " (<b>" . sizeof($tab[$type->id]) . "</b>)</a></li>";
            }
        }
        ?>
            </ul>


            <div class="tab-content">
                <?php 
        foreach ($content_type as $type) {
            if (!empty($tab[$type->id])) {
                echo '<div role="tabpanel" class="tab-pane fade" id="tabs-' . $type->id . '"> ';
                //Apro la tab
                echo '<div id="results">';
                outputHelper::getbox($tab[$type->id]);
                echo '</div>';
                // Chiudo results
                echo '</div>';
                // Chiudo la Tab
            }
        }
        ?>
            </div> <!-- CHIUSURA TAB-CONTENT -->
        </div>  <!-- CHIUSURA TABS -->

        <script type="text/javascript">
            $("#linguettetab li:first-child").addClass("active");
            $(".tab-pane").first().addClass("active in");
            $("#gglms_menu li ").click(function () {
                window.location = $(this).find("a").attr("href");
                return false;
            });



        </script>

        <?php 
    }
예제 #2
0
                    <?php echo outputHelper::getbox(gglmsHelper::getContenuti(78)); ?>
                </div>

                <div class="boxhome">
                    <h3 class="title">

                        <button type="button" class="btn btn-default showhide espandi" aria-label="Right Align">
                            <span class=" glyphicon glyphicon-plus" aria-hidden="true"></span>
                        </button>

                        <button type="button" class="btn btn-default showhide comprimi" aria-label="Right Align">
                            <span class=" glyphicon glyphicon-minus" aria-hidden="true"></span>
                        </button>

                        I Più votati

                    </h3>

                    <?php echo outputHelper::getbox(gglmsHelper::getTopRated()); ?>
                </div>




            </div>

   
</div>