1
1
package de .holarse .web .controller ;
2
2
3
- import de .holarse .backend .db .Article ;
4
- import de .holarse .backend .db .ArticleRevision ;
5
- import de .holarse .backend .db .Attachment ;
6
- import de .holarse .backend .db .NodeSlug ;
7
- import de .holarse .backend .db .NodeStatus ;
8
- import de .holarse .backend .db .Tag ;
3
+ import de .holarse .backend .db .*;
9
4
import de .holarse .backend .db .repositories .*;
10
5
import de .holarse .backend .types .AttachmentDataType ;
11
6
import de .holarse .backend .types .NodeType ;
@@ -112,6 +107,7 @@ public ModelAndView show(@PathVariable("slug") final String slug, final ModelAnd
112
107
final Article article = articleRepository .findBySlug (slug ).orElseThrow (EntityNotFoundException ::new );
113
108
final ArticleRevision articleRevision = article .getArticleRevision ();
114
109
final Set <Tag > tags = article .getTags ();
110
+ final List <TagGroup > relevantTagGroups = tags .stream ().map (t -> t .getTagGroup ()).toList ();
115
111
//final NodeSlug mainSlug = nodeSlugRepository.findMainSlug(article.getNodeId()).orElseThrow(EntityNotFoundException::new);
116
112
117
113
// TODO
@@ -134,7 +130,6 @@ public ModelAndView show(@PathVariable("slug") final String slug, final ModelAnd
134
130
// View zusammenstellen
135
131
final ArticleView view = ArticleView .of (articleRevision );
136
132
view .setNodeId (article .getNodeId ());
137
- view .setTags (tags .stream ().map (t -> t .getName ()).collect (Collectors .joining (", " )));
138
133
view .setTagList (tags .stream ().map (TagView ::of ).toList ()); // TODO Sort by weight
139
134
view .setContent (renderer .render (view .getContent (), null ));
140
135
//view.setSlug(mainSlug.getName());
0 commit comments