Skip to content

Commit

Permalink
Merge pull request #31 from sizta/en-2.0
Browse files Browse the repository at this point in the history
updated translations
  • Loading branch information
zonky2 committed May 5, 2018
2 parents 966a1fb + 99587a7 commit f217de0
Show file tree
Hide file tree
Showing 14 changed files with 100 additions and 61 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
161 changes: 100 additions & 61 deletions manual/extended/notelist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ Installation via Composer
Prerequisites for installation:

* PHP 7.x
* Contao 3.5.x
* MetaModels core dev-hotfix/2.0.0-alpha16 (b326aed1) und DCG 2.0.0-beta39
* Contao 3.5.x or Contao 4.4.x
* MetaModels from core 2.0.0-alpha16 respecively 2.1 and DCG 2.0.0-beta39
* (Zip file of the extension, pls send a request to info@e-spin.de)

In the package manager type `metamodels/notelist` into the search field, then install and update the database.

Expand All @@ -40,29 +41,28 @@ Create a watch list

After you have successfully installed watch list, you will see a new icon in the row of metaModels icons. Click on it to set up and edit watch lists.

|img_notelist_icon|
|img_notelist_icon_en|

When you create a new watch list choose a name first.
At the moment you can select the PHP session or Contao session as "storage adapter".

If you select Contao session, the values of a watch list of logged in users will automatically be saved in the session values of the database. They are made available again, when the user logs in again.

You can restrict the recording of data records to only records with certain properties, e.g. the "department" or particular member groups with the filter selection. Filtering for member groups is possible by using the following extension "`condition membergroup filter
<https://github.com/cboelter/metamodels-filter_condition_membergroup>`_".

|img_nodelist_config|
|img_nodelist_config_en|

Via the list view you'll get access to all watch lists that have been set up.

|img_notelist_overview|
|img_notelist_overview_en|


Activate watch list in MetaModels list
--------------------------------------

You will find a new section called "note list" in the CE MetaModels list, respectively in the FE module, where you can activate one or more of the watch lists, which you have set up.

|img_notelist_ce_mm-list|
|img_notelist_ce_mm-list_en|

You can change the order of the "action outputs" by drag & drop via the watch list sorting.

Expand All @@ -76,7 +76,7 @@ The links are available in the `action` node and can be output with the followin

<a href="<?= $arrItem['actions']['notelist_1']['href'] ?>" class="<?= $arrItem['actions']['notelist_1']['class'] ?>"><?= $arrItem['actions']['notelist_1']['label'] ?></a>

|img_notelist_fe_list|
|img_notelist_fe_list_en|


Watch list output via filter
Expand All @@ -86,17 +86,17 @@ You can output the watch list on the front end with a normal MetaModels list, wh

To be able to filter you just need to create a filter with the new filter setting "Notelist". In the filter settings just select the watch list with the elements you'd like to output.

|img_notelist_filterrule|
|img_notelist_filterrule_en|

In the filtered list on the front end you should now see only employees from the watch list.

|img_notelist_filtered_list|
|img_notelist_filtered_list_en|

In the list view it would be e.g. possible to activate a second watch list, to transfer elements from one watch list to another - e.g. from a "like" list to an "order" list.

In the settings for a watch list you can optionally set a filter for the inclusion onto a watch list. E.g if there are only employees allowed who belong to the sales department, the list looks as folllows:

|img_notelist_fe_list_with_filter|
|img_notelist_fe_list_with_filter_en|


Data display and inclusion into the form
Expand All @@ -105,23 +105,46 @@ Data display and inclusion into the form
There is also a new widget `MetaModels note list` available in the form generator. With its settings you can control the display in the form as well as in the email.

You can activate one or more watch lists and select a render setting for the FE output as well as for the email output.
Additionally, by checking the checkbox "clear list", you can define for each watch list whether the list should be cleared after the form processing.

|img_nodelist_form_widget_en|

„Custom email template“ is an optional template which contains all renderings of the mail output of a watch list and "encloses" them.
Please note that you have to specify the extension "text2 for " Supported template formats" in the Contao settings!
Watch list data can only be sent as (plain) text in an email at the moment - the render setting "output format" for the listing within the email has to be set to "text" respectively.

In the form the respective data records are output with the selected render setting.


|img_nodelist_form_fe_list_en|

