Kommentare im Profil anzeigen
This commit is contained in:
+36
-3
@@ -93,7 +93,7 @@ $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
|
||||
<div class="container">
|
||||
|
||||
<?php include_once "includes/alertMessages.php"?>
|
||||
<?php include_once "includes/alertMessages.php" ?>
|
||||
|
||||
<h2 class="section-title">Meine Beiträge</h2>
|
||||
|
||||
@@ -157,7 +157,9 @@ $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
</a>
|
||||
|
||||
<form action="php/controller/deleteArticle-controller.php" method="POST">
|
||||
<input type="hidden" name="id" value="<?php echo htmlspecialchars($userArticle->getID()); ?>">
|
||||
<input type="hidden"
|
||||
name="id"
|
||||
value="<?php echo htmlspecialchars($userArticle->getID()); ?>">
|
||||
|
||||
<button type="submit"
|
||||
class="button"
|
||||
@@ -165,7 +167,6 @@ $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -180,9 +181,41 @@ $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
</button>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<h2 class="section-title">Meine Kommentare</h2>
|
||||
|
||||
<div class="articles-list">
|
||||
<?php if (isset($userComments) && count($userComments) > 0): ?>
|
||||
|
||||
<?php foreach ($userComments as $comment): ?>
|
||||
<div class="article-item">
|
||||
<div class="article-meta">
|
||||
<span class="article-date">
|
||||
<?php echo htmlspecialchars($comment->getCreated()); ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<?php echo nl2br(htmlspecialchars($comment->getContent())); ?>
|
||||
</p>
|
||||
|
||||
<a href="index.php?pfad=showArticle&id=<?php echo htmlspecialchars($comment->getArticleId()); ?>"
|
||||
class="edit-link-button">
|
||||
Zum Beitrag
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<p>Du hast noch keine Kommentare geschrieben.</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php unset($_SESSION["message"]); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user