myfossil / myfossil-specimen

WordPress plugin to add fossil specimen management features
0 stars 0 forks source link

Fossil Detail: Separate "Discussion" section from main information sections #70

Closed antonlegoo closed 9 years ago

antonlegoo commented 9 years ago

Currently, it almost appears as if "Discussion" is just another information section, e.g. "Geochronology".

With the amount of information on this page being very dense, I believe it would helpful to separate the main information section from the "Discussion" which can get very long and piece-y.

Below is a screenshot of how this could look. Notice that it is separated from the white "page", and appears against the gray background.

screen shot 2015-01-09 at 2 51 39 pm

I wasn't able to test this locally, as I don't have any fossil data in the local database. However, I believe the following update to /public/partials/single.php will produce what's in the screenshot above.

<?php
use myFOSSIL\Plugin\Specimen\Fossil;

function myfossil_fossil_render_single( $fossil_id, $view ) {
    $fossil = new Fossil( $fossil_id );

    ?>
    <div id="fossil" class="content-area">
        <?php fossil_header( $fossil, $view ); ?>
        <div id="buddypress" class="container page-styling site-main" role="main">

    <?php 
    switch ( $view ) {
        case 'main':
            myfossil_fossil_render_single_main( $fossil );
            break;
        case 'history':
            myfossil_fossil_render_single_history( $fossil );
            break;
        case 'images':
            myfossil_fossil_render_single_images( $fossil );
            break;
        case 'settings':
            myfossil_fossil_render_single_settings( $fossil );
            break;
    }
    ?>

        </div>

        <?php
        if( $view == 'discussion' )
        {
        ?>
            <div class="container">
            <?php myfossil_fossil_render_single_discussion( $fossil ); ?>
            </div>
        <?php
        }
        ?>

    </div>

    <?php
}