+
diff --git a/admin/themes/default/template/themes_update.tpl b/admin/themes/default/template/themes_update.tpl
index f83c09ce3..84491f117 100644
--- a/admin/themes/default/template/themes_update.tpl
+++ b/admin/themes/default/template/themes_update.tpl
@@ -1,77 +1,62 @@
-{combine_script id='jquery.cluetip' load='async' require='jquery' path='themes/default/js/plugins/jquery.cluetip.packed.js'}
-{footer_script require='jquery.cluetip'}
-jQuery().ready(function(){ldelim}
- jQuery('.cluetip').cluetip({ldelim}
- width: 300,
- splitTitle: '|'
+{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/jquery.ui.min.js' }
+{combine_script id='jquery.ui.effects' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.effects.core.min.js' }
+{combine_script id='jquery.ui.effects.blind' load='async' require='jquery.ui.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' }
+
+{footer_script require='jquery.ui.effects.blind'}
+jQuery(document).ready(function(){ldelim}
+ jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {ldelim}
+ id = this.id.split('_');
+ jQuery("#revdesc_"+id[1]).toggle('blind');
+ jQuery(".button_"+id[1]).toggle();
+ return false;
});
});
{/footer_script}
-
{'Check for updates'|@translate}
+ {'Themes'|@translate}
-{if isset($themes_not_uptodate)}
-
-
{'Themes which need upgrade'|@translate}
-
-{/if}
-
-
-{if isset($themes_uptodate)}
-
-
{'Themes up to date'|@translate}
-
-
-
- | {'Name'|@translate} |
- {'Version'|@translate} |
-
-
-{foreach from=$themes_uptodate item=theme name=themes_loop}
-
- | {$theme.NAME} |
- {$theme.VERSION} |
-
-{/foreach}
-
-{/if}
-
-
-{if isset($themes_cant_check)}
-
-
{'Theme versions can\'t be checked'|@translate}
-
-
-
- | {'Name'|@translate} |
- {'Version'|@translate} |
-
-
-{foreach from=$themes_cant_check item=theme name=themes_loop}
-
- | {$theme.NAME} |
- {$theme.VERSION} |
-
-{/foreach}
-
+
+
+{elseif not isset($SERVER_ERROR)}
+
{'All themes are up to date.'|@translate}
{/if}
diff --git a/admin/themes_update.php b/admin/themes_update.php
index c68068737..8cb2fa004 100644
--- a/admin/themes_update.php
+++ b/admin/themes_update.php
@@ -97,59 +97,35 @@ if ($themes->get_server_themes())
{
$theme_info = $themes->server_themes[$fs_theme['extension']];
- list($date, ) = explode(' ', $theme_info['revision_date']);
-
- $ext_desc = '
'.l10n('Downloads').': '.$theme_info['extension_nb_downloads']."\r\n"
- ."\r\n"
- .$theme_info['extension_description'];
-
- $rev_desc = '
'.l10n('Version').': '.$theme_info['revision_name']."\r\n"
- .'
'.l10n('Released on').': '.$date."\r\n"
- .'
'.l10n('Downloads').': '.$theme_info['revision_nb_downloads']."\r\n"
- ."\r\n"
- .$theme_info['revision_description'];
-
- if ($themes->theme_version_compare($fs_theme['version'], $theme_info['revision_name']))
+ if (!$themes->theme_version_compare($fs_theme['version'], $theme_info['revision_name']))
{
- // Plugin is up to date
- $template->append('themes_uptodate', array(
- 'URL' => PEM_URL.'/extension_view.php?eid='.$theme_info['extension_id'],
- 'NAME' => $fs_theme['name'],
- 'EXT_DESC' => $ext_desc,
- 'VERSION' => $fs_theme['version'],
- 'VER_DESC' => $rev_desc));
- }
- else
- {
- // Plugin need upgrade
$url_auto_update = $base_url
. '&revision=' . $theme_info['revision_id']
. '&theme=' . $theme_id
. '&pwg_token='.get_pwg_token()
;
- $template->append('themes_not_uptodate', array(
+ $template->append('update_themes', array(
+ 'ID' => $theme_info['extension_id'],
'EXT_NAME' => $fs_theme['name'],
'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$theme_info['extension_id'],
- 'EXT_DESC' => $ext_desc,
- 'VERSION' => $fs_theme['version'],
+ 'EXT_DESC' => trim($theme_info['extension_description'], " \n\r"),
+ 'REV_DESC' => trim($theme_info['revision_description'], " \n\r"),
+ 'CURRENT_VERSION' => $fs_theme['version'],
'NEW_VERSION' => $theme_info['revision_name'],
- 'NEW_VER_DESC' => $rev_desc,
+ 'AUTHOR' => $theme_info['author_name'],
+ 'DOWNLOADS' => $theme_info['extension_nb_downloads'],
'URL_UPDATE' => $url_auto_update,
- 'URL_DOWNLOAD' => $theme_info['download_url'] . '&origin=piwigo_download'));
+ 'URL_DOWNLOAD' => $theme_info['download_url'] . '&origin=piwigo_download'
+ )
+ );
}
}
- else
- {
- // Can't check theme
- $template->append('themes_cant_check', array(
- 'NAME' => $fs_theme['name'],
- 'VERSION' => $fs_theme['version']));
- }
}
}
else
{
+ $template->assign('SERVER_ERROR', true);
array_push($page['errors'], l10n('Can\'t connect to server.'));
}
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index aeb9cdb8e..f77a0a3be 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -776,4 +776,6 @@ $lang['[Simulation]'] = "[Simulation]";
$lang['Themes which need upgrade'] = 'Themes which need upgrade';
$lang['All themes are up to date.'] = 'All themes are up to date.';
$lang['All plugins are up to date.'] = 'All plugins are up to date.';
+$lang['Visit theme site'] = 'Visit theme site';
+$lang['New Version'] = 'New Version';
?>
\ No newline at end of file
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index ef142edf2..a03a3f180 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -789,4 +789,6 @@ $lang['Remove from caddie'] = 'Retirer du panier';
$lang['Themes which need upgrade'] = 'Thèmes à mettre à jour';
$lang['All themes are up to date.'] = 'Tous les thèmes sont à jour.';
$lang['All plugins are up to date.'] = 'Tous les plugins sont à jour.';
+$lang['Visit theme site'] = 'Visitez le site du thème';
+$lang['New Version'] = 'Nouvelle version';
?>