[prev] [thread] [next] [lurker] [Date index for 2003/11/29]
Author: gabor
Date: 2003-11-29 11:03:50 +0200 (Sat, 29 Nov 2003)
New Revision: 90
Modified:
lib/YAPC/Organizer.pm
templates/user_account.tmpl
Log:
add admin links to my YAPC page for logged in admins. Eliminate the need of a separate admin.html page
Modified: lib/YAPC/Organizer.pm
===================================================================
--- lib/YAPC/Organizer.pm 2003-11-29 01:11:36 UTC (rev 89)
+++ lib/YAPC/Organizer.pm 2003-11-29 09:03:50 UTC (rev 90)
@@ -114,6 +114,14 @@
sub user_account {
my $self = shift;
my $t = $self->_server_page('user_account');
+
+
+ my $id = $self->is_logged_in();
+ my $admin = $self->is_admin_user($id);
+ if ($admin) {
+ $t->param(ADMIN => 1);
+ }
+
return $t->output;
}
Modified: templates/user_account.tmpl
===================================================================
--- templates/user_account.tmpl 2003-11-29 01:11:36 UTC (rev 89)
+++ templates/user_account.tmpl 2003-11-29 09:03:50 UTC (rev 90)
@@ -7,6 +7,13 @@
<a href="./personal_info.html">Change personal information</a><br />
<a href="./list_my_proposals.html">List my proposals</a><br />
<a href="./logout.html">Logout</a><br />
+
+<TMPL_IF NAME="admin">
+<p>
+Administrative interface:<br />
+<a href="./admin_list_people.html">List people</a><br />
+<a href="./admin_list_proposals.html">List proposals</a><br />
+</TMPL_IF>
</p>
<TMPL_INCLUDE NAME="footer.tmpl">
Generated at 11:30 on 29 Nov 2003 by mariachi 0.51