mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
d2480e8b9d
commit
af8f60fe7f
3 changed files with 137 additions and 137 deletions
|
@ -154,17 +154,20 @@ if ($atype == "Trusted User" || $atype == "Developer") {
|
||||||
$qnext = "SELECT ID FROM TU_VoteInfo";
|
$qnext = "SELECT ID FROM TU_VoteInfo";
|
||||||
$nextresult = db_query($qnext, $dbh);
|
$nextresult = db_query($qnext, $dbh);
|
||||||
?>
|
?>
|
||||||
<div class="pgbox">
|
<div class="box">
|
||||||
<p><a href='addvote.php'><?php print __("Add Proposal") ?></a></p>
|
<p><a href="addvote.php"><?php print __("Add Proposal") ?></a></p>
|
||||||
|
|
||||||
<?php if (mysql_num_rows($result)) { $by = htmlentities($by, ENT_QUOTES); ?>
|
<?php if (mysql_num_rows($result)):
|
||||||
<?php if ($off != 0) { $back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?>
|
$by = htmlentities($by, ENT_QUOTES); ?>
|
||||||
<a href='tu.php?off=<?php print $back ?>&by=<?php print $by ?>'><?php print __("Back") ?></a>
|
<?php if ($off != 0):
|
||||||
<?php } ?>
|
$back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?>
|
||||||
<?php if (($off + $limit) < mysql_num_rows($nextresult)) { $forw = $off + $limit; ?>
|
<a href='tu.php?off=<?php print $back ?>&by=<?php print $by ?>'><?php print __("Back") ?></a>
|
||||||
<a href='tu.php?off=<?php print $forw ?>&by=<?php print $by ?>'><?php print __("Next") ?></a>
|
<?php endif; ?>
|
||||||
<?php } ?>
|
<?php if (($off + $limit) < mysql_num_rows($nextresult)):
|
||||||
<?php } ?>
|
$forw = $off + $limit; ?>
|
||||||
|
<a href="tu.php?off=<?php print $forw ?>&by=<?php print $by ?>"><?php print __("Next") ?></a>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,76 +1,75 @@
|
||||||
<div class="pgbox">
|
<div class="box">
|
||||||
<h2><?php print __("Proposal Details") ?></h2>
|
<h2><?php print __("Proposal Details") ?></h2>
|
||||||
<div class="pgboxbody">
|
|
||||||
<?php
|
|
||||||
if ($isrunning == 1) { ?>
|
|
||||||
<p style='font-weight: bold; color: red'>
|
|
||||||
<?php print __("This vote is still running.") ?>
|
|
||||||
</p>
|
|
||||||
<?php
|
|
||||||
} ?>
|
|
||||||
|
|
||||||
<p>
|
<?php if ($isrunning == 1): ?>
|
||||||
<?php echo __('User') ?>: <b>
|
<p style="font-weight: bold; color: red">
|
||||||
<?php if (!empty($row['User'])) { ?>
|
<?php print __("This vote is still running.") ?>
|
||||||
<a href='packages.php?K=<?php print $row['User'] ?>&SeB=m'><?php print $row['User'] ?></a>
|
</p>
|
||||||
<?php } else { ?>
|
<?php endif; ?>
|
||||||
N/A
|
|
||||||
<?php } ?>
|
|
||||||
</b><br />
|
|
||||||
<?php print __("Submitted: %s by %s", "<b>" . gmdate("Y-m-d H:i", $row['Submitted']) . "</b>", "<b>" . username_from_id($row['SubmitterID']) . "</b>") ?><br />
|
|
||||||
<?php print __('End') ?>: <b><?php print gmdate("Y-m-d H:i", $row['End']) ?></b></p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<?php print str_replace("\n", "<br />\n", htmlspecialchars($row['Agenda'])) ?>
|
<?php echo __("User") ?>:
|
||||||
</p>
|
<b>
|
||||||
|
<?php if (!empty($row['User'])): ?>
|
||||||
|
<a href="packages.php?K=<?php print $row['User'] ?>&SeB=m"><?php print $row['User'] ?></a>
|
||||||
|
<?php else: ?>
|
||||||
|
N/A
|
||||||
|
<?php endif; ?>
|
||||||
|
</b>
|
||||||
|
<br />
|
||||||
|
<?php print __("Submitted: %s by %s", "<b>" . gmdate("Y-m-d H:i", $row['Submitted']) . "</b>", "<b>" . username_from_id($row['SubmitterID']) . "</b>") ?>
|
||||||
|
<br />
|
||||||
|
<?php print __("End") ?>:
|
||||||
|
<b><?php print gmdate("Y-m-d H:i", $row['End']) ?></b>
|
||||||
|
</p>
|
||||||
|
|
||||||
<table class="boxSoft">
|
<p>
|
||||||
<tr>
|
<?php print str_replace("\n", "<br />\n", htmlspecialchars($row['Agenda'])) ?>
|
||||||
<th class='boxSoftTitle'><span class='f2'><?php print __("Yes") ?></span></th>
|
</p>
|
||||||
<th class='boxSoftTitle'><span class='f2'><?php print __("No") ?></span></th>
|
|
||||||
<th class='boxSoftTitle'><span class='f2'><?php print __("Abstain") ?></span></th>
|
|
||||||
<th class='boxSoftTitle'><span class='f2'><?php print __("Total") ?></span></th>
|
|
||||||
<th class='boxSoftTitle'><span class='f2'><?php print __('Voted') ?></span></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class='data1'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td>
|
|
||||||
<td class='data1'><span class='f5'><span class='blue'><?php print $row['No'] ?></span></span></td>
|
|
||||||
<td class='data1'><span class='f5'><span class='blue'><?php print $row['Abstain'] ?></span></span></td>
|
|
||||||
<td class='data1'><span class='f5'><span class='blue'><?php print ($row['Yes'] + $row['No'] + $row['Abstain']) ?></span></span></td>
|
|
||||||
<td class='data1'><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>
|
|
||||||
</table>
|
|
||||||
</div></div>
|
|
||||||
|
|
||||||
<?php
|
<table>
|
||||||
if (!$isrunning) { ?>
|
<tr>
|
||||||
<div class="pgbox">
|
<th><?php print __("Yes") ?></th>
|
||||||
<h2><?php echo __('Voters'); ?></h2>
|
<th><?php print __("No") ?></th>
|
||||||
<div class="pgboxbody">
|
<th><?php print __("Abstain") ?></th>
|
||||||
<?php echo $whovoted; ?>
|
<th><?php print __("Total") ?></th>
|
||||||
</div>
|
<th><?php print __('Voted') ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php print $row['Yes'] ?></td>
|
||||||
|
<td><?php print $row['No'] ?></td>
|
||||||
|
<td><?php print $row['Abstain'] ?></td>
|
||||||
|
<td><?php print ($row['Yes'] + $row['No'] + $row['Abstain']) ?></td>
|
||||||
|
<td>
|
||||||
|
<?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 endif; ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
|
||||||
} ?>
|
|
||||||
|
|
||||||
<div class='pgbox'>
|
<?php if (!$isrunning): ?>
|
||||||
<div class='pgboxbody'>
|
<div class="box">
|
||||||
<?php if ($canvote == 1) { ?>
|
<h2><?php echo __("Voters"); ?></h2>
|
||||||
<form action='tu.php?id=<?php print $row['ID'] ?>' method='post'>
|
<?php echo $whovoted; ?>
|
||||||
<fieldset>
|
</div>
|
||||||
<input type='submit' class='button' name='voteYes' value='<?php print __("Yes") ?>' />
|
<?php endif; ?>
|
||||||
<input type='submit' class='button' name='voteNo' value='<?php print __("No") ?>' />
|
|
||||||
<input type='submit' class='button' name='voteAbstain' value='<?php print __("Abstain") ?>' />
|
<div class="box">
|
||||||
<input type='hidden' name='doVote' value='1' />
|
|
||||||
</fieldset>
|
<?php if ($canvote == 1): ?>
|
||||||
</form>
|
<form action="tu.php?id=<?php print $row['ID'] ?>" method="post">
|
||||||
<?php } else { ?>
|
<fieldset>
|
||||||
<?php print $errorvote ?>
|
<input type="submit" class="button" name="voteYes" value="<?php print __("Yes") ?>" />
|
||||||
<?php } ?>
|
<input type="submit" class="button" name="voteNo" value="<?php print __("No") ?>" />
|
||||||
</div></div>
|
<input type="submit" class="button" name="voteAbstain" value="<?php print __("Abstain") ?>" />
|
||||||
|
<input type="hidden" name="doVote" value="1" />
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<?php else:
|
||||||
|
print $errorvote ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,60 +1,58 @@
|
||||||
<div class="pgbox">
|
<div class="box">
|
||||||
<h2><?php print $type ?></h2>
|
<h2><?php print $type ?></h2>
|
||||||
<table class='results'>
|
<table class="results">
|
||||||
<tr>
|
<thead>
|
||||||
<th class='header'><span class='f2'><?php print __("Proposal") ?></span></th>
|
<tr>
|
||||||
<th class='header'><span class='f2'>
|
<th><?php print __("Proposal") ?></th>
|
||||||
<a href='?off=<?php print $off ?>&by=<?php print $by_next ?>'><?php print __("Start") ?></a>
|
<th><a href="?off=<?php print $off ?>&by=<?php print $by_next ?>"><?php print __("Start") ?></a></th>
|
||||||
</span></th>
|
<th><?php print __("End") ?></th>
|
||||||
<th class='header'><span class='f2'><?php print __("End") ?></span></th>
|
<th><?php print __("User") ?></th>
|
||||||
<th class='header'><span class='f2'><?php print __("User") ?></span></th>
|
<th><?php print __("Yes") ?></th>
|
||||||
<th class='header'><span class='f2'><?php print __("Yes") ?></span></th>
|
<th><?php print __("No") ?></th>
|
||||||
<th class='header'><span class='f2'><?php print __("No") ?></span></th>
|
<th><?php print __('Voted') ?></th>
|
||||||
<th class='header'><span class='f2'><?php print __('Voted') ?></span></th>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
<?php if (mysql_num_rows($result) == 0) { ?>
|
|
||||||
<tr><td align='center' colspan='0'><?php print __("No results found.") ?></td></tr>
|
<tbody>
|
||||||
<?php } else { for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { (($i % 2) == 0) ? $c = "data1" : $c = "data2"; ?>
|
<?php if (mysql_num_rows($result) == 0): ?>
|
||||||
<tr>
|
<tr><td align="center" colspan="0"><?php print __("No results found.") ?></td></tr>
|
||||||
<td class='<?php print $c ?>'><span class='f4'><span class='blue'>
|
<?php else: for ($i = 0; $row = mysql_fetch_assoc($result); $i++): (($i % 2) == 0) ? $c = 'odd' : $c = 'even'; ?>
|
||||||
<?php
|
<tr class="<?php print $c ?>">
|
||||||
$row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len));
|
<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>
|
||||||
<a href='tu.php?id=<?php print $row['ID'] ?>'><?php print $row["Agenda"] ?></a></span></span>
|
</td>
|
||||||
</td>
|
<td><?php print gmdate("Y-m-d", $row["Submitted"]) ?></td>
|
||||||
<td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("Y-m-d", $row["Submitted"]) ?></span></span></td>
|
<td><?php print gmdate("Y-m-d", $row["End"]) ?></td>
|
||||||
<td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("Y-m-d", $row["End"]) ?></span></span></td>
|
<td>
|
||||||
<td class='<?php print $c ?>'><span class='f6'><span class='blue'>
|
<?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
|
<?php
|
||||||
if (!empty($row['User'])) {
|
$q = "SELECT * FROM TU_Votes WHERE VoteID = " . $row['ID'] . " AND UserID = " . uid_from_sid($_COOKIE["AURSID"]);
|
||||||
print "<a href='packages.php?K=" . $row['User'] . "&SeB=m'>" . $row['User'] . "</a>";
|
$result_tulist = db_query($q, $dbh);
|
||||||
} else {
|
if ($result_tulist):
|
||||||
print "N/A";
|
$hasvoted = mysql_num_rows($result_tulist);
|
||||||
}
|
else:
|
||||||
?>
|
$hasvoted = 0;
|
||||||
</span></span></td>
|
endif;
|
||||||
<td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td>
|
if ($hasvoted == 0): ?>
|
||||||
<td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['No'] ?></span></span></td>
|
<span style="color: red; font-weight: bold"><?php print __("No") ?></span>
|
||||||
<td class='<?php print $c ?>'>
|
<?php else: ?>
|
||||||
<?php
|
<span style="color: green; font-weight: bold"><?php print __("Yes") ?></span>
|
||||||
$q = "SELECT * FROM TU_Votes WHERE VoteID = " . $row['ID'] . " AND UserID = " . uid_from_sid($_COOKIE["AURSID"]);
|
<?php endif; ?>
|
||||||
$result_tulist = db_query($q, $dbh);
|
</td>
|
||||||
if ($result_tulist) {
|
</tr>
|
||||||
$hasvoted = mysql_num_rows($result_tulist);
|
<?php
|
||||||
}
|
endfor;
|
||||||
else {
|
endif;
|
||||||
$hasvoted = 0;
|
?>
|
||||||
}
|
</tbody>
|
||||||
?>
|
</table>
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue