Skip to content

Commit 13fde1c

Browse files
TimotheeHrlseboo
authored andcommitted
LUT-28105 : Help message following export
1 parent 0ae8ecf commit 13fde1c

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

src/java/fr/paris/lutece/plugins/workflow/modules/formspdf/resources/formspdf_messages.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ modify.template.withRTE=Edit with a rich text editor. The macros must use bracke
5454
markers.label_table_title=Available bookmarks
5555
markers.label_description=Description
5656
markers.label_marker=Bookmark
57+
58+
exported.message=The form has been exported in PDF format
59+
exportPage=Export page

src/java/fr/paris/lutece/plugins/workflow/modules/formspdf/resources/formspdf_messages_fr.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ modify.template.withRTE=Avec un rich text editor. Les macros pour afficher les r
5555
markers.label_table_title=Signets disponibles
5656
markers.label_description=Description
5757
markers.label_marker=Signet
58+
59+
exported.message=Le formulaire a \u00e9t\u00e9 export\u00e9 au format PDF. Vous pouvez t\u00e9l\u00e9charger le document en cliquant sur le lien ci-dessous.
60+
exportPage=Page d'export

src/java/fr/paris/lutece/plugins/workflow/modules/formspdf/web/task/FormsPDFTaskComponent.java

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
import fr.paris.lutece.util.ReferenceItem;
5454
import fr.paris.lutece.util.ReferenceList;
5555
import fr.paris.lutece.util.html.HtmlTemplate;
56-
56+
import fr.paris.lutece.portal.service.i18n.I18nService;
57+
import fr.paris.lutece.portal.service.util.AppPathService;
5758
/**
5859
* This class represents a component for the task {@link fr.paris.lutece.plugins.workflow.modules.formspdf.service.task.FormsPDFTask FormsPDFTask}
5960
*
@@ -95,6 +96,10 @@ public class FormsPDFTaskComponent extends AbstractTaskComponent
9596
private static final String PARAMETER_ID_TASK = "id_task";
9697

9798
private static final String PARAMETER_ID_FORM_SELECTED = "id_form_selected";
99+
private static final String MESSAGE_KEY_EXPORTED = "module.workflow.formspdf.exported.message";
100+
private static final String MESSAGE_KEY_ERROR = "module.workflow.formspdf.notExported.message";
101+
private static final String MESSAGE_EXPORT_PAGE_TITLE = "module.workflow.formspdf.exportPage";
102+
private static final String URL_EXPORT_PAGE = "jsp/admin/plugins/filegenerator/ManageMyFiles.jsp";
98103

99104
@Override
100105
public String getDisplayConfigForm( HttpServletRequest request, Locale locale, ITask task )
@@ -144,10 +149,16 @@ public String getDisplayConfigForm( HttpServletRequest request, Locale locale, I
144149
return page.getHtml( );
145150
}
146151

152+
/**
153+
* {@inheritDoc}
154+
*/
147155
@Override
148-
public String getDisplayTaskInformation( int nIdHistory, HttpServletRequest request, Locale locale, ITask task )
156+
public String getDisplayTaskInformation( int nIdHistory, HttpServletRequest request, Locale locale, fr.paris.lutece.plugins.workflowcore.service.task.ITask task )
149157
{
150-
return null;
158+
String urlExportPage = AppPathService.getBaseUrl( request );
159+
urlExportPage += URL_EXPORT_PAGE;
160+
return I18nService.getLocalizedString(MESSAGE_KEY_EXPORTED, locale) + "<div><a href=\"" + urlExportPage + "\">" + I18nService.getLocalizedString( MESSAGE_EXPORT_PAGE_TITLE, locale ) + "</a></div>";
161+
151162
}
152163

153164
@Override

0 commit comments

Comments
 (0)