Changeset 23290 for extensions/BatchDownloader
- Timestamp:
- Jun 17, 2013, 5:42:09 PM (11 years ago)
- Location:
- extensions/BatchDownloader
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/include/BatchDownloader.class.php
r23280 r23290 14 14 * @param: string set type ('album'|'tag'|'selection') 15 15 * @param: int set type id (for retrieving album infos for instance) 16 */ 17 function __construct($set_id, $images=array(), $type=null, $type_id=null) 16 * @param: string size to download 17 */ 18 function __construct($set_id, $images=array(), $type=null, $type_id=null, $size='original') 18 19 { 19 20 global $user, $conf; … … 26 27 'type' => null, 27 28 'type_id' => null, 29 'size' => 'original', 28 30 'nb_zip' => 0, 29 31 'last_zip' => 0, … … 39 41 { 40 42 $query = ' 41 SELECT 42 id, 43 user_id, 44 date_creation, 45 type, 46 type_id, 47 nb_zip, 48 last_zip, 49 nb_images, 50 total_size, 51 status 43 SELECT * 52 44 FROM '.BATCH_DOWNLOAD_TSETS.' 53 45 WHERE … … 95 87 else if ($set_id == 'new') 96 88 { 89 if ($size != 'original') 90 { 91 $type_map = array_keys(ImageStdParams::get_defined_type_map()); 92 if (!in_array($size, $type_map)) 93 { 94 throw new Exception(sprintf(l10n('Invalid size %s'), $size)); 95 } 96 } 97 97 98 $this->data['type'] = $type; 98 99 $this->data['type_id'] = $type_id; 100 $this->data['size'] = $size; 99 101 100 102 $query = ' … … 104 106 type, 105 107 type_id, 108 size, 106 109 nb_zip, 107 110 last_zip, … … 115 118 "'.$this->data['type'].'", 116 119 "'.$this->data['type_id'].'", 120 "'.$this->data['size'].'", 117 121 0, 118 122 0, … … 255 259 256 260 /** 261 * get missing derivatives files 262 * @return: array of i.php urls 263 */ 264 function getMissingDerivatives($update=false) 265 { 266 if ($this->data['size'] == 'original') 267 { 268 return array(); 269 } 270 271 global $conf; 272 273 $root_url = get_root_url(); 274 $uid = '&b='.time(); 275 276 $params = ImageStdParams::get_by_type($this->data['size']); 277 $last_mod_time = $params->last_mod_time; 278 279 $image_ids = array_keys($this->images); 280 $to_update = $urls = $inserts = array(); 281 282 $conf['question_mark_in_urls'] = $conf['php_extension_in_urls'] = true; 283 $conf['derivative_url_style'] = 2; //script 284 285 // images which we need to update stats 286 if ($update) 287 { 288 $query = ' 289 SELECT image_id, filemtime FROM '.IMAGE_SIZES_TABLE.' 290 WHERE image_id IN('.implode(',', $image_ids).') 291 AND type = "'.$this->data['size'].'" 292 ;'; 293 $registered = array_from_query($query, 'image_id', 'filemtime'); 294 295 $to_update = array_filter($registered, create_function('$t', 'return $t<'.$last_mod_time.';')); 296 $to_update = array_merge($to_update, array_diff($image_ids, $registered)); 297 } 298 299 $query = ' 300 SELECT id, path, representative_ext, width, height, rotation 301 FROM '.IMAGES_TABLE.' 302 WHERE id IN('.implode(',', $image_ids).') 303 ORDER BY id DESC 304 ;'; 305 306 $result = pwg_query($query); 307 while ($row = pwg_db_fetch_assoc($result)) 308 { 309 $src_image = new SrcImage($row); 310 if ($src_image->is_mimetype()) continue; 311 312 $derivative = new DerivativeImage($this->data['size'], $src_image); 313 // if ($this->data['size'] != $derivative->get_type()) continue; 314 315 $filemtime = @filemtime($derivative->get_path()); 316 317 if ($filemtime===false || $filemtime<$last_mod_time) 318 { 319 $urls[] = $root_url.$derivative->get_url().$uid; 320 } 321 else if ($update && in_array($row['id'], $to_update)) 322 { 323 $imagesize = getimagesize($derivative->get_path()); 324 325 $inserts[ $row['id'] ] = array( 326 'image_id' => $row['id'], 327 'type' => $this->data['size'], 328 'width' => $imagesize[0], 329 'height' => $imagesize[1], 330 'filesize' => filesize($derivative->get_path())/1024, 331 'filemtime' => $filemtime, 332 ); 333 } 334 } 335 336 if (!empty($inserts)) 337 { 338 $query = ' 339 DELETE FROM '.IMAGE_SIZES_TABLE.' 340 WHERE image_id IN('.implode(',', array_keys($inserts)).') 341 ;'; 342 pwg_query($query); 343 344 mass_inserts( 345 IMAGE_SIZES_TABLE, 346 array('image_id','type','width','height','filesize'), 347 $inserts 348 ); 349 } 350 351 return $urls; 352 } 353 354 /** 257 355 * deleteLastArchive 258 356 */ … … 311 409 $query = ' 312 410 SELECT 313 id, 314 name, 315 file, 316 path, 317 filesize 411 id, name, file, path, 412 representative_ext, rotation, 413 filesize, width, height 318 414 FROM '.IMAGES_TABLE.' 319 415 WHERE id IN ('.implode(',', $images_to_add).') 320 416 ;'; 321 417 $images_to_add = hash_from_query($query, 'id'); 418 419 if ($this->data['size'] != 'original') 420 { 421 $query = ' 422 SELECT image_id, filesize 423 FROM '.IMAGE_SIZES_TABLE.' 424 WHERE image_id IN ('.implode(',', array_keys($images_to_add)).') 425 AND type = "'.$this->data['size'].'" 426 ;'; 427 $filesizes = simple_hash_from_query($query, 'image_id', 'filesize'); 428 } 322 429 323 430 // open zip … … 330 437 $total_size = 0; 331 438 foreach ($images_to_add as $row) 332 { 333 $zip->addFile(PHPWG_ROOT_PATH . $row['path'], $row['id'].'_'.stripslashes(get_filename_wo_extension($row['file'])).'.'.get_extension($row['path'])); 439 { 440 if ($this->data['size'] == 'original') 441 { 442 $zip->addFile(PHPWG_ROOT_PATH . $row['path'], $row['id'].'_'.stripslashes(get_filename_wo_extension($row['file'])).'.'.get_extension($row['path'])); 443 $total_size+= $row['filesize']; 444 } 445 else 446 { 447 $src_image = new SrcImage($row); 448 $derivative = new DerivativeImage($this->data['size'], $src_image); 449 $path = $derivative->get_path(); 450 451 $zip->addFile($path, $row['id'].'_'.stripslashes(get_filename_wo_extension(basename($path))).'.'.get_extension($path)); 452 $total_size+= $filesizes[ $row['id'] ]; 453 } 334 454 335 455 array_push($images_added, $row['id']); 336 456 $this->images[ $row['id'] ] = $this->data['last_zip']; 337 457 338 $total_size+= $row['filesize'];339 458 if ($total_size >= $this->conf['max_size']*1024 and !$force_one_archive) break; 340 459 } … … 370 489 371 490 // over estimed 372 if ( $this->data['status'] == 'done' and $this->data['last_zip'] < $this->data['nb_zip'])491 if ($this->data['status'] == 'done') 373 492 { 374 493 $this->updateParam('nb_zip', $this->data['last_zip']); 375 494 } 376 495 // under estimed 377 else if ( $this->data['last_zip'] == $this->data['nb_zip'] and $this->data['status'] != 'done')496 else if ($this->data['last_zip'] == $this->data['nb_zip']) 378 497 { 379 498 $this->updateParam('nb_zip', $this->data['last_zip']+1); … … 400 519 $image_ids = array_slice(array_keys($this->images), 0, $this->conf['max_elements']); 401 520 402 $query = ' 521 if ($this->data['size'] == 'original') 522 { 523 $query = ' 403 524 SELECT SUM(filesize) AS total 404 525 FROM '.IMAGES_TABLE.' 405 526 WHERE id IN ('.implode(',', $image_ids).') 406 527 ;'; 528 } 529 else 530 { 531 $query = ' 532 SELECT SUM(filesize) AS total 533 FROM '.IMAGE_SIZES_TABLE.' 534 WHERE image_id IN ('.implode(',', $image_ids).') 535 ;'; 536 } 537 407 538 list($total) = pwg_db_fetch_row(pwg_query($query)); 408 539 $this->data['estimated_total_size'] = $total; … … 416 547 function getEstimatedArchiveNumber() 417 548 { 418 $nb_zip = ceil( $this->getEstimatedTotalSize() / ($this->conf['max_size']*1024) );419 $this->updateParam('nb_zip', $nb_zip);420 return $nb_zip;549 if ($this->data['status'] == 'done') return $this->data['nb_zip']; 550 551 return ceil( $this->getEstimatedTotalSize() / ($this->conf['max_size']*1024) ); 421 552 } 422 553 … … 435 566 436 567 $out = ''; 437 for ($i=1; $i<=$this-> data['nb_zip']; $i++)568 for ($i=1; $i<=$this->getEstimatedArchiveNumber(); $i++) 438 569 { 439 570 $out.= '<li id="zip-'.$i.'">'; … … 482 613 $path.= $set['BASENAME'] . '_'; 483 614 $path.= $this->data['user_id'] . $this->data['id']; 484 $path.= $this-> data['nb_zip']!=1 ? '_part' . $i : null;615 $path.= $this->getEstimatedArchiveNumber()!=1 ? '_part' . $i : null; 485 616 $path.= '.zip'; 486 617 … … 680 811 $set = array( 681 812 'NB_IMAGES' => $this->data['nb_images'], 682 'NB_ARCHIVES' => $this->data[' nb_zip'],813 'NB_ARCHIVES' => $this->data['status']=='new' ? l10n('unknown') : $this->getEstimatedArchiveNumber(), 683 814 'STATUS' => $this->data['status'], 684 815 'LAST_ZIP' => $this->data['last_zip'], 685 'TOTAL_SIZE' => ceil($this->getEstimatedTotalSize()/1024),686 'LINKS' => $this->getDownloadList(BATCH_DOWNLOAD_PUBLIC . 'init_zip'),816 'TOTAL_SIZE' => $this->data['status']=='new' ? l10n('unknown') : ceil($this->getEstimatedTotalSize()/1024), 817 // 'LINKS' => $this->getDownloadList(BATCH_DOWNLOAD_PUBLIC . 'init_zip'), 687 818 'DATE_CREATION' => format_date($this->data['date_creation'], true), 819 'SIZE_ID' => $this->data['size'], 820 'SIZE' => l10n($this->data['size']), 688 821 ); 822 823 if ($this->data['size'] != 'original') 824 { 825 $params = ImageStdParams::get_by_type($this->data['size']); 826 $set['SIZE_INFO'] = $params->sizing->ideal_size[0].' x '.$params->sizing->ideal_size[1]; 827 } 689 828 690 829 return array_merge($set, $this->getNames()); -
extensions/BatchDownloader/include/download.inc.php
r21206 r23290 17 17 $BatchDownloader = new BatchDownloader($_GET['set_id']); 18 18 19 // delete set 19 20 if ( isset($_GET['cancel']) ) 20 21 { … … 26 27 } 27 28 28 if ( isset($_GET['zip']) and $BatchDownloader->getParam('status') != 'done' and $_GET['zip'] > $BatchDownloader->getParam('last_zip') ) 29 // prepare next zip 30 if ( isset($_GET['zip']) and $BatchDownloader->getParam('status') != 'new' and $BatchDownloader->getParam('status') != 'done' and $_GET['zip'] > $BatchDownloader->getParam('last_zip') ) 29 31 { 30 32 $BatchDownloader->deleteLastArchive(); … … 32 34 } 33 35 34 $set = $BatchDownloader->getSetInfo(); 35 36 if (isset($next_file)) 37 { 38 $set['U_DOWNLOAD'] = get_root_url().BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip']; 39 array_push($page['infos'], sprintf(l10n('The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'), $set['U_DOWNLOAD'])); 40 } 41 42 if ($BatchDownloader->getParam('status') == 'new' and $BatchDownloader->getParam('nb_images') > 0) 43 { 44 $set['U_EDIT_SET'] = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'view', array('set_id'=>$_GET['set_id'])); 45 } 46 36 // alert limit overflow 47 37 if ($BatchDownloader->getParam('nb_images') > $conf['batch_download']['max_elements']) 48 38 { … … 54 44 )); 55 45 } 46 else 47 { 48 if ($BatchDownloader->getParam('status') == 'new') 49 { 50 $missing_derivatives = $BatchDownloader->getMissingDerivatives(true); 51 52 // generate missing files 53 if (count($missing_derivatives)) 54 { 55 $template->assign('missing_derivatives', $missing_derivatives); 56 } 57 // set ready 58 else 59 { 60 $BatchDownloader->updateParam('status', 'ready'); 61 } 62 } 63 64 // display download links 65 if ($BatchDownloader->getParam('status') != 'new') 66 { 67 $template->assign('zip_links', $BatchDownloader->getDownloadList(BATCH_DOWNLOAD_PUBLIC . 'init_zip')); 68 } 69 } 56 70 57 $set['U_CANCEL'] = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'init_zip', array('set_id'=>$_GET['set_id'], 'cancel'=>'true')); 71 $set = $BatchDownloader->getSetInfo(); 72 73 // link to the zip 74 if (isset($next_file)) 75 { 76 $set['U_DOWNLOAD'] = get_root_url().BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip']; 77 $page['infos'][] = sprintf(l10n('The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'), $set['U_DOWNLOAD']); 78 } 79 80 // link to edit page 81 if ($BatchDownloader->getParam('status') != 'download' and $BatchDownloader->getParam('status') != 'done' and $BatchDownloader->getParam('nb_images') > 0) 82 { 83 $set['U_EDIT_SET'] = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'view', array('set_id'=>$_GET['set_id'])); 84 } 85 86 // cancel link 87 if ($BatchDownloader->getParam('status') != 'done') 88 { 89 $set['U_CANCEL'] = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'init_zip', array('set_id'=>$_GET['set_id'], 'cancel'=>'true')); 90 } 58 91 59 92 $template->assign(array( -
extensions/BatchDownloader/include/events.inc.php
r23280 r23290 87 87 if ($set !== false) 88 88 { 89 $BatchDownloader = new BatchDownloader('new', $page['items'], $set['type'], $set['id'] );89 $BatchDownloader = new BatchDownloader('new', $page['items'], $set['type'], $set['id'], $set['size']); 90 90 91 91 if ($BatchDownloader->getParam('nb_images') != 0) 92 92 { 93 $BatchDownloader->getEstimatedArchiveNumber();94 95 93 // if we plan only one zip with less elements than 'max_elements', the download starts immediately 96 94 if ( 97 95 $BatchDownloader->getParam('nb_images') <= $conf['batch_download']['max_elements'] 98 and $BatchDownloader->getParam('nb_zip') == 1 96 and $BatchDownloader->getParam('size') == 'original' 97 and $BatchDownloader->getEstimatedArchiveNumber() == 1 99 98 ) 100 99 { … … 133 132 } 134 133 135 $url = add_url_params($url, array('action'=>'advdown_set' ));134 $url = add_url_params($url, array('action'=>'advdown_set', 'down_size'=>'')); 136 135 137 136 // toolbar button 138 $button = '<script type="text/javascript">var batchdown_count = '.count($page['items']).'; var batchdown_string = "'.l10n('Confirm the download of %d pictures?').'";</script> 139 <li><a href="'. $url .'" title="'.l10n('Download all pictures of this selection').'" class="pwg-state-default pwg-button" rel="nofollow" 140 onClick="return confirm(batchdown_string.replace(\'%d\', batchdown_count));"> 141 <span class="pwg-icon batch-downloader-icon" style="background:url(\'' . get_root_url().BATCH_DOWNLOAD_PATH . 'template/zip.png\') center center no-repeat;"> </span><span class="pwg-button-text">'.l10n('Download').'</span> 142 </a></li>'; 143 $template->concat('PLUGIN_INDEX_ACTIONS', $button); 137 $template->set_filename('batchdwn_button', realpath(BATCH_DOWNLOAD_PATH.'template/download_button.tpl')); 138 $template->assign(array( 139 'BATCH_DOWNLOAD_PATH' => BATCH_DOWNLOAD_PATH, 140 'BATCH_DWN_COUNT' => count($page['items']), 141 'BATCH_DWN_URL' => $url, 142 )); 143 144 $type_map = ImageStdParams::get_defined_type_map(); 145 foreach ($type_map as $params) 146 { 147 $template->append( 148 'BATCH_DOWNLOAD_SIZES', 149 array( 150 'TYPE' => $params->type, 151 'DISPLAY' => l10n($params->type), 152 'SIZE' => $params->sizing->ideal_size[0].' x '.$params->sizing->ideal_size[1], 153 ) 154 ); 155 } 156 $template->append( 157 'BATCH_DOWNLOAD_SIZES', 158 array( 159 'TYPE' => 'original', 160 'DISPLAY' => l10n('Original'), 161 'SIZE' => null, 162 ) 163 ); 164 165 $button = $template->parse('batchdwn_button', true); 166 $template->add_index_button($button, 50); 144 167 $template->concat('COLLECTION_ACTIONS', $button); 145 168 } -
extensions/BatchDownloader/include/functions.inc.php
r23167 r23290 60 60 $batch_id = 0; 61 61 break; 62 default: 63 return false; 62 64 } 63 65 64 if ( isset($batch_type) and isset($batch_id) ) 65 { 66 return array('type'=>$batch_type, 'id'=>$batch_id); 67 } 68 else 69 { 70 return false; 71 } 66 return array( 67 'type' => $batch_type, 68 'id' => $batch_id, 69 'size' => isset($_GET['down_size']) ? $_GET['down_size'] : 'original', 70 ); 72 71 } 73 72 -
extensions/BatchDownloader/include/install.inc.php
r21422 r23290 13 13 'level' => 0, 14 14 'what' => array('categories','specials','collections'), 15 'photo_size' => 'original', 15 'photo_size' => 'original', // not used 16 16 'archive_prefix' => 'piwigo', 17 17 'archive_timeout' => 48, /* hours */ … … 52 52 `user_id` smallint(5) NOT NULL, 53 53 `date_creation` datetime NOT NULL, 54 `type` varchar(16) CHARACTER SET utf8 NOT NULL, 55 `type_id` varchar(64) CHARACTER SET utf8 NOT NULL, 54 `type` varchar(16) NOT NULL, 55 `type_id` varchar(64) NOT NULL, 56 `size` varchar(16) NOT NULL DEFAULT "original", 56 57 `nb_zip` smallint(3) NOT NULL DEFAULT 0, 57 58 `last_zip` smallint(3) NOT NULL DEFAULT 0, 58 59 `nb_images` mediumint(8) NOT NULL DEFAULT 0, 59 60 `total_size` int(10) NOT NULL DEFAULT 0, 60 `status` enum("new"," download","done") CHARACTER SET utf8NOT NULL DEFAULT "new",61 `status` enum("new","ready","download","done") NOT NULL DEFAULT "new", 61 62 PRIMARY KEY (`id`) 62 ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=163 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 63 64 ;'; 64 65 pwg_query($query); … … 70 71 `zip` smallint(5) NOT NULL DEFAULT 0, 71 72 UNIQUE KEY `UNIQUE` (`set_id`,`image_id`) 72 ) DEFAULT CHARSET=utf873 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 73 74 ;'; 74 75 pwg_query($query); 76 77 $query = ' 78 CREATE TABLE IF NOT EXISTS `' . $prefixeTable . 'image_sizes` ( 79 `image_id` mediumint(8) NOT NULL, 80 `type` varchar(16) NOT NULL, 81 `width` smallint(9) NOT NULL, 82 `height` smallint(9) NOT NULL, 83 `filesize` mediumint(9) NOT NULL, 84 `filemtime` int(16) NOT NULL, 85 PRIMARY KEY (`image_id`) 86 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 87 ;'; 88 pwg_query($query); 89 90 // add a "size" column to download_sets 91 $result = pwg_query('SHOW COLUMNS FROM `' . $prefixeTable . 'download_sets` LIKE "size";'); 92 if (!pwg_db_num_rows($result)) 93 { 94 pwg_query('ALTER TABLE `' . $prefixeTable . 'download_sets` ADD `size` varchar(16) NOT NULL DEFAULT "original";'); 95 } 96 97 // add "ready" status 98 pwg_query('ALTER TABLE `' . $prefixeTable . 'download_sets` CHANGE `status` `status` enum("new","ready","download","done") NOT NULL DEFAULT "new";'); 75 99 } 76 100 -
extensions/BatchDownloader/main.inc.php
r23288 r23290 17 17 define('BATCH_DOWNLOAD_TSETS', $prefixeTable . 'download_sets'); 18 18 define('BATCH_DOWNLOAD_TIMAGES', $prefixeTable . 'download_sets_images'); 19 define('IMAGE_SIZES_TABLE', $prefixeTable . 'image_sizes'); 19 20 define('BATCH_DOWNLOAD_LOCAL', PHPWG_ROOT_PATH . $conf['data_location'] . 'download_archives/'); 20 21 define('BATCH_DOWNLOAD_ADMIN', get_root_url() . 'admin.php?page=plugin-' . BATCH_DOWNLOAD_ID); -
extensions/BatchDownloader/template/init_zip.tpl
r17517 r23290 6 6 {/footer_script} 7 7 {/if} 8 9 {if $missing_derivatives} 10 {combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'} 11 {combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'} 12 13 {footer_script} 14 var derivatives = {ldelim} 15 elements: ["{'","'|@implode:$missing_derivatives}"], 16 done: 0, 17 total: {$missing_derivatives|@count}, 18 19 finished: function() {ldelim} 20 return derivatives.done == derivatives.total; 21 } 22 }; 23 24 function progress(success) {ldelim} 25 jQuery('#progressBar').progressBar(derivatives.done, {ldelim} 26 max: derivatives.total, 27 textFormat: 'fraction', 28 boxImage: '{$ROOT_PATH}themes/default/images/progressbar.gif', 29 barImage: '{$ROOT_PATH}themes/default/images/progressbg_red.gif' 30 }); 31 if (success !== undefined) {ldelim} 32 var type = success ? '.regenerateSuccess': '.regenerateError', 33 s = parseInt(jQuery(type).html()); 34 jQuery(type).html(++s); 35 } 36 } 37 38 {literal} 39 var queuedManager = jQuery.manageAjax.create('queued', { 40 queue: true, 41 cacheResponse: false, 42 maxRequests: 1 43 }); 44 45 function next_derivative() { 46 if (derivatives.finished()) { 47 alert("finish"); 48 return; 49 } 50 51 $("#damn").append(derivatives.elements[ derivatives.done ]+"<br>"); 52 53 jQuery.manageAjax.add("queued", { 54 type: 'GET', 55 url: derivatives.elements[ derivatives.done ]+'&ajaxload=true', 56 dataType: 'json', 57 success: function(data) { 58 derivatives.done++; 59 progress(true); 60 next_derivative(); 61 }, 62 error: function(data) { 63 derivatives.done++; 64 progress(false); 65 next_derivative(); 66 } 67 }); 68 } 69 70 $("#begin").click(function() { 71 progress(); 72 next_derivative(); 73 }); 74 {/literal}{/footer_script} 75 76 {/if} 77 8 78 9 79 {* <!-- Menubar & titrePage --> *} … … 32 102 <li class="error">{$elements_error}</li> 33 103 <li><b>{'%d photos'|@translate|@sprintf:$set.NB_IMAGES}</b>{if $set.U_EDIT_SET}, <a href="{$set.U_EDIT_SET}" rel="nofollow">{'Edit the set'|@translate}</a>{/if}</li> 104 <li><b>{'Size'|@translate}:</b> {$set.SIZE} {if $set.SIZE_INFO}<span class="downloadSizeDetails">({$set.SIZE_INFO})</span>{/if}</li> 34 105 <li><b>{'Estimated size'|@translate}:</b> {$set.TOTAL_SIZE} MB</li> 35 106 <li><b>{'Estimated number of archives'|@translate}:</b> {$set.NB_ARCHIVES} <i>({'real number of archives can differ'|@translate})</i></li> … … 38 109 </fieldset> 39 110 111 {if $missing_derivatives} 112 <fieldset> 113 <legend>Stuff happening</legend> 114 115 <a id="begin">GO</a> 116 117 <div id="regenerationMsg" class="bulkAction"> 118 <span class="progressBar" id="progressBar"></span> 119 </div> 120 121 <span class="regenerateSuccess">0</span> - 122 <span class="regenerateError">0</span> 123 124 <div id="damn"> 125 </div> 126 </fieldset> 127 {/if} 128 129 {if $zip_links} 40 130 <fieldset> 41 131 <legend>{'Download links'|@translate}</legend> 42 132 43 133 <ul class="download-links"> 44 {$ set.LINKS}134 {$zip_links} 45 135 <li class="warning">{'<b>Warning:</b> all files will be deleted within %d hours'|@translate|@sprintf:$archive_timeout}</li> 46 136 </ul> 47 137 48 <a href="{$set.U_CANCEL}" class="cancel-down" onClick="return confirm('{'Are you sure?'|@translate}');">{'Cancel this download'|@translate}</a>138 {if $set.U_CANCEL}<a href="{$set.U_CANCEL}" class="cancel-down" onClick="return confirm('{'Are you sure?'|@translate}');">{'Cancel this download'|@translate}</a>{/if} 49 139 </fieldset> 140 {/if} 50 141 {/if} 51 142 -
extensions/BatchDownloader/template/style.css
r16392 r23290 38 38 border-color:#f00; 39 39 } 40 41 .downloadSizeDetails {font-style:italic; font-size:80%;}
Note: See TracChangeset
for help on using the changeset viewer.