[prev] [thread] [next] [lurker] [Date index for 2003/12/3]
Author: gabor
Date: 2003-12-03 02:11:57 +0200 (Wed, 03 Dec 2003)
New Revision: 105
Added:
yapcom/trunk/templates/talk.tmpl
Modified:
yapcom/trunk/README
yapcom/trunk/lib/YAPC/Organizer.pm
yapcom/trunk/templates/admin_list_proposals.tmpl
yapcom/trunk/templates/list_my_proposals.tmpl
Log:
improve the interface for the administrators
Modified: yapcom/trunk/README
===================================================================
--- yapcom/trunk/README 2003-12-02 22:43:49 UTC (rev 104)
+++ yapcom/trunk/README 2003-12-03 00:11:57 UTC (rev 105)
@@ -55,7 +55,7 @@
CHANGES
---------
-0.09_01 2003.11.
+0.10 2003.12.03
- show more information about the registered people
- After anadministrator logs in s/he gets back a regular MyYAPC page without the extra
link. Only after pressing the 'Personal Inoramtion' link (login.html) do these links
@@ -63,6 +63,7 @@
- In I think related issue, if regular user tries to access the proposal.html page
then she gets login. One se logs in she gets a Timeline error even though the URL
in the navigation bar seem to be correct.
+ - Improve the interface of the administrators: Show all the proposals
Modified: yapcom/trunk/lib/YAPC/Organizer.pm
===================================================================
--- yapcom/trunk/lib/YAPC/Organizer.pm 2003-12-02 22:43:49 UTC (rev 104)
+++ yapcom/trunk/lib/YAPC/Organizer.pm 2003-12-03 00:11:57 UTC (rev 105)
@@ -1,6 +1,6 @@
package YAPC::Organizer;
-our $VERSION = '0.09_01';
+our $VERSION = '0.10';
use strict;
use warnings;
@@ -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);
+ person talk);
my @run_modes = map {$_, $_} @user_pages, @admin_pages, @other_pages;
@@ -333,12 +333,12 @@
sub list_people {
my $self = shift;
- my $id = $self->is_logged_in;
- my $admin = $self->is_admin_user($id);
-
my $ar = [];
my @people;
+ my $id = $self->is_logged_in;
+ my $admin = $self->is_admin_user($id);
+
if ($admin) {
@people = YAPC::Person->retrieve_all;
}
@@ -374,13 +374,11 @@
foreach my $p (YAPC::Talk->retrieve_all) {
push @$ar,
{
- abstract => htmlize($p->abstract),
- other => htmlize($p->other),
title => $p->title,
- length => $p->length,
fname => $p->user_id->fname,
lname => $p->user_id->lname,
id => $p->user_id->id,
+ talk_id => $p->id,
};
}
@@ -389,6 +387,44 @@
return $t->output;
}
+=head2 talk
+
+Displays the details of a talk
+If the talk was not accepted (yet) it can be seen only by administrator or by owner
+If the talk was accepted anyone can see it.
+
+
+=cut
+sub talk {
+ my $self = shift;
+ my $q = $self->query;
+
+ my $id = $self->is_logged_in;
+ my $admin = $self->is_admin_user($id);
+
+ my $talk_id = $q->param("id");
+ my ($talk) = YAPC::Talk->search(id => $talk_id);
+ if ($talk) {
+ if ($talk->accepted or $admin or ($id and $talk->user_id eq $id)) {
+ # anyone can see accepted talk
+ my $t = $self->_server_page('talk');
+ $t->param(abstract => htmlize($talk->abstract));
+ $t->param(other => htmlize($talk->other));
+ $t->param(title => $talk->title);
+ $t->param(length => $talk->length);
+ $t->param(language => $talk->language);
+ $t->param(fname => $talk->user_id->fname);
+ $t->param(lname => $talk->user_id->lname);
+ $t->param(id => $talk->user_id->id);
+ return $t->output;
+ }
+ }
+
+ #$self->param('yapcom_message' => 'no_such_talk');
+ $self->param('yapcom_message' => 'admins_only');
+ $self->show_message;
+}
+
sub login {
my $self = shift;
my $q = $self->query;
Modified: yapcom/trunk/templates/admin_list_proposals.tmpl
===================================================================
--- yapcom/trunk/templates/admin_list_proposals.tmpl 2003-12-02 22:43:49 UTC (rev 104)
+++ yapcom/trunk/templates/admin_list_proposals.tmpl 2003-12-03 00:11:57 UTC (rev 105)
@@ -4,12 +4,8 @@
<table>
<TMPL_LOOP NAME="talks">
<tr><td><hr></td></tr>
-<tr><td>Title: <b><TMPL_VAR NAME="title"></b></td></tr>
-<tr><td>Person: <a href="person.html?id=<TMPL_VAR NAME="id">"><TMPL_VAR NAME="fname"> <TMPL_VAR NAME="lname"></a></td></tr>
-<tr><td>Length: <TMPL_VAR NAME="length"></td></tr>
-<tr><td>Language: <TMPL_VAR NAME="language"></td></tr>
-<tr><td>Abstract:<p><pre><TMPL_VAR NAME="abstract"></pre></td></tr>
-<tr><td>Comment:<p><pre><TMPL_VAR NAME="other"></pre></td></tr>
+<tr><td><b><a href="talk.html?id=<TMPL_VAR NAME="talk_id">"><TMPL_VAR NAME="title"></a></b></pre></td></tr>
+<tr><td>by: <a href="person.html?id=<TMPL_VAR NAME="id">"><TMPL_VAR NAME="fname"> <TMPL_VAR NAME="lname"></a></td></tr>
</TMPL_LOOP>
</table>
</p>
Modified: yapcom/trunk/templates/list_my_proposals.tmpl
===================================================================
--- yapcom/trunk/templates/list_my_proposals.tmpl 2003-12-02 22:43:49 UTC (rev 104)
+++ yapcom/trunk/templates/list_my_proposals.tmpl 2003-12-03 00:11:57 UTC (rev 105)
@@ -6,7 +6,7 @@
<p>
<table>
<TMPL_LOOP NAME="talks">
- <tr><td><a href="./edit_my_proposal.html?id=<TMPL_VAR NAME="id">"><TMPL_VAR NAME="title"></a></td></tr>
+ <tr><td><a href="./edit_my_proposal.html?id=<TMPL_VAR NAME="id">"><TMPL_VAR NAME="title"></a></td><td><a href="./talk.html?id=<TMPL_VAR NAME="id">">view</a></td></tr>
</TMPL_LOOP>
</table>
</form>
Added: yapcom/trunk/templates/talk.tmpl
===================================================================
--- yapcom/trunk/templates/talk.tmpl 2003-12-02 22:43:49 UTC (rev 104)
+++ yapcom/trunk/templates/talk.tmpl 2003-12-03 00:11:57 UTC (rev 105)
@@ -0,0 +1,26 @@
+<TMPL_VALUE NAME="title" VALUE="Talk abstract">
+<TMPL_INCLUDE NAME="header.tmpl">
+<p>
+<table>
+<tr><td>Title: <b><TMPL_VAR NAME="title"></b></td></tr>
+<tr><td>Person: <a href="person.html?id=<TMPL_VAR NAME="id">"><TMPL_VAR NAME="fname"> <TMPL_VAR NAME="lname"></a></td></tr>
+<tr><td>Length: <TMPL_VAR NAME="length"></td></tr>
+<tr><td>Language: <TMPL_VAR NAME="language"></td></tr>
+<tr><td>Abstract:<br>
+ <table border=1>
+ <tr><td>
+ <pre><TMPL_VAR NAME="abstract"></pre>
+ </td></tr>
+ </table>
+</td></tr>
+<tr><td>Comment:<br>
+ <table border=1>
+ <tr><td>
+ <pre><TMPL_VAR NAME="other"></pre>
+ </td></tr>
+ </table>
+</td></tr>
+</table>
+</p>
+<TMPL_INCLUDE NAME="footer.tmpl">
+
Generated at 02:20 on 03 Dec 2003 by mariachi 0.51