Author: tmortagne
Date: 2008-02-27 12:28:52 +0100 (Wed, 27 Feb 2008)
New Revision: 7993
Modified:
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/DeleteAppCode
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ExportAppCode
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ImportAppCode
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ReloadAppCode
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppManager/CreateApplication
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppManager/WebHome
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppResources/Translations
Log:
XAAM-51: Display an error in a page when plugin it depends on can't be loaded
Modified:
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/DeleteAppCode
===================================================================
---
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/DeleteAppCode
2008-02-27 10:34:35 UTC (rev 7992)
+++
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/DeleteAppCode
2008-02-27 11:28:52 UTC (rev 7993)
@@ -12,9 +12,9 @@
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1192218584000</creationDate>
-<date>1196346512000</date>
-<contentUpdateDate>1199724180000</contentUpdateDate>
-<version>1.1</version>
+<date>1204111379000</date>
+<contentUpdateDate>1204111379000</contentUpdateDate>
+<version>2.1</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -54,18 +54,18 @@
<tags/>
</property>
</object>
-<content>#if($action && $action == "delete")
- #if($confirm && $confirm == 1)
- #set($result = $Appmanager.deleteApplication($appname))
- #if ($result == $Exception.ERROR_NOERROR)
- #info($msg.get("xapp.successdeleteapp", [$appname]))
- #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED)
- #error($msg.get("notallowed"))
- #else
- #error($msg.get("xapp.errordeleteapp", [$appname, $result]))
- #end
- #else
- #xwikimessagebox($msg.get("xapp.answer.deleteapp.title", [$appname])
$msg.get("xapp.answer.deleteapp.msg", [$appname]) $doc.getURL("view",
"action=$action&amp;appname=$appname&amp;confirm=1")
$doc.getURL("view") $msg.get("yes") $msg.get("no"))
- #end
-#end</content>
-</xwikidoc>
+<content>#if($action && $action == "delete")
+ #if($confirm && $confirm == 1)
+ #set($result = $AppManager.deleteApplication($appname))
+ #if ($result == $Exception.ERROR_NOERROR)
+ #info($msg.get("xapp.successdeleteapp", [$appname]))
+ #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED)
+ #error($msg.get("notallowed"))
+ #else
+ #error($msg.get("xapp.errordeleteapp", [$appname, $result]))
+ #end
+ #else
+ #xwikimessagebox($msg.get("xapp.answer.deleteapp.title", [$appname])
$msg.get("xapp.answer.deleteapp.msg", [$appname]) $doc.getURL("view",
"action=$action&amp;appname=$appname&amp;confirm=1")
$doc.getURL("view") $msg.get("yes") $msg.get("no"))
+ #end
+#end
+</content></xwikidoc>
\ No newline at end of file
Modified:
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ExportAppCode
===================================================================
---
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ExportAppCode
2008-02-27 10:34:35 UTC (rev 7992)
+++
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ExportAppCode
2008-02-27 11:28:52 UTC (rev 7993)
@@ -12,9 +12,9 @@
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1192218584000</creationDate>
-<date>1196345472000</date>
-<contentUpdateDate>1199724180000</contentUpdateDate>
-<version>1.1</version>
+<date>1204111302000</date>
+<contentUpdateDate>1204111302000</contentUpdateDate>
+<version>2.1</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -54,39 +54,39 @@
<tags/>
</property>
</object>
-<content>#if($action && $action == "export")
- #if($confirm && $confirm == 1)
- #if($recurse && $recurse == 1)
- #set($recurse = true)
- #else
- #set($recurse = false)
- #end
- #if($withversion && $withversion == 1)
- #set($withversion = true)
- #else
- #set($withversion = false)
- #end
- #set($result = $Appmanager.exportApplicationXAR($appname, $recurse,
$withversion))
- #if ($result == $Exception.ERROR_NOERROR)
- #info($msg.get("xapp.successexportapp", [$appname]))
- #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED)
- #error($msg.get("notallowed"))
- #else
- #error($msg.get("xapp.errorexportapp", [$appname, $result]))
- #end
- #else
- <form id="exportForm" action="" method="get">
- #xwikimessageboxstart($msg.get("xapp.answer.exportapp.title",
[$appname]) "")
- <input type="hidden" id="confirm" name="confirm" value="1" />
- <input type="hidden" id="action" name="action" value="$action" />
- <input type="hidden" id="appname" name="appname" value="$appname"
/>
-
- <input type="checkbox" id="recurse" name="recurse" value="1"
checked="checked"/><label
for="recurse">$msg.get("xapp.answer.exportapp.recursive")</label><br/>
- <input type="checkbox" id="withdetails" name="withdetails"
value="1"/><label
for="withdetails">$msg.get("xapp.answer.exportapp.withdetails")</label>
-
- #xwikimessageboxsubmit($msg.get("ok"))
- #xwikimessageboxend()
- </form>
- #end
+<content>#if($action && $action == "export")
+ #if($confirm && $confirm == 1)
+ #if($recurse && $recurse == 1)
+ #set($recurse = true)
+ #else
+ #set($recurse = false)
+ #end
+ #if($withversion && $withversion == 1)
+ #set($withversion = true)
+ #else
+ #set($withversion = false)
+ #end
+ #set($result = $AppManager.exportApplicationXAR($appname, $recurse,
$withversion))
+ #if ($result == $Exception.ERROR_NOERROR)
+ #info($msg.get("xapp.successexportapp", [$appname]))
+ #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED)
+ #error($msg.get("notallowed"))
+ #else
+ #error($msg.get("xapp.errorexportapp", [$appname, $result]))
+ #end
+ #else
+ <form id="exportForm" action="" method="get">
+ #xwikimessageboxstart($msg.get("xapp.answer.exportapp.title",
[$appname]) "")
+ <input type="hidden" id="confirm" name="confirm" value="1" />
+ <input type="hidden" id="action" name="action" value="$action" />
+ <input type="hidden" id="appname" name="appname" value="$appname"
/>
+
+ <input type="checkbox" id="recurse" name="recurse" value="1"
checked="checked"/><label
for="recurse">$msg.get("xapp.answer.exportapp.recursive")</label><br/>
+ <input type="checkbox" id="withdetails" name="withdetails"
value="1"/><label
for="withdetails">$msg.get("xapp.answer.exportapp.withdetails")</label>
+
+ #xwikimessageboxsubmit($msg.get("ok"))
+ #xwikimessageboxend()
+ </form>
+ #end
#end</content>
</xwikidoc>
Modified:
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ImportAppCode
===================================================================
---
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ImportAppCode
2008-02-27 10:34:35 UTC (rev 7992)
+++
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ImportAppCode
2008-02-27 11:28:52 UTC (rev 7993)
@@ -12,9 +12,9 @@
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1192218584000</creationDate>
-<date>1196265842000</date>
-<contentUpdateDate>1199724180000</contentUpdateDate>
-<version>1.1</version>
+<date>1204111366000</date>
+<contentUpdateDate>1204111366000</contentUpdateDate>
+<version>2.1</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -54,14 +54,14 @@
<tags/>
</property>
</object>
-<content>#if($action && $action == "import")
- #set($result = $Appmanager.importApplication($packagename))
- #if ($result == $Exception.ERROR_NOERROR)
- #info($msg.get("xapp.successimportapp", [$packagename]))
- #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED)
- #error($msg.get("notallowed"))
- #else
- #error($msg.get("xapp.errorimportapp", [$packagename, $result]))
- #end
-#end</content>
-</xwikidoc>
+<content>#if($action && $action == "import")
+ #set($result = $AppManager.importApplication($packagename))
+ #if ($result == $Exception.ERROR_NOERROR)
+ #info($msg.get("xapp.successimportapp", [$packagename]))
+ #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED)
+ #error($msg.get("notallowed"))
+ #else
+ #error($msg.get("xapp.errorimportapp", [$packagename, $result]))
+ #end
+#end
+</content></xwikidoc>
\ No newline at end of file
Modified:
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ReloadAppCode
===================================================================
---
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ReloadAppCode
2008-02-27 10:34:35 UTC (rev 7992)
+++
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppCode/ReloadAppCode
2008-02-27 11:28:52 UTC (rev 7993)
@@ -12,9 +12,9 @@
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1192218584000</creationDate>
-<date>1196265791000</date>
-<contentUpdateDate>1199724180000</contentUpdateDate>
-<version>1.1</version>
+<date>1204111371000</date>
+<contentUpdateDate>1204111371000</contentUpdateDate>
+<version>2.1</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -54,14 +54,14 @@
<tags/>
</property>
</object>
-<content>#if($action && $action == "reload")
- #set($result = $Appmanager.reloadApplication($appname))
- #if ($result == $Exception.ERROR_NOERROR)
- #info($msg.get("xapp.successreloadapp", [$appname]))
- #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED)
- #error($msg.get("notallowed"))
- #else
- #error($msg.get("xapp.errorreloadapp", [$appname, $result]))
- #end
-#end</content>
-</xwikidoc>
+<content>#if($action && $action == "reload")
+ #set($result = $AppManager.reloadApplication($appname))
+ #if ($result == $Exception.ERROR_NOERROR)
+ #info($msg.get("xapp.successreloadapp", [$appname]))
+ #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED)
+ #error($msg.get("notallowed"))
+ #else
+ #error($msg.get("xapp.errorreloadapp", [$appname, $result]))
+ #end
+#end
+</content></xwikidoc>
\ No newline at end of file
Modified:
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppManager/CreateApplication
===================================================================
---
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppManager/CreateApplication
2008-02-27 10:34:35 UTC (rev 7992)
+++
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppManager/CreateApplication
2008-02-27 11:28:52 UTC (rev 7993)
@@ -12,9 +12,9 @@
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1192218584000</creationDate>
-<date>1196760971000</date>
-<contentUpdateDate>1199724181000</contentUpdateDate>
-<version>1.1</version>
+<date>1204110324000</date>
+<contentUpdateDate>1204110324000</contentUpdateDate>
+<version>3.1</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -54,59 +54,63 @@
<tags/>
</property>
</object>
-<content>#set($AppManager = $xwiki.applicationmanager)
-#set($Exception = $AppManager.DefaultException)
-##
-#set($appdocument = $AppManager.createApplicationDocument())
-#set($appdocumentobject =
$appdocument.updateObjectFromRequest("XAppClasses.XWikiApplicationClass"))
-##
-#set($action = $request.getParameter("action"))
-##
-#############################################################################
-##
-1 $msg.get("xapp.createapplication")
-##
-#if($action)
- #if($action == "create")
- #set($result = $AppManager.createApplication($appdocument, true))
- #if ($result == $Exception.ERROR_NOERROR)
- <font color=green>
- $msg.get("xapp.successcreateapp", [$appdocument.appname,
$appdocument.getFullName()])
- </font>
- #else
- <font color=red>
- #if ($result == $Exception.ERROR_AM_APPDOCALREADYEXISTS)
- $msg.get("xapp.errorcreateapp.ERROR_AM_APPDOCALREADYEXISTS",
[$appdocument.appname])
- #else
- $msg.get("xapp.errorcreateapp", [$appdocument.appname, $result])
- #end
- </font>
- #end
- #end
-#end
-##
-<form method="get" action="">
- <fieldset>
- <legend>$msg.get("xapp.legend.application")</legend>
- <input type="hidden" name="action" value="create" />
- <table width="100%">
- <tr>
- <td>$msg.get("xapp.appname")</td>
- <td>$appdocument.display("appname", "edit")</td>
- </tr>
- <tr>
- <td>$msg.get("xapp.description")</td>
- <td>$appdocument.display("description", "edit")</td>
- </tr>
- <tr>
- <td>$msg.get("version")</td>
- <td>$appdocument.display("appversion", "edit")</td>
- </tr>
- </table>
- </fieldset>
- <fieldset>
- <legend>$msg.get("xapp.legend.validate")</legend>
- <input type="submit" value="$msg.get("create")" />
- </fieldset>
+<content>#set($AppManager = $xwiki.applicationmanager)
+#if(!$AppManager)
+ #error($msg.get("xapp.pluginnotenabled"))
+#end
+##
+#set($Exception = $AppManager.DefaultException)
+##
+#set($appdocument = $AppManager.createApplicationDocument())
+#set($appdocumentobject =
$appdocument.updateObjectFromRequest("XAppClasses.XWikiApplicationClass"))
+##
+#set($action = $request.getParameter("action"))
+##
+#############################################################################
+##
+1 $msg.get("xapp.createapplication")
+##
+#if($action)
+ #if($action == "create")
+ #set($result = $AppManager.createApplication($appdocument, true))
+ #if ($result == $Exception.ERROR_NOERROR)
+ <font color=green>
+ $msg.get("xapp.successcreateapp", [$appdocument.appname,
$appdocument.getFullName()])
+ </font>
+ #else
+ <font color=red>
+ #if ($result == $Exception.ERROR_AM_APPDOCALREADYEXISTS)
+ $msg.get("xapp.errorcreateapp.ERROR_AM_APPDOCALREADYEXISTS",
[$appdocument.appname])
+ #else
+ $msg.get("xapp.errorcreateapp", [$appdocument.appname, $result])
+ #end
+ </font>
+ #end
+ #end
+#end
+##
+<form method="get" action="">
+ <fieldset>
+ <legend>$msg.get("xapp.legend.application")</legend>
+ <input type="hidden" name="action" value="create" />
+ <table width="100%">
+ <tr>
+ <td>$msg.get("xapp.appname")</td>
+ <td>$appdocument.display("appname", "edit")</td>
+ </tr>
+ <tr>
+ <td>$msg.get("xapp.description")</td>
+ <td>$appdocument.display("description", "edit")</td>
+ </tr>
+ <tr>
+ <td>$msg.get("version")</td>
+ <td>$appdocument.display("appversion", "edit")</td>
+ </tr>
+ </table>
+ </fieldset>
+ <fieldset>
+ <legend>$msg.get("xapp.legend.validate")</legend>
+ <input type="submit" value="$msg.get("create")" />
+ </fieldset>
</form></content>
</xwikidoc>
Modified:
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppManager/WebHome
===================================================================
---
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppManager/WebHome
2008-02-27 10:34:35 UTC (rev 7992)
+++
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppManager/WebHome
2008-02-27 11:28:52 UTC (rev 7993)
@@ -12,9 +12,9 @@
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1192218584000</creationDate>
-<date>1200778515000</date>
-<contentUpdateDate>1200778515000</contentUpdateDate>
-<version>5.1</version>
+<date>1204111394000</date>
+<contentUpdateDate>1204111394000</contentUpdateDate>
+<version>8.1</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -54,9 +54,13 @@
<tags/>
</property>
</object>
-<content>#set($Appmanager = $xwiki.applicationmanager)
-#set($Exception = $Appmanager.DefaultException)
+<content>#set($AppManager = $xwiki.applicationmanager)
+#if(!$AppManager)
+ #error($msg.get("xapp.pluginnotenabled"))
+#end
+#set($Exception = $AppManager.DefaultException)
+
#set($action = $request.getParameter("action"))
#set($confirm = $request.getParameter("confirm"))
@@ -83,7 +87,7 @@
1 $msg.get("xapp.appmanager")
-#set($listApp = $Appmanager.getApplicationDocumentList())
+#set($listApp = $AppManager.getApplicationDocumentList())
$msg.get("xapp.totalnumberofapp") : $listApp.size()
@@ -107,5 +111,5 @@
#foreach ($package in $listpackage)
-
[$package.getFilename()>?action=import&amp;packagename=$package.getFilename()]
#end
-#end</content>
-</xwikidoc>
+#end
+</content></xwikidoc>
\ No newline at end of file
Modified:
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppResources/Translations
===================================================================
---
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppResources/Translations
2008-02-27 10:34:35 UTC (rev 7992)
+++
xwiki-platform/xwiki-applications/trunk/application-manager/src/main/resources/XAppResources/Translations
2008-02-27 11:28:52 UTC (rev 7993)
@@ -12,9 +12,9 @@
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1192218584000</creationDate>
-<date>1196760963000</date>
-<contentUpdateDate>1199724180000</contentUpdateDate>
-<version>1.1</version>
+<date>1204109661000</date>
+<contentUpdateDate>1204109661000</contentUpdateDate>
+<version>3.1</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -54,49 +54,50 @@
<tags/>
</property>
</object>
-<content>{table}
-##
-# Application Manager translation page
-##
-xapp.appmanager=Applications manager
-##
-# LABELS
-##
-xapp.totalnumberofapp=Total number of applications
-xapp.appname=Application name
-xapp.description=Description
-xapp.docname=Document Name
-xapp.availablefilestoimport=Available files to import
-xapp.legend.application=Application
-xapp.legend.validate=Validate
-##
-# ACTIONS
-##
-xapp.createapplication=Create new application
-xapp.action.reloadapp=Reload
-xapp.action.exportrecurse=Export
-xapp.action.exportnonrecurse=Export (non recursive)
-##
-# ANSWER
-##
-xapp.answer.deleteapp.title=Delete application \"{0}\"
-xapp.answer.deleteapp.msg=Are you sure you wish to delete application \"{0}\" ?
-xapp.answer.exportapp.title=Export application \"{0}\"
-xapp.answer.exportapp.recursive=Recursive
-xapp.answer.exportapp.withdetails=With history
-##
-# MESSAGES
-##
-xapp.successexportapp=Export application \"{0}\" succes.
-xapp.errorexportapp=An error occurred while exporting application \"{0}\"
(code \"{1}\").
-xapp.successimportapp=Import application package \"{0}\" succes.
-xapp.errorimportapp=An error occurred while importing application package
\"{0}\" (code \"{1}\").
-xapp.successdeleteapp=Delete application \"{0}\" succes.
-xapp.errordeleteapp=An error occurred while deleting application \"{0}\" (code
\"{1}\").
-xapp.successcreateapp=Application \"{0}\" has been created. You can access it
at [{1}].
-xapp.errorcreateapp=An error occurred while creating application \"{0}\" (code
\"{1}\").
-xapp.errorcreateapp.ERROR_AM_APPDOCALREADYEXISTS=Application \"{0}\" already
exists. Choose another name.
-xapp.successreloadapp=Reload application \"{0}\" succes.
-xapp.errorreloadapp=An error occurred while reloading application \"{0}\"
(code \"{1}\").
+<content>{table}
+##
+# Application Manager translation page
+##
+xapp.appmanager=Applications manager
+xapp.pluginnotenabled=The Application Manager plugin is not enabled. This page
will not work properly. Make sure
"com.xpn.xwiki.plugin.applicationmanager.ApplicationManagerPlugin" is listed in
xwiki.plugins parameter in xwiki.cfg file.
+##
+# LABELS
+##
+xapp.totalnumberofapp=Total number of applications
+xapp.appname=Application name
+xapp.description=Description
+xapp.docname=Document Name
+xapp.availablefilestoimport=Available files to import
+xapp.legend.application=Application
+xapp.legend.validate=Validate
+##
+# ACTIONS
+##
+xapp.createapplication=Create new application
+xapp.action.reloadapp=Reload
+xapp.action.exportrecurse=Export
+xapp.action.exportnonrecurse=Export (non recursive)
+##
+# ANSWER
+##
+xapp.answer.deleteapp.title=Delete application \"{0}\"
+xapp.answer.deleteapp.msg=Are you sure you wish to delete application \"{0}\" ?
+xapp.answer.exportapp.title=Export application \"{0}\"
+xapp.answer.exportapp.recursive=Recursive
+xapp.answer.exportapp.withdetails=With history
+##
+# MESSAGES
+##
+xapp.successexportapp=Export application \"{0}\" succes.
+xapp.errorexportapp=An error occurred while exporting application \"{0}\"
(code \"{1}\").
+xapp.successimportapp=Import application package \"{0}\" succes.
+xapp.errorimportapp=An error occurred while importing application package
\"{0}\" (code \"{1}\").
+xapp.successdeleteapp=Delete application \"{0}\" succes.
+xapp.errordeleteapp=An error occurred while deleting application \"{0}\" (code
\"{1}\").
+xapp.successcreateapp=Application \"{0}\" has been created. You can access it
at [{1}].
+xapp.errorcreateapp=An error occurred while creating application \"{0}\" (code
\"{1}\").
+xapp.errorcreateapp.ERROR_AM_APPDOCALREADYEXISTS=Application \"{0}\" already
exists. Choose another name.
+xapp.successreloadapp=Reload application \"{0}\" succes.
+xapp.errorreloadapp=An error occurred while reloading application \"{0}\"
(code \"{1}\").
{table}</content>
</xwikidoc>
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications