Skip to content
Snippets Groups Projects
Commit fb2c0379 authored by Tim Steiner's avatar Tim Steiner
Browse files

Comment section looks better now.

parent c7dd13df
No related branches found
No related tags found
No related merge requests found
......@@ -98,13 +98,21 @@
<div class="tabContent" id="commentsContent">
<?php foreach ($this->comments as $comment) {
<table class="comments">
<tr>
<th class="who">Who</th>
<th class="when">When</th>
<th class="what">What</th>
</tr>
<?php foreach ($this->comments as $key => $comment) {
if ($comment->visibility == 'global') { ?>
<div class="comment">
<h3>Text:</h3>
<div><?php echo $comment->comment; ?></div>
</div>
<tr class="<?php echo ($key % 2) ? 'evenRow' : 'oddRow'; ?>">
<td class="who"><?php echo $comment->user->userName; ?></td>
<td class="when"><?php echo $comment->postTime; ?></td>
<td class="what"><?php echo $comment->comment; ?></td>
</tr>
<?php }} ?>
</table>
<form method="post" action="/Request/AddComment/<?php echo $this->request->getPrimaryKey(); ?>">
<div>
......@@ -117,13 +125,21 @@
<div class="tabContent" id="editorCommentsContent">
<?php foreach ($this->comments as $comment) {
<table class="comments">
<tr>
<th class="who">Who</th>
<th class="when">When</th>
<th class="what">What</th>
</tr>
<?php foreach ($this->comments as $key => $comment) {
if ($comment->visibility == 'editorial') { ?>
<div class="comment">
<h3>Text:</h3>
<div><?php echo $comment->comment; ?></div>
</div>
<tr class="<?php echo ($key % 2) ? 'evenRow' : 'oddRow'; ?>">
<td class="who"><?php echo $comment->user->userName; ?></td>
<td class="when"><?php echo $comment->postTime; ?></td>
<td class="what"><?php echo $comment->comment; ?></td>
</tr>
<?php }} ?>
</table>
<form method="post" action="/Request/AddComment/<?php echo $this->request->getPrimaryKey(); ?>">
<div>
......@@ -136,14 +152,22 @@
<div class="tabContent" id="privateCommentsContent">
<?php foreach ($this->comments as $comment) {
<table class="comments">
<tr>
<th class="who">Who</th>
<th class="when">When</th>
<th class="what">What</th>
</tr>
<?php foreach ($this->comments as $key => $comment) {
if ($comment->visibility == 'self' &&
$comment->user->getPrimaryKey() == Nmc_User::getInstance()->getUser()->getPrimaryKey()) { ?>
<div class="comment">
<h3>Text:</h3>
<div><?php echo $comment->comment; ?></div>
</div>
<tr class="<?php echo ($key % 2) ? 'evenRow' : 'oddRow'; ?>">
<td class="who"><?php echo $comment->user->userName; ?></td>
<td class="when"><?php echo $comment->postTime; ?></td>
<td class="what"><?php echo $comment->comment; ?></td>
</tr>
<?php }} ?>
</table>
<form method="post" action="/Request/AddComment/<?php echo $this->request->getPrimaryKey(); ?>">
<div>
......
......@@ -84,11 +84,41 @@ div#comments {
border: 1px solid #888;
textarea {
width: 95%;
width: 682px;
height: 3em;
}
}
table.comments {
width: 100%;
th {
text-align: left;
}
td {
padding: 2px;
}
.who,
.when {
white-space: nowrap;
}
.what {
width: 500px;
}
tr.evenRow {
background-color: #eee;
}
tr.oddRow {
background-color: #ccc;
}
}
#editorCommentsContent,
#privateCommentsContent {
display: none;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment