1<?php
2
3/**
4 * DokuWiki Media Manager Popup
5 *
6 * NOTE: Based on the mediamanager.php out of the "starter" template by
7 *       Anika Henke.
8 *
9 *
10 * LICENSE: This file is open source software (OSS) and may be copied under
11 *          certain conditions. See COPYING file for details or try to contact
12 *          the author(s) of this file in doubt.
13 *
14 * @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
15 * @author ARSAVA <dokuwiki@dev.arsava.com>
16 * @link https://www.dokuwiki.org/template:vector
17 * @link https://www.dokuwiki.org/devel:templates
18 */
19
20//check if we are running within the DokuWiki environment
21if (!defined("DOKU_INC")){
22    die();
23}
24
25?><!DOCTYPE html>
26<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo hsc($conf["lang"]); ?>" lang="<?php echo hsc($conf["lang"]); ?>" dir="<?php echo hsc($lang["direction"]); ?>" class="popup">
27<head>
28<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
29<meta name="viewport" content="width=device-width, initial-scale=1">
30<title><?php echo hsc($lang["mediaselect"]); echo " - ".hsc($conf["title"]); ?></title>
31
32<!-- Bootstrap CSS -->
33<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
34
35<?php
36//show meta-tags
37tpl_metaheaders();
38echo "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />";
39
40//include default or userdefined favicon
41//
42//note: since 2011-04-22 "Rincewind RC1", there is a core function named
43//      "tpl_getFavicon()". But its functionality is not really fitting the
44//      behaviour of this template, therefore I don't use it here.
45if (file_exists(DOKU_TPLINC."user/favicon.ico")){
46    //user defined - you might find http://tools.dynamicdrive.com/favicon/
47    //useful to generate one
48    echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.ico\" />\n";
49}elseif (file_exists(DOKU_TPLINC."user/favicon.png")){
50    //note: I do NOT recommend PNG for favicons (cause it is not supported by
51    //all browsers), but some users requested this feature.
52    echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.png\" />\n";
53}else{
54    //default
55    echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/favicon.ico\" />\n";
56}
57
58//include default or userdefined Apple Touch Icon (see <http://j.mp/sx3NMT> for
59//details)
60if (file_exists(DOKU_TPLINC."user/apple-touch-icon.png")){
61    echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."user/apple-touch-icon.png\" />\n";
62}else{
63    //default
64    echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/apple-touch-icon.png\" />\n";
65}
66
67//load userdefined js?
68if (tpl_getConf("vector_loaduserjs")){
69    echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"".DOKU_TPL."user/user.js\"></script>\n";
70}
71
72//load language specific css hacks?
73if (file_exists(DOKU_TPLINC."lang/".$conf["lang"]."/style.css")){
74  $interim = trim(file_get_contents(DOKU_TPLINC."lang/".$conf["lang"]."/style.css"));
75  if (!empty($interim)){
76      echo "<style type=\"text/css\" media=\"all\">\n".hsc($interim)."\n</style>\n";
77  }
78}
79?>
80<!--[if lte IE 8]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>static/css/screen_iehacks.css" /><![endif]-->
81<!--[if lt IE 7]><style type="text/css">body{behavior:url("<?php echo DOKU_TPL; ?>static/3rd/vector/csshover.htc")}</style><![endif]-->
82</head>
83
84<body class="bg-light">
85    <div id="media__manager" class="container-fluid py-4">
86        <?php html_msgarea() ?>
87
88        <div class="row">
89            <!-- Media tree -->
90            <div class="col-md-4" id="mediamgr__aside">
91                <div class="card">
92                    <div class="card-body">
93                        <h5 class="card-title"><?php echo hsc($lang['mediaselect'])?></h5>
94                        <div id="media__opts"></div>
95                        <?php tpl_mediaTree() ?>
96                    </div>
97                </div>
98            </div>
99
100            <!-- Media content -->
101            <div class="col-md-8" id="mediamgr__content">
102                <div class="card">
103                    <div class="card-body">
104                        <?php tpl_mediaContent() ?>
105                    </div>
106                </div>
107            </div>
108        </div>
109    </div>
110
111    <!-- Bootstrap Bundle with Popper -->
112    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
113</body>
114</html>
115