Skip to content

Commit

Permalink
bug:2863
Browse files Browse the repository at this point in the history
display a message on the upload page if "Resized after upload" is checked 

git-svn-id: http://piwigo.org/svn/trunk@22135 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
flop25 committed Apr 11, 2013
1 parent c22683a commit 0490009
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
13 changes: 12 additions & 1 deletion admin/include/photos_add_direct_prepare.inc.php
Expand Up @@ -105,6 +105,18 @@
}
}

//warn the user if the picture will be resized after upload
if ($conf['original_resize'])
{
$template->assign(
array(
'original_resize_maxwidth' => $conf['original_resize_maxwidth'],
'original_resize_maxheight' => $conf['original_resize_maxheight'],
)
);
}


$upload_modes = array('html', 'multiple');
$upload_mode = isset($conf['upload_mode']) ? $conf['upload_mode'] : 'multiple';

Expand Down Expand Up @@ -255,7 +267,6 @@
)
);
}

$template->assign(
array(
'setup_warnings' => $setup_warnings,
Expand Down
4 changes: 4 additions & 0 deletions admin/themes/default/template/photos_add_direct.tpl
Expand Up @@ -289,6 +289,8 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
<fieldset>
<legend>{'Select files'|@translate}</legend>
{if isset($original_resize_maxheight)}<p class="uploadInfo">{'The picture dimensions will be reduced to %dx%d pixels.'|@translate|@sprintf:$original_resize_maxwidth:$original_resize_maxheight}</p>{/if}
<p id="uploadWarningsSummary">{$upload_max_filesize_shorthand}B. {$upload_file_types}. {if isset($max_upload_resolution)}{$max_upload_resolution}Mpx{/if} <a class="showInfo" title="{'Learn more'|@translate}">i</a></p>
Expand All @@ -300,6 +302,8 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
{/if}
</p>



{if $upload_mode eq 'html'}
<div id="uploadBoxes"></div>
<div id="addUploadBox">
Expand Down
1 change: 1 addition & 0 deletions admin/themes/default/theme.css
Expand Up @@ -995,6 +995,7 @@ div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-co
#uploadBoxes {margin-top:20px;}
#addUploadBox {margin-bottom:2em;}

p.uploadInfo {text-align:left;font-size:90%;color:#999;}
p#uploadWarningsSummary {text-align:left;margin-bottom:1em;font-size:90%;color:#999;}
p#uploadWarningsSummary .showInfo {position:static;display:inline;padding:1px 6px;margin-left:3px;}
p#uploadWarnings {display:none;text-align:left;margin-bottom:1em;font-size:90%;color:#999;}
Expand Down
1 change: 1 addition & 0 deletions language/en_UK/admin.lang.php
Expand Up @@ -796,6 +796,7 @@
$lang['The original maximum height must be a number between %d and %d'] = 'The original maximum height must be a number between %d and %d';
$lang['The original maximum width must be a number between %d and %d'] = 'The original maximum width must be a number between %d and %d';
$lang['The permalink name must be composed of a-z, A-Z, 0-9, "-", "_" or "/". It must not be numeric or start with number followed by "-"'] = "The permalink name must be composed of a-z, A-Z, 0-9, \"-\", \"_\" or \"/\". It must not be numeric or begin with a number followed by \"-\"";
$lang['The picture dimensions will be reduced to %dx%d pixels.'] = 'The picture dimensions will be reduced to %dx%d pixels.';
$lang['The Piwigo export plugin allows you to create albums and export photos.'] = 'The Piwigo export plugin allows you to create albums and export photos.';
$lang['The Piwigo publish Plug-in allows you to export and synchronize photos from Lightroom directly to your Piwigo photo gallery.'] = 'The Piwigo publish Plug-in allows you to export and synchronize photos from Lightroom directly to your Piwigo photo gallery.';
$lang['The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'] = 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form';
Expand Down
2 changes: 2 additions & 0 deletions language/fr_FR/admin.lang.php
Expand Up @@ -950,4 +950,6 @@
$lang['No members to manage'] = "Aucun membre à gérer";
$lang['Rename'] = 'Renommer';
$lang['Purge user cache'] = 'Purger le cache utilisateur';
$lang['The picture dimensions will be reduced to %dx%d pixels.'] = 'La tailles des images sera réduite à %dx%d pixels.';

?>

0 comments on commit 0490009

Please sign in to comment.