[Yapcom checkin] rev 65 - / lib/YAPC t/lib/YAPC/Test templates

[prev] [thread] [next] [lurker] [Date index for 2003/11/26]

From: svn
Subject: [Yapcom checkin] rev 65 - / lib/YAPC t/lib/YAPC/Test templates
Date: 16:42 on 26 Nov 2003
Author: gabor
Date: 2003-11-26 16:42:51 +0200 (Wed, 26 Nov 2003)
New Revision: 65

Modified:
   README
   lib/YAPC/Organizer.pm
   t/lib/YAPC/Test/Data.pm
   templates/navigation.tmpl
   templates/user_account.tmpl
Log:
user can list the titles of his own talks

Modified: README
===================================================================
--- README	2003-11-26 14:22:37 UTC (rev 64)
+++ README	2003-11-26 14:42:51 UTC (rev 65)
@@ -54,7 +54,7 @@
 CHANGES
 ---------
 0.08_01  2003.11.
-    - logged in users can change their personal information
+    - form (for logged in user) to change the personal information registerd 
 
 
 0.08  2003.11.25
@@ -172,9 +172,6 @@
 
 
 Urgent
-    - form (for logged in user) to change the personal information registerd 
-      for now cannot change e-mail address as for that we'll need a separate field
-      in the database to save the new e-mail till validated.
     - form (for logged in user) to list all of his/her proposals, delete them or change them.
 
     - test and fix case when non-existing runmode was supplied
@@ -193,7 +190,6 @@
     - improve error messages on the web site
     - give error message on validation form if something went wrong
 
-
 Intermediate (needs database change)
 
     - on the list_people page show stat of how many people have paid already.
@@ -216,7 +212,12 @@
       question, where to put the image files and the css files as the simple
       template version will not have any.
      
+    - user should be able to delete his account ?? I am not sure
 
+    - user should be able to change e-mail address but the new 
+      e-mail address should be unique and should be validate before it takes effect.
+      
+
     - indicate on the navigation bar who is logged in
 
     - change the directory tree after the installation so the data files, cgi scripts 

Modified: lib/YAPC/Organizer.pm
===================================================================
--- lib/YAPC/Organizer.pm	2003-11-26 14:22:37 UTC (rev 64)
+++ lib/YAPC/Organizer.pm	2003-11-26 14:42:51 UTC (rev 65)
@@ -18,7 +18,7 @@
 use base 'CGI::Application';
 use Data::Dumper;  # for playing with debugging
 
-my @user_pages = qw(proposal personal_info change_password user_account logout);  # list pages that require valid login to access
+my @user_pages = qw(proposal personal_info change_password user_account logout list_my_proposals);  # list pages that require valid login to access
 my @admin_pages = qw(admin admin_list_people admin_list_proposals); # list of pages accessible to administrators only
 my @other_pages = qw(list_people login registration validation lost_validation lost_password);
 
@@ -606,6 +606,26 @@
     }
 }
 
+sub list_my_proposals {
+   my $self = shift;
+
+   my $id = $self->is_logged_in;
+
+   my $ar = [];
+   foreach my $p (YAPC::Talk->search(user_id => $id)) {
+     push @$ar, 
+        {
+           title  => $p->title,
+           id     => $p->id,
+        };
+    }
+
+    my $t = $self->_server_page('list_my_proposals');
+    $t->param(TALKS => $ar);
+    return $t->output;
+}
+
+
 1;
 
 

Modified: t/lib/YAPC/Test/Data.pm
===================================================================
--- t/lib/YAPC/Test/Data.pm	2003-11-26 14:22:37 UTC (rev 64)
+++ t/lib/YAPC/Test/Data.pm	2003-11-26 14:42:51 UTC (rev 65)
@@ -4,7 +4,7 @@
 require Exporter;
 our @ISA = qw(Exporter);
 
-our @EXPORT = qw(@people);
+our @EXPORT = qw(@people @talks);
 
 
 our @people = (
@@ -150,9 +150,5 @@
 }
 
 
-
-
 1;
 
-
-

Modified: templates/navigation.tmpl
===================================================================
--- templates/navigation.tmpl	2003-11-26 14:22:37 UTC (rev 64)
+++ templates/navigation.tmpl	2003-11-26 14:42:51 UTC (rev 65)
@@ -5,7 +5,7 @@
          Participants<br />
          <TMPL_IF NAME="registration"> &nbsp; <b>Registration</b><TMPL_ELSE> &nbsp; <a href="registration.html">Registration</a></TMPL_IF><br />
          <TMPL_IF NAME="list_people"> &nbsp; <b>List participants</b><TMPL_ELSE> &nbsp; <a href="list_people.html">List participants</a></TMPL_IF><br />
-         <TMPL_IF NAME="login"> &nbsp; <b>Login</b><TMPL_ELSE> &nbsp; <a href="login.html">Login</a></TMPL_IF><br />
+         <TMPL_IF NAME="login"> &nbsp; <b>Personal information</b><TMPL_ELSE> &nbsp; <a href="login.html">Personal information</a></TMPL_IF><br />
          Call for Participation<br />
          <TMPL_IF NAME="cfpenglish"> &nbsp; <b>English</b><TMPL_ELSE> &nbsp; <a href="html/announcement.html">English</a></TMPL_IF><br />
          <TMPL_IF NAME="cfphebrew"> &nbsp; <b>Hebrew</b><TMPL_ELSE> &nbsp; <a href="html/announcement-il.html">Hebrew</a></TMPL_IF><br />

Modified: templates/user_account.tmpl
===================================================================
--- templates/user_account.tmpl	2003-11-26 14:22:37 UTC (rev 64)
+++ templates/user_account.tmpl	2003-11-26 14:42:51 UTC (rev 65)
@@ -7,6 +7,7 @@
 <a href=proposal.html>Submit a proposal</a><br>
 <a href=change_password.html>Change password</a><br>
 <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>
 
          <br />&nbsp;<br /><br />&nbsp;<br /><br />&nbsp;<br /><br />&nbsp;<br /><br />&nbsp;<br />

Generated at 17:06 on 26 Nov 2003 by mariachi 0.51