Commit 0afa1500 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

download ok, just the look has to change

parent 3a4065e3
......@@ -23,12 +23,12 @@ class tx_nG6_eid {
// First all project runs
$p_runs = $this->get_project_runs($id);
foreach($p_runs as $run_id => $run_values) {
$html .= '<li class="jstree-closed" id=\''.$run_id.'\'> <a href=\'#\'>'.$run_values["name"].'</a></li>';
$html .= '<li class="jstree-closed" id=\''.$run_id.'\'> <a href=\'#\'>'.str_replace(array('###SPAN_NAME###', '###SPAN_DATE###', '###SPAN_NB_SEQ###', '###SPAN_SPECIES###'), array($run_values["name"], $run_values["date"], $run_values["nb_sequences"], $run_values["species"]), trim(t3lib_div::_GP('run_printing'))).'</a></li>';
}
// Then all project analysis
$p_analysis = $this->get_project_analysis($id);
foreach($p_analysis as $analyse_id => $analyse_values) {
$html .= '<li id=\''.$analyse_id.'\'> <a href=\'#\'>'.$analyse_values["name"].'</a></li>';
$html .= '<li id=\''.$analyse_id.'\'> <a href=\'#\'>'.str_replace(array('###SPAN_NAME###'), array($analyse_values["name"]), trim(t3lib_div::_GP('analyse_printing'))).'</a></li>';
}
print $html;
} else if ($type == 'run'){
......@@ -36,9 +36,9 @@ class tx_nG6_eid {
$r_analysis = $this->get_run_analysis($id);
$run_info = $this->get_run($id);
$html .= '<li id=\'data_'.$id.'\'> <a href=\'#\'>Donn&eacute;es brutes</a></li>';
$html .= '<li id=\'data_'.$id.'\'> <a href=\'#\'>'.trim(t3lib_div::_GP("raw_data_label")).'</a></li>';
foreach($r_analysis as $analyse_id => $analyse_values) {
$html .= '<li id=\''.$analyse_id.'\'> <a href=\'#\'>'.$analyse_values["name"].'</a></li>';
$html .= '<li id=\''.$analyse_id.'\'> <a href=\'#\'>'.str_replace(array('###SPAN_NAME###'), array($analyse_values["name"]), trim(t3lib_div::_GP('analyse_printing'))).'</a></li>';
}
print $html;
} else if ($type == 'download') {
......@@ -61,18 +61,19 @@ class tx_nG6_eid {
$run = $this->get_run($id[1]);
if (!in_array($data_folder.$run["directory"], $src_directories)) {
$src_directories[] = $data_folder.$run["directory"];
$dest_directories[] = $temporary_dir."/Project_".str_replace(' ', '_', $run["project_name"]).'.'.$run["project_id"]."/Run_".str_replace(' ', '_', $run["name"]).".".$id[1]."/RawDatas";
$dest_directories[] = $temporary_dir."/Project_".str_replace(' ', '_', $run["project_name"]).'.'.$run["project_id"]."/Run_".str_replace(' ', '_', $run["name"]).".".$id[1]."/RawData";
}
} else if ($id[0] == "run") {
$run = $this->get_run($id[1]);
if (!in_array($data_folder.$run["directory"], $src_directories)) {
$src_directories[] = $data_folder.$run["directory"];
$dest_directories[] = $temporary_dir."/Project_".str_replace(' ', '_', $run["project_name"]).'.'.$run["project_id"]."/Run_".str_replace(' ', '_', $run["name"]).".".$id[1]."/RawDatas";
$dest_directories[] = $temporary_dir."/Project_".str_replace(' ', '_', $run["project_name"]).'.'.$run["project_id"]."/Run_".str_replace(' ', '_', $run["name"]).".".$id[1]."/RawData";
}
foreach($this->get_run_analysis($id[1]) as $analyse_id => $analyse_values) {
if (!in_array($data_folder.$analyse_values["directory"], $src_directories)) {
$src_directories[] = $data_folder.$analyse_values["directory"];
$dest_directories[] = $temporary_dir."/Project_".str_replace(' ', '_', $run["project_name"]).'.'.$run["project_id"]."/Run_".str_replace(' ', '_', $run["name"]).".".$id[1]."/Analyse_".str_replace(' ', '_', $analyse_values["name"]).".".$analyse_id;
$aid = split("_", $analyse_id);
$dest_directories[] = $temporary_dir."/Project_".str_replace(' ', '_', $run["project_name"]).'.'.$run["project_id"]."/Run_".str_replace(' ', '_', $run["name"]).".".$id[1]."/Analyse_".str_replace(' ', '_', $analyse_values["name"]).".".$aid;
}
}
} else if ($id[0] == "analyse") {
......@@ -280,6 +281,7 @@ class tx_nG6_eid {
$queryParts = Array(
'SELECT' => 'tx_nG6_run.uid AS run_id,'.
'tx_nG6_run.directory AS run_directory,'.
'tx_nG6_run.species AS run_species,'.
'tx_nG6_run.description AS run_description, '.
'tx_nG6_run.name AS run_name, '.
'tx_nG6_run.nb_sequences, '.
......@@ -301,6 +303,7 @@ class tx_nG6_eid {
$results['run_'.$run_id] = array(
'directory' => $row['run_directory'],
'name' => $row['run_name'],
'species' => $row['run_species'],
'nb_sequences' => $row['nb_sequences'],
'date' => $row['run_date'],
'description' => $row['run_description']
......
......@@ -80,8 +80,8 @@ class tx_nG6_pi5 extends tslib_pibase {
// First get the temp url :
$tmp_url = substr($this->conf["temp"], strpos($this->conf["temp"], "fileadmin"));
$content = '<h2>Telechargement de vos donnees</h2>';
$content .= '<p>Selectionner dans l\'arbre les informations que vous souhaitez telecharger puis cliquer sur le bouton de telechargement. </p>';
$content = '<h2>'.$this->getFieldHeader('title').'</h2>';
$content .= '<p>'.$this->getFieldHeader('msg').'</p>';
$content .= '<script type="text/javascript" class="source">
$(function () {
$("#download_tree").jstree({
......@@ -95,7 +95,13 @@ class tx_nG6_pi5 extends tslib_pibase {
"ajax" : {
"url" : "index.php?eID=tx_nG6",
"data" : function (n) {
return { id : n.attr("id").split("_")[1] , type : n.attr("id").split("_")[0]};
return {
raw_data_label : "'.$this->getFieldHeader('raw_data_label').'",
run_printing : "'.$this->getFieldHeader('run_description').'",
analyse_printing : "'.$this->getFieldHeader('analyse_description').'",
id : n.attr("id").split("_")[1],
type : n.attr("id").split("_")[0]
};
}
}
},
......@@ -117,8 +123,8 @@ class tx_nG6_pi5 extends tslib_pibase {
$(".jstree-checked > ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked").each(function(){
url_val += $(this).attr("id")+";";
});
$("#download_dialog").dialog("option", "title", "T&eacute;l&eacute;chargement");
$("#download_dialog").html(\'<img src="fileadmin/templates/nG6template/images/light_wait.gif"/> Cr&eacute;ation en cours ...\').dialog("open");
$("#download_dialog").dialog("option", "title", "'.$this->getFieldHeader('download_dialog_title').'");
$("#download_dialog").html(\'<img src="fileadmin/templates/nG6template/images/light_wait.gif"/> '.$this->getFieldHeader('download_dialog_msg').'\').dialog("open");
$.ajax({
url: url_val,
success: function(val) {
......
......@@ -8,14 +8,24 @@
<languageKey index="default" type="array">
<label index="listFieldHeader_download_btn_label">Download</label>
<label index="listFieldHeader_project_description">Project ###SPAN_NAME###</label>
<label index="listFieldHeader_run_description">Run ###SPAN_NAME### - (###SPAN_DATE###) produced ###SPAN_NB_SEQ### reads</label>
<label index="listFieldHeader_run_description">Run ###SPAN_NAME### (###SPAN_SPECIES###) - (###SPAN_DATE###) produced ###SPAN_NB_SEQ### reads</label>
<label index="listFieldHeader_analyse_description">Analyse ###SPAN_NAME###</label>
<label index="listFieldHeader_raw_data_label">Raw data</label>
<label index="listFieldHeader_download_dialog_title">Downloading</label>
<label index="listFieldHeader_download_dialog_msg">File creation in progress ...</label>
<label index="listFieldHeader_title">Download center</label>
<label index="listFieldHeader_msg">First select all data you want to download, then click on the download button.</label>
</languageKey>
<languageKey index="fr" type="array">
<label index="listFieldHeader_download_btn_label">T&amp;eacute;l&amp;eacute;charger</label>
<label index="listFieldHeader_project_description">Projet ###SPAN_NAME###</label>
<label index="listFieldHeader_analyse_description">Run ###SPAN_NAME### - r&amp;eacute;alis&amp;eacute; le ###SPAN_DATE###, ###SPAN_NB_SEQ### lectures</label>
<label index="listFieldHeader_run_description">Run ###SPAN_NAME### (###SPAN_SPECIES###) - r&amp;eacute;alis&amp;eacute; le ###SPAN_DATE###, ###SPAN_NB_SEQ### lectures</label>
<label index="listFieldHeader_analyse_description">Analyse ###SPAN_NAME###</label>
<label index="listFieldHeader_raw_data_label">Donn&amp;eacute;es brutes</label>
<label index="listFieldHeader_download_dialog_title">T&amp;eacute;l&amp;eacute;chargement</label>
<label index="listFieldHeader_download_dialog_msg">Cr&amp;eacute;ation en cours ...</label>
<label index="listFieldHeader_title">T&amp;eacute;l&amp;eacute;chargement de vos donn&amp;eacute;es</label>
<label index="listFieldHeader_msg">S&amp;eacute;lectionner les donn&amp;eacute;es que vous souhaitez t&amp;eacute;l&amp;eacute;charger puis cliquer sur le bouton de t&amp;eacute;l&amp;eacute;chargement.</label>
</languageKey>
</data>
</T3locallang>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment