Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OF-2892 Available Plugins page: redesign to make Documentation easier to see #2541

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3131,7 +3131,6 @@ plugin.available.file_size=File Size
plugin.available.install=Install
plugin.available.no_plugin=No new plugins available.
plugin.available.download=Download and Install
plugin.available.open_source= Open Source Plugins
plugin.available.installation.success = plugin installed successfully.
plugin.available.commercial_plugins = Commercial Plugins
plugin.available.outdated = The list of plugins below requires a newer version of the server.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_cs_CZ.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2094,7 +2094,6 @@ plugin.available.author=Autor
plugin.available.install=Instalovat
plugin.available.no_plugin=Žádné doplňky nejsou dostupné.
plugin.available.download=Stáhnout a nainstalovat
plugin.available.open_source= Open Source doplňky
plugin.available.installation.success = doplněk úspěšně nainstalován.
plugin.available.commercial_plugins = Komerční doplňky
plugin.available.outdated = Níže uvedený seznam doplňků vyžaduje novější verzi Openfire.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,6 @@ plugin.available.author=Autor
plugin.available.install=Installiere
plugin.available.no_plugin=Keine neuen Plugins verfüegbar.
plugin.available.download=Herunterladen und installieren
plugin.available.open_source=Open-Source Plugins
plugin.available.installation.success=Plugin erfolgreich installiert.
plugin.available.commercial_plugins=Gewerbliche Plugins
plugin.available.outdated=Die untere Pluginliste erfordert eine neuere Openfire Version.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2823,7 +2823,6 @@ plugin.available.file_size=Tamaño de Archivo
plugin.available.install=Instalar
plugin.available.no_plugin=No se han encontrados nuevos plugins.
plugin.available.download=Descargar e Instalar
plugin.available.open_source= Plugins de Código Abierto
plugin.available.installation.success = plugin instalado exitosamente.
plugin.available.commercial_plugins = Plugins Comericales
plugin.available.outdated = La lista de plugins a continuación requiere una nueva versión de Openfire.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1944,7 +1944,6 @@ plugin.available.author = Auteur
plugin.available.install = Installer
plugin.available.no_plugin = Aucun nouveau plugin disponible.
plugin.available.download = Télécharger et Installer
plugin.available.open_source = Plugins Open Source
plugin.available.installation.success = l'installation du plugin est terminée.
plugin.available.commercial_plugins = Plugins Commerciaux
plugin.available.outdated = La liste des plugins suivant nécéssite une version plus récente de Openfire.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_he.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2847,7 +2847,6 @@ plugin.available.file_size=גודל קובץ
plugin.available.install=התקן
plugin.available.no_plugin=No new plugins available.
plugin.available.download=הורד והתקן
plugin.available.open_source= תוספים קוד פתוח
plugin.available.installation.success = תוסף הותקן בהצלחה.
plugin.available.commercial_plugins = תוספים מסחריים
plugin.available.outdated = The list of plugins below requires a newer version of the server.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_ja_JP.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,6 @@ plugin.available.author=作者
plugin.available.install=インストール
plugin.available.no_plugin=利用可能な新規のプラグインがありません。
plugin.available.download=ダウンロードとインストール
plugin.available.open_source= オープンソースプラグイン
plugin.available.installation.success = プラグインが正常にインストールされました。
plugin.available.commercial_plugins = 商用プラグイン
plugin.available.outdated = 下のプラグインのリストは、より新しいバージョンのサーバーが要求されます。
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2817,7 +2817,6 @@ plugin.available.file_size=Bestandsgrootte
plugin.available.install=Install
plugin.available.no_plugin=No new plugins available.
plugin.available.download=Download and Install
plugin.available.open_source= Open Source Plugins
plugin.available.installation.success = plugin installed successfully.
plugin.available.commercial_plugins = Commercial Plugins
plugin.available.outdated = The list of plugins below requires a newer version of Openfire.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_pl_PL.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,6 @@ plugin.available.author=Autor
plugin.available.install=Zainstaluj
plugin.available.no_plugin=Brak nowych wtyczek.
plugin.available.download=Ściągnij i zainstaluj
plugin.available.open_source= Wtyczki Open Source
plugin.available.installation.success = Zainstalowano wtyczkę.
plugin.available.commercial_plugins = Wtyczki komercyjne
plugin.available.outdated = Lista wtyczek poniżej wymaga nowszej wersji serwera Openfire.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,6 @@ plugin.available.author=Autor
plugin.available.install=Instalar
plugin.available.no_plugin=Nenhum novo plugin disponível.
plugin.available.download=Baixar e Instalar
plugin.available.open_source= Plugins de Código Aberto
plugin.available.installation.success = plugin instalado com sucesso.
plugin.available.commercial_plugins = Plugins Comerciais
plugin.available.outdated = A lista de plugins abaixo requerem uma versão mais nova do Openfire.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_pt_PT.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,6 @@ plugin.available.author=Autor
plugin.available.install=Instalar
plugin.available.no_plugin=Nenhum novo plugin disponível.
plugin.available.download=Baixar e Instalar
plugin.available.open_source= Plugins de Código Aberto
plugin.available.installation.success = plugin instalado com sucesso.
plugin.available.commercial_plugins = Plugins Comerciais
plugin.available.outdated = A lista de plugins abaixo requerem uma versão mais nova do Openfire.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_ru_RU.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,6 @@ plugin.available.author=Разработчик
plugin.available.install=Установить
plugin.available.no_plugin=Нет новых плагинов.
plugin.available.download=Скачать и установить
plugin.available.open_source= Бесплатные плагины
plugin.available.installation.success = плагин успешно установлен.
plugin.available.commercial_plugins = Коммерческие плагины
plugin.available.outdated = Список плагинов ниже требует более новой версии сервера.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_sk.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,6 @@ plugin.available.author=Autor
plugin.available.install=Nainštalovať
plugin.available.no_plugin=Nie sú dostupné žiadne nové zásuvné moduly.
plugin.available.download=Stiahnuť a nainštalovať
plugin.available.open_source= Open source zásuvné moduly
plugin.available.installation.success = Zásuvný modul bol úspešne nainštalovaný.
plugin.available.commercial_plugins = Komerčné zásuvné moduly
plugin.available.outdated = Zoznam zásuvných modulov vyžaduje novšiu verziu servera.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_uk_UA.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2839,7 +2839,6 @@ plugin.available.file_size=Розмір файлу
plugin.available.install=Встановити
plugin.available.no_plugin=Немає нових плагінів.
plugin.available.download=Завантажте та встановіть
plugin.available.open_source= Плагіни з відкритим кодом
plugin.available.installation.success = плагін успішно встановлено.
plugin.available.commercial_plugins = Комерційні плагіни
plugin.available.outdated = Для наведеного нижче списку плагінів потрібна новіша версія сервера.
Expand Down
1 change: 0 additions & 1 deletion i18n/src/main/resources/openfire_i18n_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2849,7 +2849,6 @@ plugin.available.file_size=文件大小
plugin.available.install=安装
plugin.available.no_plugin=没有可用的新插件。
plugin.available.download=下载并安装
plugin.available.open_source= 开源插件
plugin.available.installation.success = 插件安装成功。
plugin.available.commercial_plugins = 商用插件
plugin.available.outdated = 下面的插件列表需要较新版本的服务器。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
public class AvailablePlugin extends PluginMetadata
{
private static final Logger Log = LoggerFactory.getLogger( AvailablePlugin.class );
private static final DateFormat RELEASE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
private static final DateFormat RELEASE_DATE_DISPLAY_FORMAT = DateFormat.getDateInstance(DateFormat.MEDIUM);

/**
* URL from where the latest version of the plugin can be downloaded.
Expand Down Expand Up @@ -141,15 +139,7 @@ public static AvailablePlugin getInstance( Element plugin )
minJavaVersion = new JavaSpecVersion( minJavaVersionValue );
}

String releaseDate = null;
final String releaseDateString = plugin.attributeValue("releaseDate");
if( releaseDateString!= null) {
try {
releaseDate = RELEASE_DATE_DISPLAY_FORMAT.format(RELEASE_DATE_FORMAT.parse(releaseDateString));
} catch (final ParseException e) {
Log.warn("Unexpected exception parsing release date: " + releaseDateString, e);
}
}
Comment on lines -144 to -152
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this exists because there are some older plugins out there with non-ISO release dates

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I forgot to comment on this. We don't try to parse the date and just show it in UI. So its format doesn't affect anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I anyway will recheck plugins. I remember that for the Pade plugin I already sent a PR

final String releaseDate = plugin.attributeValue("releaseDate");

long fileSize = -1;
String fileSizeValue = plugin.attributeValue("fileSize");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ private void saveAvailablePluginsInfo() {
Element component = xml.addElement("plugin");
component.addAttribute("name", plugin.getName());
component.addAttribute("latest", plugin.getVersion() != null ? plugin.getVersion().getVersionString() : null);
component.addAttribute("releaseDate", plugin.getReleaseDate());
component.addAttribute("changelog", plugin.getChangelog() != null ? plugin.getChangelog().toExternalForm() : null );
component.addAttribute("url", plugin.getDownloadURL() != null ? plugin.getDownloadURL().toExternalForm() : null );
component.addAttribute("author", plugin.getAuthor());
Expand Down
47 changes: 21 additions & 26 deletions xmppserver/src/main/webapp/available-plugins.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@
<thead>
<tr style="background:#eee;">
<td class="table-header-left">&nbsp;</td>
<td nowrap colspan="2" class="table-header"><fmt:message key="plugin.available.open_source"/></td>
<td nowrap class="table-header"><fmt:message key="plugin.available.description"/></td>
<td class="table-header"><fmt:message key="plugin.available.name"/></td>
<td nowrap class="table-header"><fmt:message key="plugin.available.version"/></td>
<td nowrap class="table-header"><fmt:message key="plugin.available.author"/></td>
<td nowrap class="table-header"><fmt:message key="plugin.available.file_size"/></td>
Expand All @@ -258,7 +257,7 @@
<c:otherwise>
<c:forEach items="${notInstalledPlugins}" var="notInstalledPlugin">
<tr id="${notInstalledPlugin.hashCode}">
<td style="width: 1%" class="line-bottom-border">
<td class="line-bottom-border" style="width: 1%">
<c:choose>
<c:when test="${not empty notInstalledPlugin.icon}">
<img src="${fn:escapeXml(notInstalledPlugin.icon)}" width="16" height="16" alt="Plugin">
Expand All @@ -268,47 +267,43 @@
</c:otherwise>
</c:choose>
</td>
<td style="width: 20%" nowrap class="line-bottom-border">
<td class="line-bottom-border" style="width: 60%;">
<c:if test="${not empty notInstalledPlugin.name}">
<c:out value="${notInstalledPlugin.name}"/>
<b><c:out value="${notInstalledPlugin.name}"/></b><br/>
</c:if>
<c:if test="${not empty notInstalledPlugin.description}">
<c:out value="${notInstalledPlugin.description}"/><br/>
</c:if>
</td>
<td nowrap class="line-bottom-border">
<c:if test="${not empty notInstalledPlugin.readme}">
<a href="${fn:escapeXml(notInstalledPlugin.readme)}"
target="_blank" title="<fmt:message key="plugin.admin.documentation" />">
<img src="images/doc-readme-16x16.gif">
</a>
</c:if>
<c:if test="${not empty notInstalledPlugin.changelog}">
<a href="${fn:escapeXml(notInstalledPlugin.changelog)}"
target="_blank" title="<fmt:message key="plugin.admin.changelog" />">
<img src="images/doc-changelog-16x16.gif">
target="_blank">
<fmt:message key="plugin.admin.documentation" />
</a>
</c:if>
</td>
<td style="width: 60%" class="line-bottom-border">
<c:if test="${not empty notInstalledPlugin.description}">
<c:out value="${notInstalledPlugin.description}"/>
</c:if>
</td>
<td style="width: 5%" nowrap class="line-bottom-border">
<td class="line-bottom-border" style="width: 10%; white-space: nowrap;">
<c:if test="${not empty notInstalledPlugin.version}">
<c:out value="${notInstalledPlugin.version}"/>
<c:out value="${notInstalledPlugin.version}"/><br/>
</c:if>
<c:if test="${not empty notInstalledPlugin.releaseDate}">
<br><c:out value="${notInstalledPlugin.releaseDate}"/>
<c:out value="${notInstalledPlugin.releaseDate}"/><br/>
</c:if>
<c:if test="${not empty notInstalledPlugin.changelog}">
<a href="${fn:escapeXml(notInstalledPlugin.changelog)}"
target="_blank">
<fmt:message key="plugin.admin.changelog" />
</a>
</c:if>
</td>
<td style="width: 15%" nowrap class="line-bottom-border">
<td class="line-bottom-border" style="width: 10%;">
<c:if test="${not empty notInstalledPlugin.author}">
<c:out value="${notInstalledPlugin.author}"/>
</c:if>
</td>
<td style="width: 15%; text-align: right" nowrap class="line-bottom-border">
<td class="line-bottom-border" style="width: 5%; white-space: nowrap; text-align: right;">
<c:out value="${admin:byteFormat( notInstalledPlugin.fileSize )}"/>
</td>
<td style="width: 1%; text-align: center" class="line-bottom-border">
<td class="line-bottom-border" style="width: 1%; text-align: center;">
<a href="javascript:downloadPlugin('${fn:escapeXml(notInstalledPlugin.downloadURL)}', '${notInstalledPlugin.version}', '${notInstalledPlugin.hashCode}')">
<span id="${notInstalledPlugin.hashCode}-image">
<img src="images/add-16x16.gif" alt="<fmt:message key="plugin.available.download" />">
Expand Down
Loading
Loading