Ignore:
Timestamp:
Mar 3, 2011, 12:54:46 PM (13 years ago)
Author:
patdenice
Message:

Improve display for plugins and themes update page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes_update.php

    r9472 r9493  
    9898      $theme_info = $themes->server_themes[$fs_theme['extension']];
    9999
    100       list($date, ) = explode(' ', $theme_info['revision_date']);
    101 
    102       $ext_desc = '<i>'.l10n('Downloads').':</i> '.$theme_info['extension_nb_downloads']."\r\n"
    103         ."\r\n"
    104         .$theme_info['extension_description'];
    105 
    106       $rev_desc = '<i>'.l10n('Version').':</i> '.$theme_info['revision_name']."\r\n"
    107         .'<i>'.l10n('Released on').':</i> '.$date."\r\n"
    108         .'<i>'.l10n('Downloads').':</i> '.$theme_info['revision_nb_downloads']."\r\n"
    109         ."\r\n"
    110         .$theme_info['revision_description'];
    111 
    112       if ($themes->theme_version_compare($fs_theme['version'], $theme_info['revision_name']))
     100      if (!$themes->theme_version_compare($fs_theme['version'], $theme_info['revision_name']))
    113101      {
    114         // Plugin is up to date
    115         $template->append('themes_uptodate', array(
    116           'URL' => PEM_URL.'/extension_view.php?eid='.$theme_info['extension_id'],
    117           'NAME' => $fs_theme['name'],
    118           'EXT_DESC' => $ext_desc,
    119           'VERSION' => $fs_theme['version'],
    120           'VER_DESC' => $rev_desc));
    121       }
    122       else
    123       {
    124         // Plugin need upgrade
    125102        $url_auto_update = $base_url
    126103          . '&amp;revision=' . $theme_info['revision_id']
     
    129106          ;
    130107
    131         $template->append('themes_not_uptodate', array(
     108        $template->append('update_themes', array(
     109          'ID' => $theme_info['extension_id'],
    132110          'EXT_NAME' => $fs_theme['name'],
    133111          'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$theme_info['extension_id'],
    134           'EXT_DESC' => $ext_desc,
    135           'VERSION' => $fs_theme['version'],
     112          'EXT_DESC' => trim($theme_info['extension_description'], " \n\r"),
     113          'REV_DESC' => trim($theme_info['revision_description'], " \n\r"),
     114          'CURRENT_VERSION' => $fs_theme['version'],
    136115          'NEW_VERSION' => $theme_info['revision_name'],
    137           'NEW_VER_DESC' => $rev_desc,
     116          'AUTHOR' => $theme_info['author_name'],
     117          'DOWNLOADS' => $theme_info['extension_nb_downloads'],
    138118          'URL_UPDATE' => $url_auto_update,
    139           'URL_DOWNLOAD' => $theme_info['download_url'] . '&amp;origin=piwigo_download'));
     119          'URL_DOWNLOAD' => $theme_info['download_url'] . '&amp;origin=piwigo_download'
     120          )
     121        );
    140122      }
    141     }
    142     else
    143     {
    144       // Can't check theme
    145       $template->append('themes_cant_check', array(
    146         'NAME' => $fs_theme['name'],
    147         'VERSION' => $fs_theme['version']));
    148123    }
    149124  }
     
    151126else
    152127{
     128  $template->assign('SERVER_ERROR', true);
    153129  array_push($page['errors'], l10n('Can\'t connect to server.'));
    154130}
Note: See TracChangeset for help on using the changeset viewer.