summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/lang/en/lang.php6
-rw-r--r--inc/media.php13
2 files changed, 15 insertions, 4 deletions
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index 49f9676ae..c5584113b 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -91,8 +91,8 @@ $lang['notsavedyet'] = 'Unsaved changes will be lost.\nReally continue?';
$lang['rssfailed'] = 'An error occured while fetching this feed: ';
$lang['nothingfound']= 'Nothing was found.';
-$lang['mediaselect'] = 'Mediafiles';
-$lang['fileupload'] = 'Mediafile Upload';
+$lang['mediaselect'] = 'Media Files';
+$lang['fileupload'] = 'Media File Upload';
$lang['uploadsucc'] = 'Upload successful';
$lang['uploadfail'] = 'Upload failed. Maybe wrong permissions?';
$lang['uploadwrong'] = 'Upload denied. This file extension is forbidden!';
@@ -106,6 +106,8 @@ $lang['mediafiles'] = 'Available files in';
$lang['js']['keepopen'] = 'Keep window open on selection';
$lang['js']['hidedetails'] = 'Hide Details';
$lang['mediausage'] = 'Use the following syntax to reference this file:';
+$lang['mediaview'] = 'View original file';
+$lang['mediaupload'] = 'Upload a file to the current namespace here. To create subnamespaces, prepend them to your filename separated by colons.';
$lang['reference'] = 'References for';
$lang['ref_inuse'] = 'The file can\'t be deleted, because it\'s still used by the following pages:';
diff --git a/inc/media.php b/inc/media.php
index f09aff2eb..7d2dbd5ff 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -114,7 +114,7 @@ function media_metaform($id,$auth){
echo '<div class="metafield">';
echo '<label for="meta__'.$key.'">';
echo ($lang[$field[1]]) ? $lang[$field[1]] : $field[1];
- echo '</label>';
+ echo ':</label>';
// put input field
if($field[2] == 'text'){
@@ -268,7 +268,13 @@ function media_filelist($ns,$auth=null,$jump=''){
function media_fileactions($item,$auth){
global $lang;
- // no actions if not writable
+ // view button
+ $link = ml($item['id'],'',true);
+ echo ' <a href="'.$link.'" target="_blank"><img src="'.DOKU_BASE.'lib/images/magnifier.png" '.
+ 'alt="'.$lang['mediaview'].'" title="'.$lang['mediaview'].'" class="btn" /></a>';
+
+
+ // no further actions if not writable
if(!$item['writable']) return;
// delete button
@@ -377,6 +383,7 @@ function media_printimgdetail($item){
$t = $item['meta']->getField(array('IPTC.Caption','EXIF.UserComment',
'EXIF.TIFFImageDescription',
'EXIF.TIFFUserComment'));
+ if(utf8_strlen($t) > 250) $t = utf8_substr($t,0,250).'...';
if($t) echo htmlspecialchars($t).'<br />';
$t = $item['meta']->getField(array('IPTC.Keywords','IPTC.Category'));
@@ -396,10 +403,12 @@ function media_uploadform($ns, $auth){
if($auth < AUTH_UPLOAD) return; //fixme print info on missing permissions?
?>
+ <div class="upload"><?php echo $lang['mediaupload']?></div>
<form action="<?php echo DOKU_BASE?>lib/exe/mediamanager.php"
method="post" enctype="multipart/form-data" class="upload">
<input type="hidden" name="ns" value="<?php echo hsc($ns)?>" />
+
<?php echo $lang['txt_upload']?>:
<input type="file" name="upload" class="edit" id="upload__file" /><br />