Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add a proceedings page.

git-svn-id: svn://svn.mongueurs.net/act/trunk@2274 67b57a05-4208-db11-a765-00306e02d86a
  • Loading branch information...
commit 3a4b0e96e21f9152164286b0e1ad69b6fa69e441 1 parent 8865478
@maddingue maddingue authored
View
1  lib/Act/Dispatcher.pm
@@ -26,6 +26,7 @@ my %public_handlers = (
login => 'Act::Handler::Login',
news => 'Act::Handler::News::List',
openid => 'Act::Handler::OpenID',
+ proceedings => 'Act::Handler::Talk::Proceedings',
register => 'Act::Handler::User::Register',
schedule => 'Act::Handler::Talk::Schedule',
search => 'Act::Handler::User::Search',
View
49 lib/Act/Handler/Talk/Proceedings.pm
@@ -0,0 +1,49 @@
+package Act::Handler::Talk::Proceedings;
+use strict;
+use Act::Config;
+use Act::Template::HTML;
+use Act::Talk;
+use Act::User;
+
+
+sub handler {
+ # retrieve talks and speaker info
+ my $talks = Act::Talk->get_talks( conf_id => $Request{conference} );
+ $_->{user} = Act::User->new( user_id => $_->user_id ) for @$talks;
+
+ # sort talks
+ $talks = [
+ sort {
+ $a->title cmp $b->title
+ }
+ grep {
+ $Config->talks_show_all
+ || $_->accepted
+ || ($Request{user} && ( $Request{user}->is_talks_admin
+ || $Request{user}->user_id == $_->user_id))
+ } @$talks
+ ];
+
+ # process the template
+ my $template = Act::Template::HTML->new;
+ $template->variables(
+ talks => $talks,
+ );
+
+ $template->process("talk/proceedings");
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Act::Handler::Talk::Proceedings - show proceedings
+
+=head1 DESCRIPTION
+
+Show proceedings: all talks in a big list, with the useful details.
+
+See F<DEVDOC> for a complete discussion on handlers.
+
+=cut
View
58 templates/talk/proceedings
@@ -0,0 +1,58 @@
+[% title = loc("Proceedings");
+ WRAPPER ui title = title %]
+[% INCLUDE js/mytalks.js %]
+
+[% IF global.request.user.is_talks_admin OR global.config.talks_show_schedule %]
+<div class="proceedings">
+ [% FOREACH t = talks %]
+ <dl class="talk">
+ <dd class="title">
+ [% IF global.request.user.has_registered %]
+ <input type="checkbox"
+ name="mt-[% t.talk_id %]"
+ value="[% t.talk_id %]"
+ [% IF global.request.user.is_my_talk(t.talk_id) %]
+ title="{{remove from personal schedule}}"
+ checked="checked"
+ [% ELSE %]
+ title="{{add to personal schedule}}"
+ [% END %]
+ />
+ [% END %]
+
+ [% talk_link(t) %]
+ </dd>
+
+ <dd class="speaker">
+ <a href="[% make_uri_info('user', t.user.user_id) %]"
+ class="name">[% user_info(t.user) %]</a>,
+ <span class="company">[% t.user.company %]</span>
+ </dd>
+
+ <dd class="info">
+ [% global.config.talks_languages.${t.lang || global.config.default_language} %],
+ [% IF t.lightning %]
+ {{lightning}}
+ [% ELSE %]
+ [% t.duration %] {{minutes}}
+ [% END %]
+ </dd>
+
+ [% IF t.url_talk %]
+ <dd class="link_slides">
+ {{talk (link)}}: <a href="[% t.url_talk %]">[% t.url_talk %]</a>
+ </dd>
+ [% END %]
+
+ <dd class="abstract">
+ <blockquote>
+ [% expand(chunked_abstract) | html_line_break %]
+ </blockquote>
+ </dd>
+
+ </dl>
+ [% END %]
+</div>
+[% END %]
+
+[% END %]
Please sign in to comment.
Something went wrong with that request. Please try again.