diff options
author | canyonknight <canyonknight@gmail.com> | 2012-05-23 13:49:43 -0400 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-07-06 11:26:26 +0200 |
commit | af8f60fe7fab642dff85658acc2b560cc0ed6f20 (patch) | |
tree | a08a8e2f2479dfa5f5dae94321d71a872586eb46 /web/template/tu_list.php | |
parent | d2480e8b9d3d0f946d57fa9422811cb37296b8b4 (diff) | |
download | aurweb-af8f60fe7fab642dff85658acc2b560cc0ed6f20.tar.xz |
Overhaul trusted user proposal page to match archweb
* Change all boxes and other CSS to match archweb
* General fixups in XHTML formatting
* Change results table to match color scheme everywhere else
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template/tu_list.php')
-rw-r--r-- | web/template/tu_list.php | 112 |
1 files changed, 55 insertions, 57 deletions
diff --git a/web/template/tu_list.php b/web/template/tu_list.php index 7eb6f32..d8acd71 100644 --- a/web/template/tu_list.php +++ b/web/template/tu_list.php @@ -1,60 +1,58 @@ -<div class="pgbox"> +<div class="box"> <h2><?php print $type ?></h2> - <table class='results'> - <tr> - <th class='header'><span class='f2'><?php print __("Proposal") ?></span></th> - <th class='header'><span class='f2'> - <a href='?off=<?php print $off ?>&by=<?php print $by_next ?>'><?php print __("Start") ?></a> - </span></th> - <th class='header'><span class='f2'><?php print __("End") ?></span></th> - <th class='header'><span class='f2'><?php print __("User") ?></span></th> - <th class='header'><span class='f2'><?php print __("Yes") ?></span></th> - <th class='header'><span class='f2'><?php print __("No") ?></span></th> - <th class='header'><span class='f2'><?php print __('Voted') ?></span></th> - </tr> - <?php if (mysql_num_rows($result) == 0) { ?> - <tr><td align='center' colspan='0'><?php print __("No results found.") ?></td></tr> - <?php } else { for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { (($i % 2) == 0) ? $c = "data1" : $c = "data2"; ?> - <tr> - <td class='<?php print $c ?>'><span class='f4'><span class='blue'> - <?php - $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); - ?> - <a href='tu.php?id=<?php print $row['ID'] ?>'><?php print $row["Agenda"] ?></a></span></span> - </td> - <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("Y-m-d", $row["Submitted"]) ?></span></span></td> - <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("Y-m-d", $row["End"]) ?></span></span></td> - <td class='<?php print $c ?>'><span class='f6'><span class='blue'> + <table class="results"> + <thead> + <tr> + <th><?php print __("Proposal") ?></th> + <th><a href="?off=<?php print $off ?>&by=<?php print $by_next ?>"><?php print __("Start") ?></a></th> + <th><?php print __("End") ?></th> + <th><?php print __("User") ?></th> + <th><?php print __("Yes") ?></th> + <th><?php print __("No") ?></th> + <th><?php print __('Voted') ?></th> + </tr> + </thead> + + <tbody> + <?php if (mysql_num_rows($result) == 0): ?> + <tr><td align="center" colspan="0"><?php print __("No results found.") ?></td></tr> + <?php else: for ($i = 0; $row = mysql_fetch_assoc($result); $i++): (($i % 2) == 0) ? $c = 'odd' : $c = 'even'; ?> + <tr class="<?php print $c ?>"> + <td><?php $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); ?> + <a href="tu.php?id=<?php print $row['ID'] ?>"><?php print $row["Agenda"] ?></a></span></span> + </td> + <td><?php print gmdate("Y-m-d", $row["Submitted"]) ?></td> + <td><?php print gmdate("Y-m-d", $row["End"]) ?></td> + <td> + <?php if (!empty($row['User'])): ?> + <a href="packages.php?K=<?php echo $row['User'] ?>&SeB=m"><?php echo $row['User'] ?></a> + <?php else: + print "N/A"; + endif; + ?> + </td> + <td><?php print $row['Yes'] ?></td> + <td><?php print $row['No'] ?></td> + <td> <?php - if (!empty($row['User'])) { - print "<a href='packages.php?K=" . $row['User'] . "&SeB=m'>" . $row['User'] . "</a>"; - } else { - print "N/A"; - } - ?> - </span></span></td> - <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td> - <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['No'] ?></span></span></td> - <td class='<?php print $c ?>'> - <?php - $q = "SELECT * FROM TU_Votes WHERE VoteID = " . $row['ID'] . " AND UserID = " . uid_from_sid($_COOKIE["AURSID"]); - $result_tulist = db_query($q, $dbh); - if ($result_tulist) { - $hasvoted = mysql_num_rows($result_tulist); - } - else { - $hasvoted = 0; - } - ?> - <span class='f5'><span class='blue'> - <?php if ($hasvoted == 0) { ?> - <span style='color: red; font-weight: bold'><?php print __("No") ?></span> - <?php } else { ?> - <span style='color: green; font-weight: bold'><?php print __("Yes") ?></span> - <?php } ?> - </span></span> - </td> - </tr> - <?php } } ?> - </table> + $q = "SELECT * FROM TU_Votes WHERE VoteID = " . $row['ID'] . " AND UserID = " . uid_from_sid($_COOKIE["AURSID"]); + $result_tulist = db_query($q, $dbh); + if ($result_tulist): + $hasvoted = mysql_num_rows($result_tulist); + else: + $hasvoted = 0; + endif; + if ($hasvoted == 0): ?> + <span style="color: red; font-weight: bold"><?php print __("No") ?></span> + <?php else: ?> + <span style="color: green; font-weight: bold"><?php print __("Yes") ?></span> + <?php endif; ?> + </td> + </tr> + <?php + endfor; + endif; + ?> + </tbody> + </table> </div> |