Merge branch 'bugfix/themennamen' into 'dev'
Verwandte Themen als Displaynamen anzeigen See merge request eb2342s/swe-b1-a!8
This commit was merged in pull request #68.
This commit is contained in:
@@ -64,7 +64,7 @@ class SubjectData
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result[] = $subjectData;
|
$result[$subjectData->id] = $subjectData;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class TopicData
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result[] = $topicData;
|
$result[$topicData->id] = $topicData;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@@ -621,10 +621,15 @@ $topics = $subjectData->topics;
|
|||||||
<h4>Verwandte Themen:</h4>
|
<h4>Verwandte Themen:</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
foreach ($topicData->relatedTopics as $relatedTopic) {
|
foreach ($topicData->relatedTopics as $relatedTopicName) {
|
||||||
|
$relatedTopic = $subjectData->topics[$relatedTopicName];
|
||||||
|
if(!isset($relatedTopicName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<li><?php echo($relatedTopic); ?></li>
|
<li><?php echo($relatedTopic->displayName); ?></li>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -373,11 +373,16 @@ if(!isset($topicData)) {
|
|||||||
<h3>Verwandte Themen</h3>
|
<h3>Verwandte Themen</h3>
|
||||||
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
|
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
|
||||||
<?php
|
<?php
|
||||||
foreach ($topicData->relatedTopics as $relatedTopic) {
|
foreach ($topicData->relatedTopics as $relatedTopicName) {
|
||||||
|
$relatedTopic = $subjectData->topics[$relatedTopicName];
|
||||||
|
if(!isset($relatedTopic)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<a href='<?php echo("topic.php?subject=$subjectData->id&topic=$relatedTopic") ?>'>
|
<a href='<?php echo("topic.php?subject=$subjectData->id&topic=$relatedTopic->id") ?>'>
|
||||||
<span class="topic-tag"><?php echo($relatedTopic); ?></span>
|
<span class="topic-tag"><?php echo($relatedTopic->displayName); ?></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Reference in New Issue
Block a user