Skip to content

Commit

Permalink
Adding location field and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
doishub committed Jan 23, 2020
1 parent cfc649d commit 31c177f
Show file tree
Hide file tree
Showing 16 changed files with 434 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Resources/contao/dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'default' => array('date', 'author'),
'exclude' => true,
'inputType' => 'checkbox',
'options' => array('date', 'author', 'rating'),
'options' => array('date', 'author', 'rating', 'location'),
'reference' => &$GLOBALS['TL_LANG']['MSC'],
'eval' => array('multiple'=>true),
'sql' => "varchar(255) NOT NULL default ''"
Expand Down
15 changes: 13 additions & 2 deletions src/Resources/contao/dca/tl_recommendation.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
// Palettes
'palettes' => array
(
'default' => '{title_legend},title,alias,author;{date_legend},date,time;{recommendation_legend},rating,text,imageUrl;{teaser_legend:hide},teaser;{expert_legend:hide},cssClass,featured;{publish_legend},published,start,stop'
'default' => '{title_legend},title,alias;{date_legend},date,time;{recommendation_legend},author,location,text,imageUrl,rating;{teaser_legend:hide},teaser;{expert_legend:hide},cssClass,featured;{publish_legend},published,start,stop'
),

// Fields
Expand Down Expand Up @@ -147,7 +147,7 @@
'exclude' => true,
'search' => true,
'inputType' => 'text',
'eval' => array('rgxp'=>'alias', 'doNotCopy'=>true, 'unique'=>true, 'maxlength'=>128, 'tl_class'=>'w50 clr'),
'eval' => array('rgxp'=>'alias', 'doNotCopy'=>true, 'unique'=>true, 'maxlength'=>128, 'tl_class'=>'w50'),
'save_callback' => array
(
array('tl_recommendation', 'generateAlias')
Expand All @@ -165,6 +165,17 @@
'eval' => array('doNotCopy'=>true, 'mandatory'=>true, 'maxlength'=>128, 'tl_class'=>'w50'),
'sql' => "varchar(128) NOT NULL default ''"
),
'location' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_recommendation']['location'],
'exclude' => true,
'search' => true,
'sorting' => true,
'flag' => 1,
'inputType' => 'text',
'eval' => array('doNotCopy'=>true, 'maxlength'=>128, 'tl_class'=>'w50'),
'sql' => "varchar(128) NOT NULL default ''"
),
'date' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_recommendation']['date'],
Expand Down
4 changes: 4 additions & 0 deletions src/Resources/contao/languages/de/default.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<source>Rating</source>
<target>Bewertung</target>
</trans-unit>
<trans-unit id="MSC.location">
<source>Location</source>
<target>Ort</target>
</trans-unit>
</body>
</file>
</xliff>
4 changes: 4 additions & 0 deletions src/Resources/contao/languages/de/tl_recommendation.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
<source>Author</source>
<target>Autor</target>
</trans-unit>
<trans-unit id="tl_recommendation.location.0">
<source>Location</source>
<target>Ort</target>
</trans-unit>
<trans-unit id="tl_recommendation.author.1">
<source>Here you can change the author of the recommendation.</source>
<target>Hier können Sie den Autor der Bewertung ändern.</target>
Expand Down
12 changes: 12 additions & 0 deletions src/Resources/contao/languages/en/default.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" ?><xliff version="1.1">
<file datatype="php" original="src/Resources/contao/languages/en/default.php" source-language="en">
<body>
<trans-unit id="MSC.rating">
<source>Rating</source>
</trans-unit>
<trans-unit id="MSC.location">
<source>Location</source>
</trans-unit>
</body>
</file>
</xliff>
33 changes: 33 additions & 0 deletions src/Resources/contao/languages/en/modules.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" ?><xliff version="1.1">
<file datatype="php" original="src/Resources/contao/languages/en/modules.php" source-language="en">
<body>
<trans-unit id="MOD.recommendation.0">
<source>Recommendations</source>
</trans-unit>
<trans-unit id="MOD.recommendation.1">
<source>Manage recommendations</source>
</trans-unit>
<trans-unit id="MOD.recommendation_settings.0">
<source>Recommendation settings</source>
</trans-unit>
<trans-unit id="MOD.recommendation_settings.1">
<source>Configure recommendation settings</source>
</trans-unit>
<trans-unit id="FMD.recommendation">
<source>Recommendations</source>
</trans-unit>
<trans-unit id="FMD.recommendationlist.0">
<source>Recommendationlist</source>
</trans-unit>
<trans-unit id="FMD.recommendationlist.1">
<source>Adds a list of recommendations to the page</source>
</trans-unit>
<trans-unit id="FMD.recommendationreader.0">
<source>Recommendationreader</source>
</trans-unit>
<trans-unit id="FMD.recommendationreader.1">
<source>Shows the details of a recommendation</source>
</trans-unit>
</body>
</file>
</xliff>
39 changes: 39 additions & 0 deletions src/Resources/contao/languages/en/tl_module.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" ?><xliff version="1.1">
<file datatype="php" original="src/Resources/contao/languages/en/tl_module.php" source-language="en">
<body>
<trans-unit id="tl_module.recommendation_archives.0">
<source>Recommendation archives</source>
</trans-unit>
<trans-unit id="tl_module.recommendation_archives.1">
<source>Please select one or more recommendation archives.</source>
</trans-unit>
<trans-unit id="tl_module.recommendation_featured.0">
<source>Featured items</source>
</trans-unit>
<trans-unit id="tl_module.recommendation_featured.1">
<source>Here you can choose how featured items are handled.</source>
</trans-unit>
<trans-unit id="tl_module.recommendation_metaFields.0">
<source>Meta fields</source>
</trans-unit>
<trans-unit id="tl_module.recommendation_metaFields.1">
<source>Here you can select the meta fields.</source>
</trans-unit>
<trans-unit id="tl_module.recommendation_template.0">
<source>Recommendation template</source>
</trans-unit>
<trans-unit id="tl_module.recommendation_template.1">
<source>Here you can select the recommendation template.</source>
</trans-unit>
<trans-unit id="tl_module.all_items">
<source>Show all recommendations</source>
</trans-unit>
<trans-unit id="tl_module.featured">
<source>Show featured recommendation only</source>
</trans-unit>
<trans-unit id="tl_module.unfeatured">
<source>Skip featured recommendations</source>
</trans-unit>
</body>
</file>
</xliff>
177 changes: 177 additions & 0 deletions src/Resources/contao/languages/en/tl_recommendation.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
<?xml version="1.0" ?><xliff version="1.1">
<file datatype="php" original="src/Resources/contao/languages/en/tl_recommendation.php" source-language="en">
<body>
<trans-unit id="tl_recommendation.title.0">
<source>Title</source>
</trans-unit>
<trans-unit id="tl_recommendation.title.1">
<source>Please enter the recommendation title.</source>
</trans-unit>
<trans-unit id="tl_recommendation.alias.0">
<source>Recommendation alias</source>
</trans-unit>
<trans-unit id="tl_recommendation.alias.1">
<source>The recommendation alias is a unique reference to the recommendation which can be called instead of its numeric ID.</source>
</trans-unit>
<trans-unit id="tl_recommendation.author.0">
<source>Author</source>
</trans-unit>
<trans-unit id="tl_recommendation.location.0">
<source>Location</source>
</trans-unit>
<trans-unit id="tl_recommendation.author.1">
<source>Here you can change the author of the recommendation.</source>
</trans-unit>
<trans-unit id="tl_recommendation.date.0">
<source>Date</source>
</trans-unit>
<trans-unit id="tl_recommendation.date.1">
<source>Please enter the date according to the global date format.</source>
</trans-unit>
<trans-unit id="tl_recommendation.time.0">
<source>Time</source>
</trans-unit>
<trans-unit id="tl_recommendation.time.1">
<source>Please enter the time according to the global time format.</source>
</trans-unit>
<trans-unit id="tl_recommendation.rating.0">
<source>Rating</source>
</trans-unit>
<trans-unit id="tl_recommendation.rating.1">
<source>Here you can enter a recommendation.</source>
</trans-unit>
<trans-unit id="tl_recommendation.teaser.0">
<source>Recommendation teaser</source>
</trans-unit>
<trans-unit id="tl_recommendation.teaser.1">
<source>The recommendation teaser can be shown in a recommendation list instead of the full text. A &quot;read more …&quot; link will be added automatically.</source>
</trans-unit>
<trans-unit id="tl_recommendation.text.0">
<source>recommendation text</source>
</trans-unit>
<trans-unit id="tl_recommendation.text.1">
<source>Here you can enter the recommendation text.</source>
</trans-unit>
<trans-unit id="tl_recommendation.imageUrl.0">
<source>Image</source>
</trans-unit>
<trans-unit id="tl_recommendation.imageUrl.1">
<source>Here you can enter a recommendation image.</source>
</trans-unit>
<trans-unit id="tl_recommendation.cssClass.0">
<source>CSS class</source>
</trans-unit>
<trans-unit id="tl_recommendation.cssClass.1">
<source>Here you can enter one or more classes.</source>
</trans-unit>
<trans-unit id="tl_recommendation.featured.0">
<source>Feature recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.featured.1">
<source>Show the recommendation in a featured recommendation list.</source>
</trans-unit>
<trans-unit id="tl_recommendation.published.0">
<source>Publish recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.published.1">
<source>Make the recommendation publicly visible on the website.</source>
</trans-unit>
<trans-unit id="tl_recommendation.start.0">
<source>Show from</source>
</trans-unit>
<trans-unit id="tl_recommendation.start.1">
<source>Do not show the recommendation on the website before this day.</source>
</trans-unit>
<trans-unit id="tl_recommendation.stop.0">
<source>Show until</source>
</trans-unit>
<trans-unit id="tl_recommendation.stop.1">
<source>Do not show the recommendation on the website on and after this day.</source>
</trans-unit>
<trans-unit id="tl_recommendation.tstamp.0">
<source>Revision date</source>
</trans-unit>
<trans-unit id="tl_recommendation.tstamp.1">
<source>Date and time of the latest revision</source>
</trans-unit>
<trans-unit id="tl_recommendation.title_legend">
<source>Title and author</source>
</trans-unit>
<trans-unit id="tl_recommendation.date_legend">
<source>Date and time</source>
</trans-unit>
<trans-unit id="tl_recommendation.recommendation_legend">
<source>Recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.teaser_legend">
<source>Teaser</source>
</trans-unit>
<trans-unit id="tl_recommendation.expert_legend">
<source>Expert settings</source>
</trans-unit>
<trans-unit id="tl_recommendation.publish_legend">
<source>Publish settings</source>
</trans-unit>
<trans-unit id="tl_recommendation.new.0">
<source>New recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.new.1">
<source>Create a new recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.show.0">
<source>Recommendation details</source>
</trans-unit>
<trans-unit id="tl_recommendation.show.1">
<source>Show the details of recommendation ID %s</source>
</trans-unit>
<trans-unit id="tl_recommendation.edit.0">
<source>Edit recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.edit.1">
<source>Edit recommendation ID %s</source>
</trans-unit>
<trans-unit id="tl_recommendation.copy.0">
<source>Duplicate recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.copy.1">
<source>Duplicate recommendation ID %s</source>
</trans-unit>
<trans-unit id="tl_recommendation.cut.0">
<source>Move recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.cut.1">
<source>Move recommendation ID %s</source>
</trans-unit>
<trans-unit id="tl_recommendation.delete.0">
<source>Delete recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.delete.1">
<source>Delete recommendation ID %s</source>
</trans-unit>
<trans-unit id="tl_recommendation.toggle.0">
<source>Publish/unpublish recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.toggle.1">
<source>Publish/unpublish recommendation ID %s</source>
</trans-unit>
<trans-unit id="tl_recommendation.feature.0">
<source>Feature/unfeature recommendation</source>
</trans-unit>
<trans-unit id="tl_recommendation.feature.1">
<source>Feature/unfeature recommendation ID %s</source>
</trans-unit>
<trans-unit id="tl_recommendation.editmeta.0">
<source>Edit recommendation settings</source>
</trans-unit>
<trans-unit id="tl_recommendation.editmeta.1">
<source>Edit the recommendation settings</source>
</trans-unit>
<trans-unit id="tl_recommendation.pasteafter.0">
<source>Paste into this recommendation archive</source>
</trans-unit>
<trans-unit id="tl_recommendation.pasteafter.1">
<source>Paste after recommendation ID %s</source>
</trans-unit>
</body>
</file>
</xliff>
Loading

0 comments on commit 31c177f

Please sign in to comment.