|img_nodelist_form_widget|
It is not possible e.g. to delete elements of the watch list within the form, because by reloading the page all the data already entered in the form would be lost .

The respective data records are output in the form with the possibility to delete the whole list or individual items.
You can output a list with all elements of the watch list before you output the form. There you could edit theme seprately or delete the whole list.

|img_nodelist_form_fe_list|
.. code-block:: html
:linenos:

<p><a href="de/metamodels/note-list-contact-form.html?notelist_2_action=clear">Clear List 2</a></p></a>

|img_nodelist_form_fe_list_edit_items_en|

Data is sent by email and output can be customized with the email template. The Contao form options or the Notification Center are available to you for transmission.

|img_notelist_email_list|
|img_notelist_email_list_en|


Known Issues and Next Features
------------------------------
Transfer of additional data for each item
-----------------------------------------

Optionally you can transfer additional data to the watchlist for each item, such as a number, tet or similar. To do this you'll have to create a form using the form generator, which contains the fields to display, e.g. field for a number and text field for a short information text - a submit button is not necessary and will be generated automatically.

This form will then be available in the watchlist settings - forms which already contain a watchlist formelement wll not be displayed (recursion!).

In the list view the form will be displayed with an "add/edit button" beneath each item. Data will be processed with the form and e.g. sent by email.

|img_notelist_fe_list_with_form_en|

* after sending the form the elements are not removed from the watch list
* optional specification of a number per watchlist item is missing


InsertTags
Expand All @@ -130,9 +153,9 @@ InsertTags
There are different InsertTags implemented for the output of the number of items in the watch lists. They output the number as follows ('mm_mitarbeiterliste'
is the respective MetaModels):

* Number of all items: {{metamodels_notelist::sum::mm_mitarbeiterliste}}
* Number of all items of the watch list with ID 1: {{metamodels_notelist::sum::mm_mitarbeiterliste::1}}
* Number of all items of the watch list with ID 1 and 2: {{metamodels_notelist::sum::mm_mitarbeiterliste::1,2}}
* Number of all items: {{metamodels_notelist::sum::mm_employeelist}}
* Number of all items of the watch list with ID 1: {{metamodels_notelist::sum::mm_employeelist::1}}
* Number of all items of the watch list with ID 1 and 2: {{metamodels_notelist::sum::mm_employeelist::1,2}}

If there is no item on the watch list, 0 (Null) will be output.

Expand All @@ -150,34 +173,38 @@ As an example for a feedback you can insert the following code to a custom Conta
:linenos:
<?php
use MetaModels\NoteList\Event\ManipulateNoteListEvent;
use MetaModels\NoteList\Event\NoteListEvents;
return [
NoteListEvents::MANIPULATE_NOTE_LIST => [
function (ManipulateNoteListEvent $event) {
// Only handle note list "1".
if ('1' !== ($listId = $event->getNoteList()->getStorageKey())) {
return;
}
switch ($event->getOperation()) {
case ManipulateNoteListEvent::OPERATION_ADD:
Message::addConfirmation('Added ' . $event->getItem()->get('id') . ' to ' . $listId);
break;
case ManipulateNoteListEvent::OPERATION_REMOVE:
Message::addConfirmation('Removed ' . $event->getItem()->get('id') . ' to ' . $listId);
break;
case ManipulateNoteListEvent::OPERATION_CLEAR:
Message::addConfirmation('Cleared ' . $listId);
break;
default:
throw new \RuntimeException('Unknown note list operation: ' . $event->getOperation());
}
}
]
];
use MetaModels\NoteList\Event\ManipulateNoteListEvent;
use MetaModels\NoteList\Event\NoteListEvents;

return [
NoteListEvents::MANIPULATE_NOTE_LIST => [
function (ManipulateNoteListEvent $event) {
// Only handle note list "1".
if ('1' !== ($listId = $event->getNoteList()->getStorageKey())) {
return;
}

switch ($event->getOperation()) {
case ManipulateNoteListEvent::OPERATION_ADD:
Message::addConfirmation('Added ' . $event->getItem()->get('id') . ' to ' . $listId);
// Add your own notes in metaData.
$metaData = $event->getNoteList()->getMetaDataFor($event->getItem());
$metaData['tstamp'] = time();
$event->getNoteList()->updateMetaDataFor($event->getItem(), $metaData);
break;
case ManipulateNoteListEvent::OPERATION_REMOVE:
Message::addConfirmation('Removed ' . $event->getItem()->get('id') . ' to ' . $listId);
break;
case ManipulateNoteListEvent::OPERATION_CLEAR:
Message::addConfirmation('Cleared ' . $listId);
break;
default:
throw new \RuntimeException('Unknown note list operation: ' . $event->getOperation());
}
}
]
];

