Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

render_browse_bar()

Description

Renders the browse bar

Parameters

This function accepts no parameters.

Return

void

Location

include/render_functions.php lines 2843 to 2900

Definition

 
function render_browse_bar()
    {
    global 
$lang$browse_bar_workflow$browse_show$enable_themes;
    
$bb_html '<div id="BrowseBarContainer" class="ui-layout-west" style="display:none;">';
    
$bb_html .= '<div id="BrowseBar" class="BrowseBar" ' . ($browse_show ?  '' 'style="display:none;"') . '>';
    
$bb_html .= '<div id="BrowseBarContent" >'
    
    
//Browse row template
    // script will replace %BROWSE_TYPE%, %BROWSE_EXPAND_CLASS%, %BROWSE_CLASS% %BROWSE_LEVEL%, %BROWSE_EXPAND%, %BROWSE_NAME%, %BROWSE_TEXT%, %BROWSE_ID%
    
$bb_html .= "
            <div id='BrowseBarTemplate' style='display: none;'>
            <div class='BrowseBarItem BrowseRowOuter %BROWSE_DROP%' data-browse-id='%BROWSE_ID%' data-browse-parent='%BROWSE_PARENT%'  data-browse-loaded='0' data-browse-status='closed' data-browse-level='%BROWSE_LEVEL%' style='display: none;'>
                <div class='BrowseRowInner' >
                    %BROWSE_INDENT%
                    %BROWSE_EXPAND%
                    %BROWSE_TEXT%
                    %BROWSE_REFRESH%
                </div><!-- End of BrowseRowInner -->
            </div><!-- End of BrowseRowOuter -->
            </div><!-- End of BrowseBarTemplate -->
            "
;

    
// Add root elements
    
$bb_html .= generate_browse_bar_item("R"$lang['browse_by_tag']);
    if(
$enable_themes)
        {
        
$bb_html .= generate_browse_bar_item("FC"$lang["themes"]);
        }
    if(!
checkperm('b'))
        {
        
$bb_html .= generate_browse_bar_item("C"$lang["mycollections"]);
        }
        
    if(
$browse_bar_workflow)
        {
        
$bb_html .= generate_browse_bar_item("WF"$lang['browse_by_workflow_state']);
        }

    
$bb_html .= '</div><!-- End of BrowseBarContent -->
                </div><!-- End of BrowseBar -->
                    <a href="#" title="' 
$lang['browse_bar_text'] . '" onclick="ToggleBrowseBar();" ><div id="BrowseBarTab" style="display:none;"><div class="BrowseBarTabText" >' $lang['browse_bar_text'] . '</div></div><!-- End of BrowseBarTab --></a>
                </div><!-- End of BrowseBarContainer -->
                
            '
;
    echo 
$bb_html;
    
    
$browsejsvar $browse_show 'show' 'hide';
    echo 
'<script>
        var browse_show = "' 
$browsejsvar '";
        SetCookie("browse_show", "' 
$browsejsvar '");
        b_loading = new Array();
        // Expand tree to previous state based on stored cookie
        jQuery(document).ready(function()
            {
            ReloadBrowseBar();
            });
        </script>'
;
    }

This article was last updated 12th July 2020 07:35 Europe/London time based on the source file dated 8th July 2020 11:40 Europe/London time.