Ignore:
Timestamp:
Jul 13, 2012, 8:42:34 PM (12 years ago)
Author:
mistic100
Message:

-button on admin page to purge download list
-confirmation is properly updated on UserCollection page

Location:
extensions/BatchDownloader/admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/admin/sets.php

    r16689 r16697  
    1717  $BatchDownloader->deleteLastArchive();
    1818  $BatchDownloader->clearImages();
     19}
     20if (isset($_POST['delete_done']))
     21{
     22  $query = '
     23DELETE s, i
     24  FROM '.BATCH_DOWNLOAD_TSETS.' AS s
     25    LEFT JOIN '.BATCH_DOWNLOAD_TIMAGES.' AS i
     26    ON i.set_id = s.id
     27  WHERE
     28    status = "done" AND
     29    date_creation < DATE_SUB(NOW(), INTERVAL 1 HOUR)
     30;';
     31  pwg_query($query);
    1932}
    2033
     
    6275{
    6376  $set = new BatchDownloader($set_id);
     77 
    6478  $template->append('sets', array_merge(
    6579    $set->getSetInfo(),
  • extensions/BatchDownloader/admin/template/config.tpl

    r16689 r16697  
    9090      <label>
    9191        <span class="property">{'Maximum number of photos per download set'|@translate}</span>
    92         <div id="max_elements""></div>
     92        <div id="max_elements"></div>
    9393        <input type="text" name="max_elements" value="{$batch_download.max_elements}" size="5">
    9494      </label>
  • extensions/BatchDownloader/admin/template/sets.tpl

    r16400 r16697  
    6464    <td>{$set.NB_ARCHIVES}</td>
    6565    <td>
    66       {$set.STATUS}
    67       {if $set.STATUS == 'download'}({$set.LAST_ZIP}/{$set.NB_ARCHIVES}){/if}
     66      {$set.STATUS|@translate}
     67      {if $set.STATUS == 'download'}<i style="font-size:0.8em;">({$set.LAST_ZIP}/{$set.NB_ARCHIVES})</i>{/if}
    6868    </td>
    6969    <td style="padding-left:25px;">
     
    8080  {/if}
    8181</table>
     82
     83<form action="{$F_FILTER_ACTION}" method="post">
     84<p><label><input type="checkbox" name="delete_done" value="1"> {'Remove all finished downloads'|@translate}</label>
     85<input type="submit" value="{'Submit'|@translate}"></p>
     86</form>
  • extensions/BatchDownloader/admin/template/style.css

    r16626 r16697  
    4444}
    4545.table2 .status {
    46   width:80px;
     46  width:120px;
    4747}
    4848
Note: See TracChangeset for help on using the changeset viewer.