-
Notifications
You must be signed in to change notification settings - Fork 17
Templates (email and documents)
phpIP is able to merge information from a matter with email templates and thus generate the email in your messaging application, ready to be sent.
The matter information can also be merged with Open Document templates (tested with .docx) that are dragged and dropped on a widget at the bottom right corner of the matter detail screen ("File merge Drop Zone"). The merge fields in the document templates are plain text tags in the format ${name}, placed wherever you need them in the document.
The application provides several ways for email creation:
-
From matter: near
Summaries
,Email
provides two buttonsEN
andFR
which allow to display a modal window listing all template members in respectively English and French languages. A list of parties having email address precedes the list of templates and you have to check at least one of them to prepare the email. If this contact list is void, you have to email address to at least one the actors of the matter. You can for example addContact
actor. The list can be filtered on each column to facilitate the choice of the template. Each line of the list has a button "Prepare" which call your favorite messaging client to create an email draft populated with information from the template merged with information from the matter file. Note that templates provided with fields from event or task will throw an error if acceded from this way. - From events window: if template is associated to the kind of event in the list, a button with a letter icon is displayed. Acting it will display the list of all members in the classes associated. These list is similar to the previous one.
- From tasks window: if template is associated to the kind of event or task in the list, a button with a letter icon is displayed on the same line. Acting it will display the list of all members in the classes associated. These list is similar to the previous one.
Templates are arranged in classes, and each class contains members. The same class of template can be indeed declined in different languages, styles, categories or formats.
Classes of templates are managed from Tools->Email template classes
.
Once the class is created, you have to add at least one member from Tools->Email template members
.
You can also add the class in relation to an event name from Tables->Event names
. Each event or task of this type will display a letter icon in Events
and Tasks
windows on the line of the associated event or task.
At the moment, formats allowed are TXT or HTML. HTML allows to add formatting tags like bold (b), underline (u) or ordered (ol, li) or unordered lists (ul, li). Not all messaging clients recognize this format, but Thunderbird allows it. If you use another messaging client, you have to prepare your templates in TXT format.
If you plan to prepare email differentiated according to your correspondents, you can decide to use more than the Standard style defined by default. For example, you can choose to be more concise with regular clients than with client having only one file. You can freely enter a label, but to avoid multiplication of variants, the field has an autocompletion feature which suggests previous used styles.
Only en
for English
, fr
for Français
and de
for Deutsch
are predefined. Adding other language needs to complete the code in \App\Http\Controllers\TemplateMembersController.php
. Default language is defined in the view template-members/create.php
.
You can add an information about a category of the template. You can for example define Filing
or Examination
. This helps to filter templates. You can freely enter a label, but to avoid multiplication of variants, the field has an autocompletion feature which suggests previous used categories.
For each member, you can define the language, the category, the style, the format and give content for a subject and the body.
Fields subject
and body
can contain variables from the database like in blade templates of Laravel
. Thus, the format of such a field is:
{{ $variable }}
included in the text.
The following variables are available:
-
description: a summary of the matter;
-
event: when accessed from events or tasks windows, information from the related event:
-
$event->event_date
: the date of the event; -
$event->detail
: detail like number; $event->notes
-
$event->info->name
: the name of the event;
-
-
task: when accessed from the tasks window, information from the related task:
-
$task->due_date
: the due date for the task; -
$task->done_date
: the date when the task has been closed; -
$task->detail
: detail like object to produce; $task->notes
-
$task->info->name
: the name of the task;
-
-
matter: an object to access a large variety of information from the matter;
- Country:
$matter->countryInfo->name
- Formatted filing date:
$matter->filing->event_date->isoFormat('LL')
- Filing number:
$matter->filing->detail
- Formatted publication date:
$matter->publication->event_date->isoFormat('LL')
- Publication number:
$matter->publication->detail
- Formatted grant date:
$matter->grant->event_date->isoFormat('LL')
- Grant number:
$matter->grant->detail
- Parent filing date:
$matter->parentFiling->event_date->isoFormat('LL')
- Parent filing number:
$matter->parentFiling->detail
- Formatted publication date:
$matter->publication->event_date->isoFormat('LL')
- Publication number:
$matter->publication->detail
- Formatted publication date:
$matter->publication->event_date->isoFormat('LL')
- Publication number:
$matter->publication->detail
- Title:
$matter->titles->first()->value
- Applicants:
$matter->applicants->pluck('name')->join(', ')
- Inventors:
$matter->actors->where('role_code', 'INV')->pluck('name')->join(', ')
- Next renewal date :
$matter->renewalsPending[0]->due_date->isoFormat('LL')
- Next renewal number :
$matter->renewalsPending[0]->detail
- Next task date :
$matter->tasksPending[0]->due_date->isoFormat('LL')
- Next task :
$matter->tasksPending[0]->detail
- Country:
As mentioned in introduction, Open Document templates (tested with .docx) can be dragged and dropped on the "File merge Drop Zone" widget visible in the matter detail page. As soon as the file is dropped, phpIP produces the merged document for downloading by the navigator.
The merge fields in the document templates are plain text tags in the format ${name}, placed wherever you need them in the template document.
The data for the fields cannot be generated programmatically like for the email template fields. The currently available fields are the following (the parenthesis are further explanations, not part of the field names).
- File_Ref (includes country, origin and type codes, where applicable, as a suffix)
- Country
- File_Category
- Filing_Date
- Filing_Number
- Pub_Date
- Pub_Number
- Priority (list of priority numbers and dates)
- Grant_Date
- Grant_Number
- Registration_Date
- Registration_Number
- Pub_Reg_Date
- Pub_Reg_Number
- Allowance_Date
- Expiration_Date
- Client
- Client_Address
- Client_Country
- Contact
- Billing_Address (defaulting to Client_Address if not used. Takes the Payor address if a payor is defined)
- Client_Ref
- VAT
- Official_Title (defaulting to Title if not used)
- English_Title (defaulting to Official_Title if not used)
- Title
- Trademark
- Classes (trademark classes)
- Inventors (list of inventor names)
- Inventor_Addresses (list of inventors with their addresses)
- Owner (list of owners defaulting to the list of applicants)
- Agent (with address)
- Agent_Ref
- Responsible
- Writer
- Annuity_Agent