-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Goulven.Furet
authored and
Goulven.Furet
committed
Oct 23, 2023
1 parent
5e1ac94
commit dc58fde
Showing
19 changed files
with
167 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.open4goods.ui.helper; | ||
|
||
import org.open4goods.config.yml.ui.VerticalConfig; | ||
import org.open4goods.services.VerticalsConfigService; | ||
|
||
import jakarta.servlet.http.HttpServletRequest; | ||
|
||
public class UiHelper { | ||
|
||
|
||
private HttpServletRequest request; | ||
private VerticalConfig verticalConfig; | ||
|
||
public UiHelper(HttpServletRequest request, VerticalConfig verticalConfig) { | ||
super(); | ||
this.request = request; | ||
this.verticalConfig = verticalConfig; | ||
} | ||
|
||
|
||
|
||
|
||
/** | ||
* Return the i18n for an attribute | ||
* @param key | ||
* @return | ||
*/ | ||
public String attributeName(String key) { | ||
|
||
return verticalConfig.getAttributesConfig().getAttributeConfigByKey(key).i18n(request.getLocale().getLanguage()); | ||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions
13
ui/src/main/resources/templates/inc/attribute-sourcing.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<span th:with="conflicts = ${attribute.hasConflicts()}, sourcesCount=${attribute.sourcesCount()}, distinctValues=${attribute.distinctValues()}"> | ||
|
||
<!-- /** Conflicts **/ --> | ||
<img th:if="${conflicts}" class="help-pointer" height="16" src="/icons/ko.png" data-bs-toggle="tooltip" data-bs-placement="top" th:title="#{attribute.sourcing.conflict(${attribute.sourcesCount()}, ${disctinctValues})}"> | ||
<!-- /** No conflicts, 1 source **/ --> | ||
<img th:unless="${conflicts}" class="help-pointer" height="16" src="/icons/ok.png" data-bs-toggle="tooltip" data-bs-placement="top" th:title="#{attribute.sourcing.noconflict(${attribute.sourcesCount()}, ${disctinctValues})}"> | ||
|
||
|
||
<!-- /** 1 source **/ --> | ||
<span th:if="${sourcesCount == 1}" class="help-pointer badge rounded-pill bg-info" th:text="${sourcesCount}" data-bs-toggle="tooltip" data-bs-placement="top" th:title="#{attribute.sourcing.list(${attribute.sourcesCount()}, ${disctinctValues}, ${attribute.providersToString()})}">1</span> | ||
<!-- /** multiple source **/ --> | ||
<span th:unless="${sourcesCount == 1}" class="help-pointer badge rounded-pill bg-success" th:text="${sourcesCount}" data-bs-toggle="tooltip" data-bs-placement="top" th:title="#{attribute.sourcing.list(${attribute.sourcesCount()}, ${disctinctValues}, ${attribute.sourcesToString()})})}">1</span> | ||
</span> |
4 changes: 2 additions & 2 deletions
4
ui/src/main/resources/templates/inc/attributes/class_energy.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 13 additions & 8 deletions
21
ui/src/main/resources/templates/inc/product-attributes.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.