Example #1
0
/**
 * Return the HTML for summarizing a random featured exhibit
 *
 * @return string
 */
function custom_exhibit_builder_display_random_featured_exhibit()
{
    $html = '<div id="featured-exhibit">';
    $featuredExhibit = exhibit_builder_random_featured_exhibit();
    $html .= '<h2> L\'exposition </h2>';
    if ($featuredExhibit) {
        $html .= '<h3>' . exhibit_builder_link_to_exhibit($featuredExhibit) . '</h3>' . "\n";
        $html .= '<p>' . snippet_by_word_count(metadata($featuredExhibit, 'description', array('no_escape' => true))) . '</p>';
    } else {
        $html .= '<p>' . __('You have no featured exhibits.') . '</p>';
    }
    $html .= '</div>';
    $html = apply_filters('exhibit_builder_display_random_featured_exhibit', $html);
    return $html;
}
Example #2
0
function hijack_exhibit_builder_random_featured_exhibit()
{
    $html = '<div id="featured-exhibit">';
    $featuredExhibit = exhibit_builder_random_featured_exhibit();
    $html .= '<h2>' . __('Featured Exhibit') . '</h2>';
    if ($featuredExhibit) {
        $html .= '<h3>' . exhibit_builder_link_to_exhibit($featuredExhibit) . '</h3>' . "\n";
        if ($item = get_record('Item', array('sort_field' => 'random', 'exhibit' => $featuredExhibit->id, 'hasImage' => true))) {
            $html .= exhibit_builder_link_to_exhibit($featuredExhibit, item_image('square_thumbnail', array(), 0, $item), array('class' => 'image'));
        }
        $html .= '<p class="description">' . snippet_by_word_count(metadata($featuredExhibit, 'description', array('no_escape' => true))) . '</p>';
    } else {
        $html .= '<p>' . __('You have no featured exhibits.') . '</p>';
    }
    $html .= '</div>';
    return $html;
}
Example #3
0
     if ($exhibitImage = record_image($exhibit, 'square_thumbnail')) {
         ?>
                     <?php 
     }
     ?>
                     <?php 
     if ($exhibitDescription = metadata('exhibit', 'description', array('no_escape' => true))) {
         ?>
                         <h3 class="title_ini" style="font-weight:300; font-size:13px; text-align:justify;">
                         <?php 
         $resumo_texto = $exhibit->description;
         $conta_letra = strlen($resumo_texto);
         if ($conta_letra <= 140) {
             echo resumo($resumo_texto, 140);
         } else {
             echo resumo($resumo_texto, 140) . exhibit_builder_link_to_exhibit($exhibit, '&nbsp;&nbsp;&nbsp;(Saiba Mais)', array('style' => 'color:#768BCD'));
         }
         ?>
                         </h3>
                     <?php 
     }
     ?>
                 </div>
                     <?php 
     $exhibitCount++;
     ?>
                 <?php 
 }
 ?>
                 <?php 
 echo pagination_links();
        </div>
    </fieldset>
    </section>
    <?php 
echo $csrf;
?>
    <section class="three columns omega">
        <div id="save" class="panel">
            <?php 
echo $this->formSubmit('save_exhibit', __('Save Changes'), array('class' => 'submit big green button'));
?>
            <?php 
if ($exhibit->exists()) {
    ?>
                <?php 
    echo exhibit_builder_link_to_exhibit($exhibit, __('View Public Page'), array('class' => 'big blue button', 'target' => '_blank'));
    ?>
                <?php 
    if (is_allowed($exhibit, 'delete')) {
        ?>
                    <?php 
        echo link_to($exhibit, 'delete-confirm', __('Delete Exhibit'), array('class' => 'big red button delete-confirm'));
        ?>
                <?php 
    }
    ?>
            <?php 
}
?>
            <div id="public-featured">
                <div class="public">
Example #5
0
    echo $nextLink;
    ?>
    </div>
    <?php 
}
?>
    <div id="exhibit-nav-up">
    <?php 
echo exhibit_builder_page_trail();
?>
    </div>
</div>

<?php 
if ($exhibitNavOption == 'side') {
    ?>
<nav id="exhibit-pages" class="side">
    <h4><?php 
    echo exhibit_builder_link_to_exhibit($exhibit);
    ?>
</h4>
    <?php 
    echo exhibit_builder_page_tree($exhibit, $exhibit_page);
    ?>
</nav>
<?php 
}
?>

<?php 
echo foot();
Example #6
0
        if ($exhibitCount % 2 == 1) {
            echo ' even';
        } else {
            echo ' odd';
        }
        ?>
