Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Commit 4dcd4e7

Browse files
author
Gaël UTARD
authored
Merge pull request #803 from pierreloicq/accepthtml
accept html in the labels and removed old stuffs
2 parents 3c9977c + 4083f11 commit 4dcd4e7

File tree

6 files changed

+13
-18
lines changed

6 files changed

+13
-18
lines changed

CHANGES.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
2.29.3-dev
22
===================
33

4-
**Bug fixes**
4+
**Enhancements**
5+
6+
* Trek label description can contain HTML markup
7+
8+
**Breaking change**
9+
10+
* The settings RULES_FLAT_PAGES_ID is removed
511

6-
*
712

813
2.29.2 / 2020-10-28
914
===================

docs/settings-custom-json-all-options.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ ENABLE_DISTRICTS_FILTERING | Boolean | `true` | Show districts filtering on resu
4343
ENABLE_CITIES_FILTERING | Boolean | `true` | Show cities filtering on results page
4444
ENABLE_STRUCTURE_FILTERING | Boolean | `true` | Show structure filtering on results page
4545
GEO_FILTERS_AUTO_CLOSE | Boolean | `false` | If true select filters menus will close when a value is selected.
46-
RULES_FLAT_PAGES_ID | string | `""` | Specify the rules flat-page id which will be used in the detail page part about the rules.
4746
FAVORITES_ICON | String ([font awesome icon](http://fortawesome.github.io/Font-Awesome/icons/)) | `"heart"` | Specify the icon used for the favorites on the website. It must be a valid font awesome icon.
4847
SHARE_ICON | String ([font awesome icon](http://fortawesome.github.io/Font-Awesome/icons/)) | `"share-alt"` | Specify the icon used for the favorites on the website. It must be a valid font awesome icon.
4948
PLACEHOLDER_IMAGE | string(file name) | `""` | Placeholder used for contents elements.

src/app/config/settings.default.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"ENABLE_CITIES_FILTERING": true,
2727
"ENABLE_STRUCTURE_FILTERING": true,
2828
"GEO_FILTERS_AUTO_CLOSE": false,
29-
"RULES_FLAT_PAGES_ID": "",
3029
"FAVORITES_ICON": "heart",
3130
"SHARE_ICON": "share-alt",
3231
"PLACEHOLDER_IMAGE": "",

src/app/detail/controllers.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ function DetailController($scope, $rootScope, $state, $q, $modal, $timeout, $sta
99
$scope.displayCredits = globalSettings.DISPLAY_CREDITS_ON_IMAGE;
1010
$scope.foldAside = globalSettings.ASIDE_PANEL_FOLDED_BY_DEFAULT || false;
1111

12-
if (globalSettings.RULES_FLAT_PAGES_ID) {
13-
$scope.rulesId = globalSettings.RULES_FLAT_PAGES_ID;
14-
} else {
15-
$scope.rulesId = null;
16-
}
17-
1812
$scope.getUrlImg = function getUrlImg (path) {
1913
return globalSettings.API_URL + path;
2014
};

src/app/detail/templates/detail-content.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ <h3>
5050
<div class="detail-content-notice is-park-centered" ng-if="result.properties.is_park_centered">
5151
<i class="notice-symbol fa fa-info-circle"></i>
5252
<div class="notice-text">
53-
<p ng-if="!rulesId">{{ 'PARK_CENTERED' | translate}}</p>
54-
<a ng-if="rulesId" ui-sref="layout.flat({flatID: rulesId})">{{ 'PARK_CENTERED' | translate}}</a>
53+
<p>{{ 'PARK_CENTERED' | translate}}</p>
5554
</div>
56-
</div>
57-
55+
</div>
56+
5857
<div ng-repeat="label in result.properties.labels"
5958
class="detail-content-notice labels" ng-if="label">
6059
<span class="notice-symbol">
@@ -65,9 +64,8 @@ <h3>
6564

6665
<div class="notice-text">
6766
<p><strong>{{label.name | translate}}</strong></p>
68-
<p ng-if="!rulesId">{{label.advice | translate}}</p>
69-
<a ng-if="rulesId" ui-sref="layout.flat({flatID: rulesId})">{{ label.advice | translate}}</a>
70-
</div>
67+
<p ng-bind-html="label.advice | sanitizeData: true"></p>
68+
</div>
7169
</div>
7270

7371
<div class="detail-content-notice event-notice-custom" ng-if="result.properties.category.id === 'E'">

src/app/translation/po/it.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ msgid "TOWN_CROSSED"
145145
msgstr "Traversata di paese"
146146

147147
msgid "PARK_CENTERED"
148-
msgstr ""
148+
msgstr "Questo percorso si trova nel cuore del Parco Nazionale, consultare il regolamento"
149149

150150
msgid "TRANSPORTS"
151151
msgstr "Trasporti"

0 commit comments

Comments
 (0)