diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-10-13 12:24:43 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2017-09-04 11:16:53 -0700 |
commit | 326a23aded279dedc8a4e6de64618f0fbee17bac (patch) | |
tree | a3444296e388ac65709dfac25490828fc8f433f1 /htdocs/moderate | |
parent | 94f12b0a85feb8d8e6effb89021bf79a82174fce (diff) |
Changed the moderator schedule table to a view. Finished the exception iterator. Modified Post to only notify the next moderator. Need to add exception adding/removal.
Diffstat (limited to 'htdocs/moderate')
-rw-r--r-- | htdocs/moderate/admin.css | 5 | ||||
-rw-r--r-- | htdocs/moderate/schedule/index.php | 25 | ||||
-rw-r--r-- | htdocs/moderate/src/header.inc.php | 1 |
3 files changed, 23 insertions, 8 deletions
diff --git a/htdocs/moderate/admin.css b/htdocs/moderate/admin.css index 65a5a7f..fbc82a6 100644 --- a/htdocs/moderate/admin.css +++ b/htdocs/moderate/admin.css @@ -50,6 +50,11 @@ h1 { width: 5em; } +.userrow .remove { + width: 5em; + margin-left: 2em; +} + input[type=text] { width: 20em; } diff --git a/htdocs/moderate/schedule/index.php b/htdocs/moderate/schedule/index.php index 9015350..f179c23 100644 --- a/htdocs/moderate/schedule/index.php +++ b/htdocs/moderate/schedule/index.php @@ -40,7 +40,7 @@ for ($i = 0; $i < $ui->getNumberOfModerators(); $i++, $ui->next()) { } echo "<h3>Exceptions</h3>"; -echo "<p><a href=\"exception.php\">New Exception</a></p>"; +echo "<p class=\"nomargin\"><a href=\"editor.php\">New Exception</a></p>"; // List out exceptions in order. $exceptions = new ModerationExceptions(); @@ -48,20 +48,29 @@ $exceptions->query(); echo "<div class=\"userrow header\">" . "<span class=\"name\">Name</span>" - . " <span class=\"email\">Email</span>" - . " <span class=\"admin\">Exception Week</span>" + . "<span class=\"name\">Substitute</span>" + . " <span class=\"admin\">Week</span>" . " </div>"; while ($exceptions->valid()) { - $user = $exceptions->current(); + $user = $exceptions->getUser(); + $substitute = $exceptions->getSubstitute(); + + $remove = ""; + + if ($_SESSION['currentUser']->getId() == $user->getId()) { + $remove = "<a href=\"remove.php?uid=" . $user->getId() ."&time=". $exceptions->key() ."\">remove</a>"; + } printf("<div class=\"userrow\">" . "<span class=\"name\">%s</span>" - . " <span class=\"email\"><a href=\"mailto:%s\">%s</a></span>" - . " <span class=\"admin\">%s</span></div>", + . "<span class=\"name\">%s</span>" + . " <span class=\"admin\">%s</span>" + . " <span class=\"remove\">%s</span></div>", $user->getName(), - $user->getEmail(), $user->getEmail(), - date('F j', $exceptions->key()) + $substitute->getName(), + date('F j', $exceptions->key()), + $remove ); diff --git a/htdocs/moderate/src/header.inc.php b/htdocs/moderate/src/header.inc.php index f0abbe1..6b7f135 100644 --- a/htdocs/moderate/src/header.inc.php +++ b/htdocs/moderate/src/header.inc.php @@ -53,6 +53,7 @@ if (isset($_GET['logout'])) { <div id="modnav"> <ul> <li><a href="<?= buildUrl('moderate/') ?>">Moderate Posts</a></li> + <li><a href="<?= buildUrl('moderate/schedule/') ?>">Schedule</a></li> <?php // Admin Navigation |