">
        <h2><?php 
        echo link_to_exhibit();
        ?>
</h2>
        <?php 
        if ($exhibitImage = record_image($exhibit, 'square_thumbnail')) {
            ?>
            <?php 
            echo exhibit_builder_link_to_exhibit($exhibit, $exhibitImage, array('class' => 'image'));
            ?>
        <?php 
        }
        ?>
        <?php 
        if ($exhibitDescription = metadata('exhibit', 'description', array('no_escape' => true))) {
            ?>
        <div class="description"><?php 
            echo $exhibitDescription;
            ?>
</div>
        <?php 
        }
        ?>
        <?php 
Example #7
0
" alt="featured Exhibit Image" />
                    </div>
                <?php 
            }
            ?>

<!--                 <div class="sp-layer sp-static sp-black sp-padding" data-position="bottomLeft" data-height="20%">
 -->                <div class="featured-text sp-caption">
                        <h3><?php 
            echo exhibit_builder_link_to_exhibit($featuredExhibit);
            ?>
</h3>

                    <p><?php 
            echo snippet_by_word_count(metadata($featuredExhibit, 'description', array('no_escape' => true)), 200);
            echo exhibit_builder_link_to_exhibit($featuredExhibit, $text = ' Learn More&rarr;');
            ?>
</p>
                    </div>
                    
<!--                 </div>
 -->
            </div>

        <?php 
        }
        ?>
        
    </div>

</div>
Example #8
0
/**
 * Return a link to the parent exhibit page
 *
 * @param string $text Link text
 * @param array $props Link attributes
 * @param ExhibitPage $exhibitPage If null, will use the current exhibit page
 * @return string
 */
function exhibit_builder_link_to_parent_page($text = null, $props = array(), $exhibitPage = null)
{
    if (!$exhibitPage) {
        $exhibitPage = get_current_record('exhibit_page');
    }
    $exhibit = get_record_by_id('Exhibit', $exhibitPage->exhibit_id);
    if ($exhibitPage->parent_id) {
        $parentPage = $exhibitPage->getParent();
        if (!isset($props['class'])) {
            $props['class'] = 'parent-page';
        }
        if ($text === null) {
            $text = '&uarr; ' . metadata($parentPage, 'title');
        }
        return exhibit_builder_link_to_exhibit($exhibit, $text, $props, $parentPage);
    }
    return null;
}
/**
* Returns a link to an exhibit, or exhibit page.
* @uses exhibit_builder_link_to_exhibit
*
* @param string|null $text The text of the link
* @param array $props
* @param ExhibitPage|null $exhibitPage
* @param Exhibit $exhibit|null If null, it uses the current exhibit
* @return string
*/
function link_to_exhibit($text = null, $props = array(), $exhibitPage = null, $exhibit = null)
{
    return exhibit_builder_link_to_exhibit($exhibit, $text, $props, $exhibitPage);
}
Example #10
0
<?php 
if ($exhibitCredits = metadata('exhibit', 'credits')) {
    ?>
    <div class="exhibit-credits">
        <h2><?php 
    echo __('Credits');
    ?>
</h2>
        <p><?php 
    echo $exhibitCredits;
    ?>
</p>
    </div>
<?php 
}
?>

<?php 
if ($exhibitPages = $exhibit->getTopPages()) {
    ?>
    <p class="text-center">
        <?php 
    echo exhibit_builder_link_to_exhibit($exhibit, __('Enter the Exhibit'), array('class' => 'btn btn-primary btn-lg'), reset($exhibitPages));
    ?>
    </p>
<?php 
}
?>

<?php 
echo foot(array('exhibit' => $exhibit));
Example #11
0
            <?php 
        echo exhibit_builder_link_to_exhibit($exhibit, metadata($child, 'title'), array('class' => 'list-group-item'), $child);
        ?>
        <?php 
    }
    ?>
    </div>
<?php 
}
?>

<nav class="row" id="exhibit-page-navigation">
    <div class="col-sm-5">
        <?php 
echo exhibit_builder_link_to_previous_page();
?>
    </div>
    <div class="col-sm-5 col-sm-push-2 text-right">
        <?php 
echo exhibit_builder_link_to_next_page();
?>
    </div>
    <div class="col-sm-2 col-sm-pull-5 text-center">
        <?php 
echo exhibit_builder_link_to_exhibit(null, 'Exhibit Home');
?>
    </div>
</nav>

<?php 
echo foot(array('exhibit' => $exhibit));