<?php 
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__)
    .' is not allowed.' );

/**
 *
 * @package  MediaLibrary
 * @copyright 2021 Andrey Kvasnevskiy-OrdaSoft(akbet@mail.ru); Rob de Cleen(rob@decleen.com);
 * Homepage: https://ordasoft.com
 * @version: 4.6 Free
 * @license GNU General Public license version 2 or later; see LICENSE.txt
 *
 */

?>
<noscript>
    Javascript is required to use MediaLibrary 
    <a href="https://ordasoft.com/media-library-joomla-extension">
        Media Library Software for create modern library .
    </a>,
    <a href="https://ordasoft.com/media-library-joomla-extension">
        MediaLibrary create website for rent, sell media files
    </a>
</noscript>

<div id="medialibrary">
  
    <?php positions_ml($params->get('allcategories01'));?>
    <div class="componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>">
    <?php echo $currentcat->header; ?>
    </div>
    <?php positions_ml($params->get('allcategories02'));?>

    <div class="ml-row">

        <div class="ml-collumn-xs-12 ml-collumn-sm-2 ml-collumn-md-2 ml-collumn-lg-2">
            <img src="<?php echo  $mosConfig_live_site; 
            ?>/components/com_medialibrary/images/medialibrary_logo.png" alt="Medias"/>
        </div>

        <div class="ml-collumn-xs-12 ml-collumn-sm-10 ml-collumn-md-10 ml-collumn-lg-10 allcategories_descr">
            <?php echo $currentcat->descrip; ?>
        </div>

        
    </div>


  <?php positions_ml($params->get('allcategories03'));?>

  <?php  if($params->get('show_search')){ ?>
      <div class="ml-row media-tools-container">
            <div class="search-block ml-collumn-lg-12 ml-collumn-md-12 ml-collumn-sm-12 ml-collumn-xs-12">
                    <?php

                        if($params->get('search_fieldshow')){
                            echo HTML_medialibrary::displaySimpleSearch();
                        }

                        if($params->get('advsearch_show')){

                            $href=sefRelToAbs(
                              "index.php?option=com_medialibrary&task=show_search&catid=0&Itemid=".$Itemid);
                            echo '<div style="font-size: 16px;line-height: 0.9em;" class="search-button"><a href="'.$href.'">'._MEDIALIBRARY_LABEL_SEARCH.'</a></div>';
                        }
                        $link = sefRelToAbs('index.php?option=com_medialibrary&task=show_search&catid='.
                        $catid. '&Itemid='. $Itemid);
                    ?>
           </div>
      </div>
  <?php 
  }
  ?>
        
        <form id="mediaEditForm" class="list_categories" action="<?php echo JRoute::_("index.php", false);
          ?>" method="post" name="mediaEditForm">
        <?php  
        HTML_medialibrary::listCategories($params, $categories, $catid, $tabclass , $currentcat);
        ?>
        </form>

        <div class="allcategories_button">
            <?php
            positions_ml($params->get('allcategories07'));
            if ($params->get('show_add_media')){
            HTML_medialibrary::showAddButton($params, 1, $catid, $Itemid);
            }

            positions_ml($params->get('allcategories08'));
            if ($params->get('ownerslist_show')){
            HTML_medialibrary::showOwnersButton();
            }


            positions_ml($params->get('allcategories09'));
            ?>
        </div>

        


        

    <?php if ($params->get('back_button')!= ''): ?>
            <div style="text-align: center;" class="back_button">
            <?php mosHTML::BackButton ( $params, $hide_js ); ?>
          </div>
    <?php endif ?>

    </div>
