This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
leon:documents-manager [2018/08/22 11:48] bartek [Using Twig] |
leon:documents-manager [2023/11/15 11:53] (current) marek [Adding your logo to existing documents] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Documents Manager ====== | ====== Documents Manager ====== | ||
- | **Documents Manager** panel allows managing and customizing documents | + | **Documents Manager** panel allows managing and customizing documents |
- | The list of pre-defined documents is constantly expanded to cover all documents in Leon. In the future it will be possible to create completely **new custom document** apart from those pre-defined in Leon. | + | The list of pre-defined documents is constantly expanded to cover all documents in Leon. It is also possible to create completely **new custom document** apart from those pre-defined in Leon. |
===== Main page ===== | ===== Main page ===== | ||
- | [{{ : | + | [{{ : |
- | The main page shows **3** filtering options: by **document type**, **language** and **publishing status**, as well as **5** columns: | + | The main page shows **3** filtering options: by **document type**, **language** and **publishing status**, as well as **7** columns: |
- | * **Documents** - saved versions of Flight Order or Flight Brief. | + | * **Name** - name and the saved versions of the document |
- | * **Language** | + | * **Type** - type of the document |
- | * **Published** - the status of the documents, whether they have been published, or not. Click on the white dot if you want to publish saved version - the dot will become green. | + | * **Published** - the status of the documents, whether they have been published, or not. Click on the white dot if you want to publish |
+ | * **Visible in Crew App** - allows indicating which version(s) of the document will be available to Crew on a flight in the Crew App > tab ' | ||
+ | * **Language** - the language of the document indicated within the edit in the SETTINGS tab | ||
* **Last modified** - the date of the latest modification. | * **Last modified** - the date of the latest modification. | ||
* **Action** - once the document has been uploaded you can hover the mouse to see available options: | * **Action** - once the document has been uploaded you can hover the mouse to see available options: | ||
-{{: | -{{: | ||
-{{: | -{{: | ||
- | -{{: | + | -{{: |
-{{: | -{{: | ||
Line 27: | Line 29: | ||
---- | ---- | ||
- | ==== Creating | + | ==== Adding your logo to documents ==== |
- | In order to create a new document click {{:leon:documents-manager: | + | Adding your own logo to existing |
+ | All the documents are coded to display a **logo.png** file as a logo by default. To have your own logo displayed on all your documents, follow the steps below: | ||
- | When uploading | + | - Prepare |
+ | | ||
+ | - Click the ping icon you can find in the top right corner. | ||
+ | - In the right panel, go to the **FILES** tab. | ||
+ | - In the **FILES** tab, find a **logo.png** file which can be there, and remove it by clicking the trash bin icon. | ||
+ | - In the same place, upload the file you prepared in the 1st step. | ||
+ | - Here you are - your logo should be displayed on all documents which have the default coding. | ||
- | {{:leon:documents-manager:FO multiple versions.png? | + | < |
- | Click on the icon to view which version you prefer. | + | ---- |
+ | ==== Creating documents ==== | ||
+ | In order to create a new document click {{: | ||
+ | |||
+ | When uploading a new Flight Order template (use {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Click on the icon to view which version you prefer. | ||
Line 51: | Line 68: | ||
To publish a document which has been re-arranged you just need to click on the white dot {{: | To publish a document which has been re-arranged you just need to click on the white dot {{: | ||
- | Such a published document can be used in a section **Schedule** (right-click with the mouse over the trip). | + | Such a published document can be used in a section **OPS** (right-click with the mouse over the trip). |
Unpublishing documents works exactly in the same way - the green dot turns white and Leon shows a message in top-right corner: " | Unpublishing documents works exactly in the same way - the green dot turns white and Leon shows a message in top-right corner: " | ||
- | It is possible to publish **multiple versions** of the same document type. All of them will appear in the main Documents Manager page as well as in Schedule | + | It is possible to publish **multiple versions** of the same document type. All of them will appear in the main Documents Manager page as well as in OPS documents list and can be recognized by the revision name. |
**DELETING DOCUMENTS** | **DELETING DOCUMENTS** | ||
- | < | + | < |
Line 66: | Line 83: | ||
---- | ---- | ||
- | ===== Customizing documents ===== | + | ====== Customizing documents |
[{{ : | [{{ : | ||
Line 122: | Line 139: | ||
---- | ---- | ||
- | ==== HTML structure ==== | + | ===== Adding aircraft pictures to documents ===== |
+ | |||
+ | If you want to add pictures of your aircraft on a particular document, you need to first **upload pictures** to particular tail in a section SALES > FLEET (edit the aircraft and use 'EDIT PICTURES' | ||
+ | |||
+ | The example below shows how to add 2 pictures of the aircraft: the outside look and the inside one, plus a command that pictures should always appear on the next page and be separated from each other. | ||
+ | |||
+ | **__BODY__** | ||
+ | <code html [enable_line_numbers=" | ||
+ | <div class=" | ||
+ | < | ||
+ | <img src=" | ||
+ | <img src=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | **__CSS__** | ||
+ | <code css [enable_line_numbers=" | ||
+ | .pictures { | ||
+ | page-break-before: | ||
+ | line-height: | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Attaching extra pages to documents ===== | ||
+ | |||
+ | It is possible to attach **extra pdfs** to existing documents in Leon. If, for example, Flight Order needs to have attached an extra page for pilots with towing instructions, | ||
+ | |||
+ | <code Twig>{% pdf ' | ||
+ | |||
+ | where ' | ||
+ | |||
+ | ---- | ||
+ | ===== Attaching pdf documents from the checklist items to Crew Tripsheet ===== | ||
+ | |||
+ | It is possible to attach pdf files uploaded to some of the elements of the checklist to the Crew Tripsheet document. | ||
+ | |||
+ | This can be achieved by using the function {{: | ||
+ | |||
+ | This is only possible in the Crew tripsheet for the elements that contain ' | ||
+ | |||
+ | An example of how to embed the code in the tripsheet can be seen below, where the ' | ||
+ | |||
+ | <code Twig [enable_line_numbers=" | ||
+ | {% set files = [] %} | ||
+ | {% for leg in tripsheet.activities %} | ||
+ | {% if leg.checklist.catering and leg.checklist.catering.files %} | ||
+ | {% set files = files|merge(leg.checklist.catering.files) %} | ||
+ | {% endif %} | ||
+ | {% endfor %} | ||
+ | {% for trip in tripsheet.trips %} | ||
+ | {% if trip.checklistTrip.CATBriefsRequired and trip.checklistTrip.CATBriefsRequired.files %} | ||
+ | {% set files = files|merge(trip.checklistTrip.CATBriefsRequired.files) %} | ||
+ | {% endif %} | ||
+ | {% endfor %} | ||
+ | {{ showFiles(files) }}</ | ||
+ | The PDF file(s) will be embedded at the **end of the document**. | ||
+ | ----- | ||
+ | ===== Showing a map in documents ===== | ||
+ | |||
+ | [{{ : | ||
+ | |||
+ | It is also possible to **show a map** in particular documents. | ||
+ | |||
+ | <code html [enable_line_numbers=" | ||
+ | <map route={{ trip.flights|getRouteForMap}} width=" | ||
+ | </ | ||
+ | |||
+ | You can define **width** and **height** as you wish, as well as the** colour of lines** on the map (see screenshot). | ||
+ | |||
+ | The parameters set by default: “c_width=2” and “markers_icon_url” which have a format of “red_markers.png” can also be changed. Markers are visible by default, if you want to remove them, set a parameter as “none”. They are red circles that look like: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Adding header/ | ||
+ | |||
+ | To add either a **header** or a **footer** as a picture you need to use appropriate tabs in Documents Manager panel. | ||
+ | |||
+ | |||
+ | First of all a file should be uploaded to the right-hand filter, tab **FILES**. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Once it's done, a **code** needs to be inserted in a tab HEADER: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Then, in a **CSS** tab you can set up, that i.e. the footer should appear only on the 1st page, or that the footer should appear only at the bottom of the last page: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | ===== Changes history ===== | ||
+ | [{{ : | ||
+ | It is also possible to see the history of changes of the document as well as to preview the past versions of the code. | ||
+ | |||
+ | To access the history of changes, simply click on the {{: | ||
+ | |||
+ | Len will display the changes history information such as time and date (in UTC) and the name of the user who made changes (as per below): | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Clicking on the {{: | ||
+ | |||
+ | This will allow retrieving any past version of the document by pasting the code from the document to the relevant section of the Document Manager. | ||
+ | |||
+ | ----------------- | ||
+ | |||
+ | ------------- | ||
+ | ===== HTML structure | ||
**HTML** is a markup language that allows defining structure of web pages. Pages written in HTML can be further styled by CSS. In Documents manager user only writes HTML placed inside < | **HTML** is a markup language that allows defining structure of web pages. Pages written in HTML can be further styled by CSS. In Documents manager user only writes HTML placed inside < | ||
Line 149: | Line 283: | ||
---- | ---- | ||
- | ==== CSS structure ==== | + | ===== CSS structure |
CSS is used to add **style** to document' | CSS is used to add **style** to document' | ||
Line 169: | Line 303: | ||
---- | ---- | ||
- | ==== Using Twig ==== | + | ===== Using Twig ===== |
**Twig** is a template engine that can insert **dynamic data** from LEON into document’s HTML structure. Before using Twig you should familiarize yourself with data structure of a document you are customizing. | **Twig** is a template engine that can insert **dynamic data** from LEON into document’s HTML structure. Before using Twig you should familiarize yourself with data structure of a document you are customizing. | ||
Line 254: | Line 388: | ||
example output: start date of first flight not positioning. | example output: start date of first flight not positioning. | ||
+ | |||
+ | example usage | ||
+ | |||
+ | **{% if FDPs|sameFDPs %}** | ||
+ | |||
+ | example output: checks if all FDP elements are the same (duty start, duty end, duty lenght, next EOBT). | ||
+ | |||
+ | |||
---- | ---- |