[Yapcom-commit] rev 245 - in yapcom/trunk: lib/YAPC templates
svn at pti.co.il
svn at pti.co.il
Fri Dec 23 12:35:55 IST 2005
Author: gabor
Date: 2005-12-23 12:35:53 +0200 (Fri, 23 Dec 2005)
New Revision: 245
Modified:
yapcom/trunk/lib/YAPC/Organizer.pm
yapcom/trunk/lib/YAPC/Person.pm
yapcom/trunk/templates/speakers.tmpl
Log:
add listing of all the speakers
Modified: yapcom/trunk/lib/YAPC/Organizer.pm
===================================================================
--- yapcom/trunk/lib/YAPC/Organizer.pm 2005-12-23 10:02:55 UTC (rev 244)
+++ yapcom/trunk/lib/YAPC/Organizer.pm 2005-12-23 10:35:53 UTC (rev 245)
@@ -28,7 +28,7 @@
# other pages that can be directly access but which don't need any authentication
my @other_pages = qw(list_people login registration validation lost_validation lost_password
- person talk presentations missing_configuration);
+ person talk presentations missing_configuration speakers);
my @run_modes = (@user_pages, @admin_pages, @other_pages);
@@ -356,6 +356,30 @@
return $t->output;
}
+sub speakers {
+ my $self = shift;
+ my $list = YAPC::Person->search_speakers;
+
+ my @speakers;
+ while (my $p = $list->next) {
+ my %speaker =
+ (
+ fname => $p->fname,
+ lname => $p->lname,
+ id => $p->id,
+ );
+ push @speakers, \%speaker;
+
+ }
+
+ my $t = $self->_server_page('speakers');
+ #$t->param(admin => $admin);
+ $t->param(speakers => \@speakers);
+ return $t->output;
+}
+
+
+
sub presentations {
my $self = shift;
my $list = YAPC::Talk->retrieve_accepted;
Modified: yapcom/trunk/lib/YAPC/Person.pm
===================================================================
--- yapcom/trunk/lib/YAPC/Person.pm 2005-12-23 10:02:55 UTC (rev 244)
+++ yapcom/trunk/lib/YAPC/Person.pm 2005-12-23 10:35:53 UTC (rev 245)
@@ -9,6 +9,10 @@
__PACKAGE__->set_sql(total => qq{SELECT COUNT(*) total FROM people});
__PACKAGE__->set_sql(validated => qq{SELECT COUNT(*) validated FROM people WHERE acked=1});
__PACKAGE__->set_sql(hidden => qq{SELECT COUNT(*) hidden FROM people WHERE hide=1});
+__PACKAGE__->set_sql(speakers => qq{SELECT DISTINCT people.id id, fname, lname FROM people, talks
+ WHERE talks.accepted='on' and talks.user_id = people.id
+ ORDER BY fname
+ });
sub new {
my $self = shift;
Modified: yapcom/trunk/templates/speakers.tmpl
===================================================================
--- yapcom/trunk/templates/speakers.tmpl 2005-12-23 10:02:55 UTC (rev 244)
+++ yapcom/trunk/templates/speakers.tmpl 2005-12-23 10:35:53 UTC (rev 245)
@@ -1,12 +1,25 @@
<TMPL_VALUE NAME="title" VALUE="Speakers">
<TMPL_INCLUDE NAME="header.tmpl">
-<p>
-This page will list details about the speakers.
-</p>
-<p>
-If you would like to <a href="presentations.html">give a presentation</a> you are welcome
-to follow the instructions on how to submit a proposal.
-</p>
+<TMPL_IF speakers>
+ <ul>
+ <TMPL_LOOP speakers>
+ <li><a href="person.html?id=<TMPL_VAR id>"><TMPL_VAR fname> <TMPL_VAR lname></a>
+ <TMPL_LOOP talks>
+ <a href="<TMPL_VAR id>"><TMPL_VAR title></a><br />
+ </TMPL_LOOP>
+ </li>
+ </TMPL_LOOP>
+ </ul>
+<TMPL_ELSE>
+ <p>
+ This page will list details about the speakers.
+ </p>
+ <p>
+ If you would like to <a href="presentations.html">give a presentation</a> you are welcome
+ to follow the instructions on how to submit a proposal.
+ </p>
+</TMPL_IF>
+
<TMPL_INCLUDE NAME="footer.tmpl">
More information about the Yapcom-commit
mailing list