diff --git a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java b/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java
index b2f46d04c..63896f20d 100644
--- a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java
+++ b/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java
@@ -1,5 +1,7 @@
package ru.klavogonki.kgparser;
+import ru.klavogonki.kgparser.http.UrlConstructor;
+
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
@@ -205,6 +207,11 @@ public String getNamePrepositional() {
return namePrepositional;
}
+ @Override
+ public String getLink() {
+ return UrlConstructor.dictionaryPage(getId());
+ }
+
public final String code;
public final String name;
public final String namePrepositional;
diff --git a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/StandardDictionary.java b/kgparserSrv/src/main/java/ru/klavogonki/kgparser/StandardDictionary.java
index dd149c9d4..27d7574a8 100644
--- a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/StandardDictionary.java
+++ b/kgparserSrv/src/main/java/ru/klavogonki/kgparser/StandardDictionary.java
@@ -187,4 +187,9 @@ public String getName() {
public String getNamePrepositional() {
return getDisplayNameInPrepositionalCase(this);
}
+
+ @Override
+ public String getLink() {
+ return null; // todo: is there a link to normal dictionaries page?
+ }
}
diff --git a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/Vocabulary.java b/kgparserSrv/src/main/java/ru/klavogonki/kgparser/Vocabulary.java
index e7a47ea27..127bf458e 100644
--- a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/Vocabulary.java
+++ b/kgparserSrv/src/main/java/ru/klavogonki/kgparser/Vocabulary.java
@@ -7,4 +7,6 @@ public interface Vocabulary {
String getName();
String getNamePrepositional();
+
+ String getLink(); // ссылка на страницу словаря
}
diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/dto/VocabularyDto.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/dto/VocabularyDto.java
index 02bac5d17..c39e00247 100644
--- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/dto/VocabularyDto.java
+++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/dto/VocabularyDto.java
@@ -10,4 +10,6 @@ public class VocabularyDto {
private String name;
private String namePrepositional;
+
+ private String link;
}
diff --git a/kgstatsSrv/src/main/resources/ftl/multi-vocabulary-top-by-speed-sum.ftl b/kgstatsSrv/src/main/resources/ftl/multi-vocabulary-top-by-speed-sum.ftl
index 7acff745e..9ecc8c99e 100644
--- a/kgstatsSrv/src/main/resources/ftl/multi-vocabulary-top-by-speed-sum.ftl
+++ b/kgstatsSrv/src/main/resources/ftl/multi-vocabulary-top-by-speed-sum.ftl
@@ -35,6 +35,8 @@
+ <#import "./vocabulary-link.ftl" as vl> <#-- link to dictionary -->
+
# |
@@ -43,8 +45,7 @@
<#list vocabularies as vocabulary>
- <#-- todo: link to vocabulary, get right from Dto, use ftl template -->
- ${vocabulary.name} |
+ <@vl.vocabularyLink vocabulary=vocabulary/> |
#list>
diff --git a/kgstatsSrv/src/main/resources/ftl/vocabulary-link.ftl b/kgstatsSrv/src/main/resources/ftl/vocabulary-link.ftl
new file mode 100644
index 000000000..cdd0d900a
--- /dev/null
+++ b/kgstatsSrv/src/main/resources/ftl/vocabulary-link.ftl
@@ -0,0 +1,10 @@
+<#-- expects Vocabulary as vocabulary -->
+<#macro vocabularyLink vocabulary>
+ <#if vocabulary.link??>
+
+ ${vocabulary.name}
+
+ <#else>
+ ${vocabulary.name}
+ #if>
+#macro>
diff --git a/kgstatsWeb/src/main/webapp/_multilingua-top-by-speed-sum.html b/kgstatsWeb/src/main/webapp/_multilingua-top-by-speed-sum.html
index 3645cfdee..ddf16e7d7 100644
--- a/kgstatsWeb/src/main/webapp/_multilingua-top-by-speed-sum.html
+++ b/kgstatsWeb/src/main/webapp/_multilingua-top-by-speed-sum.html
@@ -96,6 +96,7 @@