Skip to content

Commit

Permalink
Manage fields for layer 2714
Browse files Browse the repository at this point in the history
  • Loading branch information
rmichaelis committed May 8, 2024
1 parent 82a4b9a commit 50cea3b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,31 @@ exports.prototype.showAttributesByLang =
var key = elem['key'];
var value = elem['value'];
var ok = false;
if (layerid == '2444' && (key == 'f_Betriebsform' ||
if (layerid == '2407' && (key == 'f_Cl_erosion' ||
key == 'f_Erosion_kl' || key == 'f_Erosion_Cl' ||
key == 'f_Erosioun_K')) {
if (this['language'] == 'fr' && key == 'f_Cl_erosion') {
ok = true;
} else if (this['language'] == 'de' && key == 'f_Erosion_kl') {
ok = true;
} else if (this['language'] == 'en' && key == 'f_Erosion_Cl') {
ok = true;
} else if (this['language'] == 'lb' && key == 'f_Erosioun_K') {
ok = true;
}
} else if (layerid == '2714' && (key == 'f_LABEL_eng' ||
key == 'f_LC_class_name_fr' || key == 'f_LC_class_name_de' ||
key == 'f_LC_class_name')) {
if (this['language'] == 'fr' && key == 'f_LC_class_name_fr') {
ok = true;
} else if (this['language'] == 'de' && key == 'f_LC_class_name_de') {
ok = true;
} else if (this['language'] == 'en' && key == 'f_LABEL_eng') {
ok = true;
} else if (this['language'] == 'lb' && key == 'f_LC_class_name') {
ok = true;
}
} else if (layerid == '2444' && (key == 'f_Betriebsform' ||
key == 'f_Forme_d_entreprise' || key == 'f_Operation_Form' ||
key == 'f_Form_vun_Geschaeft')) {
if (this['language'] == 'fr' && key == 'f_Forme_d_entreprise') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,13 @@ <h1>{{layers.layerLabel | translate}}</h1>
<div ng-repeat="feature in layers.features" class="poi-feature" ng-init="attributes = ctrl.prefixKeys(feature.attributes, 'f_')">
<h4>{{feature.attributes.label | translate }}</h4>
<div ng-if="ctrl.hasAttributes(feature)" ng-repeat="entry in attributes | orderBy: (layers.ordered ? '' : 'key')" class="row">
<span ng-if="!ctrl.isEmpty(entry['value']) && (!(layers.layer == '2407' && (entry['key'] == 'f_Cl_erosion' || entry['key'] == 'f_Erosion_kl' || entry['key'] == 'f_Erosion_Cl' || entry['key'] == 'f_Erosioun_K')))">
<div ng-if="!ctrl.isLink(entry['value'])" class="col-xs-4">
<label>{{entry['key'] | translate}}</label>
</div>
<div ng-if="!ctrl.isLink(entry['value'])" class="col-xs-8">
<span ng-bind-html="ctrl.trustAsHtml(entry['value'])"></span>
</div>
<div ng-if="ctrl.isLink(entry['value'])" class="col-xs-4">
</div>
<div ng-if="ctrl.isLink(entry['value'])" class="col-xs-8">
<a ng-href="{{entry['value']}}" target="_blank">{{entry['key'] | translate}}</a>
</div>
</span>
<span ng-if="!ctrl.isEmpty(entry['value']) && layers.layer == '2407' && ctrl.language == 'de' && entry['key'] == 'f_Erosion_kl'">
<div ng-if="ctrl.language == 'de'" class="col-xs-4">
<label>{{'f_Erosion_kl' | translate}}</label>
</div>
<div ng-if="ctrl.language == 'de'" class="col-xs-8">
<span ng-bind-html="ctrl.trustAsHtml(entry['value'])"></span>
</div>
</span>
<span ng-if="!ctrl.isEmpty(entry['value']) && layers.layer == '2407' && ctrl.language == 'fr' && entry['key'] == 'f_Cl_erosion'">
<div ng-if="ctrl.language == 'fr'" class="col-xs-4">
<label>{{'f_Cl_erosion' | translate}}</label>
</div>
<div ng-if="ctrl.language == 'fr'" class="col-xs-8">
<span ng-bind-html="ctrl.trustAsHtml(entry['value'])"></span>
</div>
</span>
<span ng-if="!ctrl.isEmpty(entry['value']) && layers.layer == '2407' && ctrl.language == 'en' && entry['key'] == 'f_Erosion_Cl'">
<div ng-if="ctrl.language == 'en'" class="col-xs-4">
<label>{{'f_Erosion_Cl' | translate}}</label>
</div>
<div ng-if="ctrl.language == 'en'" class="col-xs-8">
<span ng-bind-html="ctrl.trustAsHtml(entry['value'])"></span>
</div>
</span>
<span ng-if="!ctrl.isEmpty(entry['value']) && layers.layer == '2407' && ctrl.language == 'lb' && entry['key'] == 'f_Erosioun_K'">
<div ng-if="ctrl.language == 'lb'" class="col-xs-4">
<label>{{'f_Erosioun_K' | translate}}</label>
</div>
<div ng-if="ctrl.language == 'lb'" class="col-xs-8">
<span ng-bind-html="ctrl.trustAsHtml(entry['value'])"></span>
</div>
<span ng-if="!ctrl.isEmpty(entry['value']) && ctrl.showAttributesByLang(entry, layers.layer)">
<div ng-if="!ctrl.isLink(entry['value'])" class="col-xs-4"><label>{{entry['key'] | translate}}</label> </div>
<div ng-if="!ctrl.isLink(entry['value'])" class="col-xs-8"><span ng-bind-html="ctrl.trustAsHtml(entry['value'])"></span></div>
<div ng-if="ctrl.isLink(entry['value'])" class="col-xs-4"></div>
<div ng-if="ctrl.isLink(entry['value'])" class="col-xs-8"><a ng-href="{{entry['value']}}" target="_blank">{{entry['key'] | translate}}</a></div>
</span>
</div>

<div class="query-profile" ng-show="feature.attributes.showProfile.active">
<app-profile app-profile-data="feature.attributes.profile" app-profile-map="::ctrl.map" app-profile-interaction="feature.attributes.showProfile">
</div>
Expand Down

0 comments on commit 50cea3b

Please sign in to comment.