Exemplo n.º 1
0
/**
 * Prints full-screen media manager
 *
 * @author Kate Arzamastseva <*****@*****.**>
 */
function tpl_media()
{
    global $NS, $IMG, $JUMPTO, $REV, $lang, $fullscreen, $INPUT;
    $fullscreen = true;
    require_once DOKU_INC . 'lib/exe/mediamanager.php';
    $rev = '';
    $image = cleanID($INPUT->str('image'));
    if (isset($IMG)) {
        $image = $IMG;
    }
    if (isset($JUMPTO)) {
        $image = $JUMPTO;
    }
    if (isset($REV) && !$JUMPTO) {
        $rev = $REV;
    }
    echo '<div id="mediamanager__page">' . NL;
    echo '<h1>' . $lang['btn_media'] . '</h1>' . NL;
    html_msgarea();
    echo '<div class="panel namespaces">' . NL;
    echo '<h2>' . $lang['namespaces'] . '</h2>' . NL;
    echo '<div class="panelHeader">';
    echo $lang['media_namespaces'];
    echo '</div>' . NL;
    echo '<div class="panelContent" id="media__tree">' . NL;
    media_nstree($NS);
    echo '</div>' . NL;
    echo '</div>' . NL;
    echo '<div class="panel filelist">' . NL;
    tpl_mediaFileList();
    echo '</div>' . NL;
    echo '<div class="panel file">' . NL;
    echo '<h2 class="a11y">' . $lang['media_file'] . '</h2>' . NL;
    tpl_mediaFileDetails($image, $rev);
    echo '</div>' . NL;
    echo '</div>' . NL;
}
Exemplo n.º 2
0
/**
 * Return list of files for the Mediamanager
 *
 * @author Andreas Gohr <*****@*****.**>
 */
function ajax_medialist()
{
    global $conf;
    global $NS;
    $NS = $_POST['ns'];
    if ($_POST['do'] == 'media') {
        tpl_mediaFileList();
    } else {
        tpl_mediaContent(true);
    }
}
Exemplo n.º 3
0
/**
 * Return list of files for the Mediamanager
 *
 * @author Andreas Gohr <*****@*****.**>
 */
function ajax_medialist()
{
    global $conf;
    global $NS;
    global $INPUT;
    $NS = cleanID($INPUT->post->str('ns'));
    if ($INPUT->post->str('do') == 'media') {
        tpl_mediaFileList();
    } else {
        tpl_mediaContent(true);
    }
}
Exemplo n.º 4
0
/**
 * Return list of files for the Mediamanager
 *
 * @author Andreas Gohr <*****@*****.**>
 */
function ajax_medialist()
{
    global $NS;
    global $INPUT;
    $NS = cleanID($INPUT->post->str('ns'));
    $sort = $INPUT->post->bool('recent') ? 'date' : 'natural';
    if ($INPUT->post->str('do') == 'media') {
        tpl_mediaFileList();
    } else {
        tpl_mediaContent(true, $sort);
    }
}