Fix upload page

This commit is contained in:
Romain Neutron
2011-12-21 17:50:17 +01:00
parent e1626b20ad
commit c7be5710a6

View File

@@ -26,7 +26,6 @@ function filize($x)
return '*.' . $x; return '*.' . $x;
} }
User_Adapter::updateClientInfos(8); User_Adapter::updateClientInfos(8);
phrasea::headers(); phrasea::headers();
@@ -41,7 +40,7 @@ if (count($avBases) == 0)
{ {
header("Content-Type: text/html; charset=UTF-8"); header("Content-Type: text/html; charset=UTF-8");
?> ?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $session->get_I18n(); ?>"> <html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $session->get_I18n(); ?>">
<head> <head>
@@ -75,18 +74,18 @@ if (count($avBases) == 0)
<?php echo _('upload:You do not have right to upload datas'); ?> <?php echo _('upload:You do not have right to upload datas'); ?>
</div> </div>
</body> </body>
</html> </html>
<?php <?php
die(); die();
} }
$colls = ''; $colls = '';
$datasSB = array(); $datasSB = array();
$dstatus = databox_status::getDisplayStatus(); $dstatus = databox_status::getDisplayStatus();
foreach ($appbox->get_databoxes() as $databox) foreach ($appbox->get_databoxes() as $databox)
{ {
$groupopen = false; $groupopen = false;
$sbas_id = $databox->get_sbas_id(); $sbas_id = $databox->get_sbas_id();
@@ -150,16 +149,16 @@ if (count($avBases) == 0)
} }
if ($groupopen) if ($groupopen)
$colls .= '</optgroup>'; $colls .= '</optgroup>';
} }
$maxVolume = min((int) get_cfg_var('upload_max_filesize'), (int) get_cfg_var('post_max_size')); $maxVolume = min((int) get_cfg_var('upload_max_filesize'), (int) get_cfg_var('post_max_size'));
header("Content-Type: text/html; charset=UTF-8"); header("Content-Type: text/html; charset=UTF-8");
?> ?>
<html xmlns="http://www.w3.org/1999/xhtml" > <html xmlns="http://www.w3.org/1999/xhtml" >
<head> <head>
<title><?php echo $registry->get('GV_homeTitle'), ' ', _('admin::monitor: module upload'); ?></title> <title><?php echo $registry->get('GV_homeTitle'), ' ', _('admin::monitor: module upload'); ?></title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
@@ -169,8 +168,8 @@ if (count($avBases) == 0)
<style type="text/css"> <style type="text/css">
<?php <?php
$theFont = '.theFont {font-weight:bold;color:#73B304;font-size: 14px;font-family:Arial }'; $theFont = '.theFont {font-weight:bold;color:#73B304;font-size: 14px;font-family:Arial }';
echo $theFont; echo $theFont;
?> ?>
</style> </style>
<script type="text/javascript" src="/include/jslibs/jquery-1.5.2.js"></script> <script type="text/javascript" src="/include/jslibs/jquery-1.5.2.js"></script>
@@ -183,10 +182,8 @@ if (count($avBases) == 0)
var language = { var language = {
'ok':'<?php echo str_replace("'", "\'", _('boutton::valider')) ?>', 'ok':'<?php echo str_replace("'", "\'", _('boutton::valider')) ?>',
'annuler':'<?php echo str_replace("'", "\'", _('boutton::annuler')) ?>', 'annuler':'<?php echo str_replace("'", "\'", _('boutton::annuler')) ?>',
'pleaseselect':'<?php echo str_replace("'", "\'", 'pleaseselect':'<?php echo str_replace("'", "\'", _('Selectionner une action')) ?>',
_('Selectionner une action')) ?>', 'norecordselected':'<?php echo str_replace("'", "\'", _('Aucune enregistrement selectionne')) ?>',
'norecordselected':'<?php echo str_replace("'", "\'",
_('Aucune enregistrement selectionne')) ?>',
'transfert_active':'<?php echo str_replace("'", "\'", _('Transfert en court, vous devez attendre la fin du transfert')) ?>', 'transfert_active':'<?php echo str_replace("'", "\'", _('Transfert en court, vous devez attendre la fin du transfert')) ?>',
'queue_not_empty' : '<?php echo str_replace("'", "\'", _('File d\'attente n\'est pas vide, souhaitez vous supprimer ces elements ?')) ?>' 'queue_not_empty' : '<?php echo str_replace("'", "\'", _('File d\'attente n\'est pas vide, souhaitez vous supprimer ces elements ?')) ?>'
}; };
@@ -319,21 +316,25 @@ if (count($avBases) == 0)
</script> </script>
</head> </head>
<body> <body>
<?php <?php
$count = 0; $count = 0;
try try
{ {
$lazaret = new lazaret(); $lazaret = new lazaret();
$count = $lazaret->get_count(); $count = $lazaret->get_count();
} }
catch (Exception $e) catch (Exception $e)
{ {
} }
$twig = new supertwig(); $twig = new supertwig();
$twig->display('common/menubar.twig', array('module' => 'upload')); $twig->display('common/menubar.twig'
?> , array(
'module' => 'upload'
, 'events' => eventsmanager_broker::getInstance($appbox)
));
?>
<div id="content"> <div id="content">
<div class="tabs"> <div class="tabs">
<ul> <ul>
@@ -364,7 +365,7 @@ if (count($avBases) == 0)
</div> </div>
<div style="text-align:right"> <div style="text-align:right">
<a href="javascript:void();" onclick="reverseOrder(); return(false);"> <a href="javascript:void();" onclick="reverseOrder(); return(false);">
<?php echo _('upload:: inverser') ?> <?php echo _('upload:: inverser') ?>
</a> </a>
</div> </div>
</div> </div>
@@ -387,7 +388,7 @@ if (count($avBases) == 0)
<span class="legend"><?php echo _('upload:: Que faire avec les fichiers') ?></span> <span class="legend"><?php echo _('upload:: Que faire avec les fichiers') ?></span>
<div id="coll_selector"> <div id="coll_selector">
<label for="collselect"><?php echo _('upload:: Destination (collection) :') ?></label><select id="collselect" onchange="showStatus();"><?php echo $colls ?></select> <label for="collselect"><?php echo _('upload:: Destination (collection) :') ?></label><select id="collselect" onchange="showStatus();"><?php echo $colls ?></select>
<?php echo _('upload:: Status :') ?> <?php echo _('upload:: Status :') ?>
<div id="status_wrapper"> <div id="status_wrapper">
<?php <?php
foreach ($datasSB as $base_id => $dat) foreach ($datasSB as $base_id => $dat)
@@ -428,7 +429,7 @@ if (count($avBases) == 0)
<div> <div>
<select name="action"> <select name="action">
<option value=""> <option value="">
<?php echo _('Action'); ?> <?php echo _('Action'); ?>
</option> </option>
<option value="add"> <option value="add">
<?php echo _('Ajouter les documents bloques'); ?> <?php echo _('Ajouter les documents bloques'); ?>
@@ -444,7 +445,7 @@ if (count($avBases) == 0)
<div> <div>
<input type="checkbox" class="delete_previous" id="delete_previous_global" /> <input type="checkbox" class="delete_previous" id="delete_previous_global" />
<label for="delete_previous_global"> <label for="delete_previous_global">
<?php echo _('Supprimer precedentes propositions a la substitution'); ?> <?php echo _('Supprimer precedentes propositions a la substitution'); ?>
</label> </label>
</div> </div>
</div> </div>