1# --
2# Copyright (C) 2001-2020 OTRS AG, https://otrs.com/
3# --
4# This software comes with ABSOLUTELY NO WARRANTY. For details, see
5# the enclosed file COPYING for license information (GPL). If you
6# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
7# --
8
9[%
10SET OTRSBusinessLabel     = '<strong>OTRS Business Solution</strong>™';
11SET OTRSBusinessLinkLabel = '<strong><a href="#" class="OTRSBusinessRequired">OTRS Business Solution</a></strong>™';
12%]
13
14<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
15    <h1 class="InvisibleText">[% Translate("Process Management") | html %]</h1>
16
17    [% BreadcrumbPath = [
18            {
19                Name => Translate('Process Management'),
20            },
21        ]
22    %]
23
24    [% INCLUDE "Breadcrumb.tt" Path = BreadcrumbPath %]
25
26    <div class="SidebarColumn">
27        <div class="WidgetSimple">
28            <div class="Header">
29                <h2><label for="Filter">[% Translate("Filter for Processes") | html %]</label></h2>
30            </div>
31            <div class="Content">
32                <input type="text" id="Filter" class="W95pc" name="Filter" value="" placeholder="[% Translate("Just start typing to filter...") | html %]" title="[% Translate("Filter for processes") | html %]" />
33            </div>
34        </div>
35        <div class="WidgetSimple">
36            <div class="Header">
37                <h2>[% Translate("Actions") | html %]</h2>
38            </div>
39            <div class="Content">
40                <ul class="ActionList">
41                    <li>
42                        <a href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=ProcessNew" class="CallForAction Fullsize Center"><span><i class="fa fa-plus-square"></i> [% Translate("Create New Process") | html %]</span></a>
43                    </li>
44                    <li>
45                        <a href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=ProcessSync" class="CallForAction Fullsize Center"><span><i class="fa fa-rocket"></i> [% Translate("Deploy All Processes") | html %]</span></a>
46                    </li>
47                </ul>
48            </div>
49        </div>
50
51        <div class="WidgetSimple">
52            <div class="Header">
53                <h2>[% Translate("Configuration Import") | html %]</h2>
54            </div>
55            <div class="Content">
56                <p class="FieldExplanation">
57                    [% Translate("Here you can upload a configuration file to import a process to your system. The file needs to be in .yml format as exported by process management module.") | html %]
58                </p>
59                <ul class="ActionList SpacingTop">
60                    <li>
61                        <form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" class="Validate PreventMultipleSubmits">
62                            <input type="hidden" name="Action" value="[% Env("Action") %]"/>
63                            <input type="hidden" name="Subaction" value="ProcessImport"/>
64                            <input type="hidden" name="FormID" value="[% Data.FormID | html %]"/>
65                            <input name="FileUpload" id="FileUpload" type="file" size="18" class="Fixed W100pc Validate_Required [% Data.FileUploadInvalid | html %]"/>
66                            <div id="FileUploadError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
67                            <div id="FileUploadServerError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
68                            <fieldset class="SpacingTop">
69                                <input type="checkbox" id="OverwriteExistingEntitiesImport" name="OverwriteExistingEntities" value="1" checked="checked" />
70                                <label for="OverwriteExistingEntitiesImport">[% Translate("Overwrite existing entities") | html %]</label>
71                            </fieldset>
72                            <button class="CallForAction Fullsize Center SpacingTop" type="submit" value="[% Translate("Upload process configuration") | html %]">
73                                <span><i class="fa fa-upload"></i>[% Translate("Import process configuration") | html %]</span>
74                            </button>
75                        </form>
76                    </li>
77                </ul>
78            </div>
79        </div>
80
81        <div class="WidgetSimple" id="ExampleProcesses">
82            <div class="Header">
83                <h2>[% Translate("Ready2Adopt Processes") | html %]</h2>
84            </div>
85            <div class="Content">
86                <p class="FieldExplanation">
87                    [% Translate("Here you can activate Ready2Adopt processes showcasing our best practices. Please note that some additional configuration may be required.") | html %]
88                </p>
89            [% IF !Data.OTRSBusinessIsInstalled %]
90                <p class="FieldExplanation">
91                    [% Translate("Would you like to benefit from processes created by experts? Upgrade to %s to import some sophisticated Ready2Adopt processes.") | html | ReplacePlaceholders(OTRSBusinessLinkLabel) %]
92                </p>
93            [% END %]
94                <ul class="ActionList SpacingTop">
95                    <li>
96                        <form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" class="Validate PreventMultipleSubmits">
97                            <input type="hidden" name="Action" value="[% Env("Action") %]"/>
98                            <input type="hidden" name="Subaction" value="ProcessImport"/>
99                            <input type="hidden" name="FormID" value="[% Data.FormID | html %]"/>
100                            [% Data.ExampleProcessList %]
101                            <div id="ExampleProcessError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
102                            <div id="ExampleProcessServerError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
103                            <fieldset class="SpacingTop">
104                                <input type="checkbox" id="OverwriteExistingEntitiesExample" name="OverwriteExistingEntities" value="1" checked="checked" />
105                                <label for="OverwriteExistingEntitiesExample">[% Translate("Overwrite existing entities") | html %]</label>
106                            </fieldset>
107                            <button class="CallForAction Fullsize Center SpacingTop" type="submit" value="[% Translate("Import Ready2Adopt process") | html %]">
108                                <span><i class="fa fa-upload"></i>[% Translate("Import Ready2Adopt process") | html %]</span>
109                            </button>
110                        </form>
111                    </li>
112                </ul>
113            </div>
114        </div>
115        <div class="WidgetSimple">
116            <div class="Header">
117                <h2>[% Translate("Description") | html %]</h2>
118            </div>
119            <div class="Content">
120                <p class="FieldExplanation">
121                    [% Translate("To create a new Process you can either import a Process that was exported from another system or create a complete new one.") | html %]
122                </p>
123                <p class="FieldExplanation">
124                    [% Translate("Changes to the Processes here only affect the behavior of the system, if you synchronize the Process data. By synchronizing the Processes, the newly made changes will be written to the Configuration.") | html %]
125                </p>
126
127            </div>
128        </div>
129    </div>
130
131    <div class="ContentColumn">
132        <div class="WidgetSimple">
133            <div class="Header">
134                <h2>[% Translate("Processes") | html %]</h2>
135            </div>
136            <div class="Content">
137                <table class="DataTable" id="Processes">
138                    <thead>
139                        <tr>
140                            <th>[% Translate("Process name") | html %]</th>
141                            <th>[% Translate("Description") | html %]</th>
142                            <th>[% Translate("State") | html %]</th>
143                            <th class="Center">[% Translate("Export") | html %]</th>
144                            <th class="Center">[% Translate("Copy") | html %]</th>
145                            <th class="Center">[% Translate("Print") | html %]</th>
146                        </tr>
147                    </thead>
148                    <tbody>
149[% RenderBlockStart("ProcessRow") %]
150                        <tr [% IF Data.State != "Active"%]class="Invalid"[% END %]>
151                            <td>
152                                <a class="AsBlock" href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=ProcessEdit;ID=[% Data.ID | uri %];EntityID=[% Data.EntityID | uri %]" title="[% Translate(Data.Name) | html %] ([% Data.EntityID | html %])">
153                                    [% Translate(Data.Name) | html %]
154                                </a>
155                            </td>
156                            <td title="[% Translate(Data.Description) | html %]">[% Translate(Data.Description) | truncate(80) | html %]</td>
157                            <td>[% Translate(Data.State) | html %]</td>
158                            <td class="Center">
159                                <a href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=ProcessExport;ID=[% Data.ID | uri %]" title="[% Translate("Export Process Configuration") | html %]">
160                                    <i class="fa fa-download"></i> <span class="InvisibleText">[% Translate("Export") | html %]</span>
161                                </a>
162                            </td>
163                            <td class="Center">
164                                <a href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=ProcessCopy;ID=[% Data.ID | uri %];[% Env("ChallengeTokenParam") | html %]" title="[% Translate("Copy Process") | html %]">
165                                    <i class="fa fa-copy"></i> <span class="InvisibleText">[% Translate("Copy") | html %]</span>
166                                </a>
167                            </td>
168                            <td class="Center">
169                                <a href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=ProcessPrint;ID=[% Data.ID | uri %];[% Env("ChallengeTokenParam") | html %]" class="AsPopup PopupType_ProcessOverview">
170                                    <i class="fa fa-print"></i> <span class="InvisibleText">[% Translate("Print") | html %]</span>
171                                </a>
172                            </td>
173                        </tr>
174[% RenderBlockEnd("ProcessRow") %]
175[% RenderBlockStart("ProcessNoDataRow") %]
176                        <tr>
177                            <td colspan="6">
178                                [% Translate("No data found.") | html %]
179                            </td>
180                        </tr>
181[% RenderBlockEnd("ProcessNoDataRow") %]
182                        <tr class="FilterMessage Hidden">
183                            <td colspan="6">[% Translate("No matches found.") | html %]</td>
184                        </tr>
185                    </tbody>
186                </table>
187            </div>
188        </div>
189    </div>
190    <div class="Clear"></div>
191</div>
192