diff --git a/application/views/request/view.xhtml b/application/views/request/view.xhtml index 9f9e2c8ab74fcca5d37392a07aa62597df6a3acd..958d5c507139a752ff34e4fc5458ab99bd5f58d8 100644 --- a/application/views/request/view.xhtml +++ b/application/views/request/view.xhtml @@ -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> diff --git a/document_root/css/request/view.oss b/document_root/css/request/view.oss index 759e81f574af16a1a85369cce5b2a957790ea1ae..4084cd43aa15d01203140257aa4b62fbfde1dc90 100644 --- a/document_root/css/request/view.oss +++ b/document_root/css/request/view.oss @@ -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;