On the front end the feedback can be shown in a template with the output of the Contao message - e.g.

Expand All @@ -189,13 +216,23 @@ On the front end the feedback can be shown in a template with the output of the
?>
Known Issues and Next Features
------------------------------

* Translation in DE (if project is released via Transifex)
* Data transfer to a form as HTML (currently only available as text)
*

Donations
---------

Thanks for the donations * for this extension to:

* `Sebastian Krull <http://www.sebastiankrull.de>`_: 350 €
* `Carsten Merz <http://www.fitkurs.de>`_: 350 €
* `Westwerk GmbH & Co. KG: <https://www.westwerk.ac>`_: 350 €
* `Niels Hegmanns <http://www.heimseiten.de>`_: 350 €
* `Hofer Werbung <http://www.hofer-werbung.de>`_: 350 €


(donations are stated at their net value)
Expand All @@ -206,14 +243,16 @@ Thanks for the donations * for this extension to:
<br />


.. |img_notelist_icon| image:: /_img/screenshots/extended/notelist/notelist_icon.png
.. |img_nodelist_config| image:: /_img/screenshots/extended/notelist/nodelist_config.png
.. |img_notelist_overview| image:: /_img/screenshots/extended/notelist/notelist_overview.png
.. |img_notelist_ce_mm-list| image:: /_img/screenshots/extended/notelist/notelist_ce_mm-list.png
.. |img_notelist_fe_list| image:: /_img/screenshots/extended/notelist/notelist_fe_list.png
.. |img_notelist_filterrule| image:: /_img/screenshots/extended/notelist/notelist_filterrule.png
.. |img_notelist_filtered_list| image:: /_img/screenshots/extended/notelist/notelist_filtered_list.png
.. |img_notelist_fe_list_with_filter| image:: /_img/screenshots/extended/notelist/notelist_fe_list_with_filter.png
.. |img_nodelist_form_widget| image:: /_img/screenshots/extended/notelist/nodelist_form_widget.png
.. |img_nodelist_form_fe_list| image:: /_img/screenshots/extended/notelist/nodelist_form_fe_list.png
.. |img_notelist_email_list| image:: /_img/screenshots/extended/notelist/notelist_email_list.png
.. |img_notelist_icon_en| image:: /_img/screenshots/extended/notelist/notelist_icon_en.png
.. |img_nodelist_config_en| image:: /_img/screenshots/extended/notelist/nodelist_config_en.png
.. |img_notelist_overview_en| image:: /_img/screenshots/extended/notelist/notelist_overview_en.png
.. |img_notelist_ce_mm-list_en| image:: /_img/screenshots/extended/notelist/notelist_ce_mm-list_en.png
.. |img_notelist_fe_list_en| image:: /_img/screenshots/extended/notelist/notelist_fe_list_en.png
.. |img_notelist_filterrule_en| image:: /_img/screenshots/extended/notelist/notelist_filterrule_en.png
.. |img_notelist_filtered_list_en| image:: /_img/screenshots/extended/notelist/notelist_filtered_list_en.png
.. |img_notelist_fe_list_with_filter_en| image:: /_img/screenshots/extended/notelist/notelist_fe_list_with_filter_en.png
.. |img_nodelist_form_widget_en| image:: /_img/screenshots/extended/notelist/nodelist_form_widget_en.png
.. |img_nodelist_form_fe_list_en| image:: /_img/screenshots/extended/notelist/nodelist_form_fe_list_en.png
.. |img_notelist_email_list_en| image:: /_img/screenshots/extended/notelist/notelist_email_list_en.png
.. |img_notelist_fe_list_with_form_en| image:: /_img/screenshots/extended/notelist/notelist_fe_list_with_form_en.png
.. |img_nodelist_form_fe_list_edit_items_en| image:: /_img/screenshots/extended/notelist/nodelist_form_fe_list_edit_items_en.png

0 comments on commit f217de0

Please sign in to comment.