diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exe/media.php | 16 | ||||
-rw-r--r-- | lib/tpl/default/layout.css | 24 |
2 files changed, 33 insertions, 7 deletions
diff --git a/lib/exe/media.php b/lib/exe/media.php index f0d0795ad..27975a493 100644 --- a/lib/exe/media.php +++ b/lib/exe/media.php @@ -41,9 +41,8 @@ } if(!count($mediareferences)){ media_delete($DEL); - }else{ - $text = str_replace('%s',noNS($DEL),$lang['mediainuse']); - msg($text,0); + }elseif(!$conf['refshow']){ + msg(str_replace('%s',noNS($DEL),$lang['mediainuse']),0); } } @@ -54,8 +53,12 @@ //start output and load template header('Content-Type: text/html; charset=utf-8'); - include(DOKU_INC.'lib/tpl/'.$conf['template'].'/media.php'); - + if($conf['refshow'] && count($mediareferences)){ + include(DOKU_INC.'lib/tpl/'.$conf['template'].'/mediaref.php'); + }else{ + include(DOKU_INC.'lib/tpl/'.$conf['template'].'/media.php'); + } + //restore old umask umask($conf['oldumask']); @@ -75,8 +78,7 @@ function media_delete($delid){ return true; } //something went wrong - $text = str_replace('%s',$file,$lang['deletefail']); - msg($text,-1); + msg(str_replace('%s',$file,$lang['deletefail']),-1); return false; } diff --git a/lib/tpl/default/layout.css b/lib/tpl/default/layout.css index fea7c58ab..45fed3d49 100644 --- a/lib/tpl/default/layout.css +++ b/lib/tpl/default/layout.css @@ -107,3 +107,27 @@ div.uploadform { padding: 0.5em; width:65%; } + +div.mediaref_head { + margin-left:0.5em; +} + +div.mediaref .search_result { + padding-left:1em; +} + +.mediaref_ref { + color:#009900; +} + +div.mediaref_hidden { + margin-top:1em; + text-align:center; + font-size:1.2em; + color:#BB0000; +} + +div.mediaref_footer { + margin-top:1em; + text-align:center; +} |