diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index e0913d0..d75149b 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -164,6 +164,7 @@ our %Lexicon = ( "ROOM_ID" => "ID", "CREATION_DATE" => "Creation date", "LAST_ACTIVITY" => "Last activity", + "NUMBER_OF_PARTICIPANTS" => "Number of participants", "LOCKED" => "Locked", "ASK_FOR_NAME" => "Require to enter a name", "PASSWORD_PROTECTED" => "Password protection", diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index 7493503..00a2334 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -171,6 +171,7 @@ our %Lexicon = ( "ROOM_ID" => "Identifiant", "CREATION_DATE" => "Date de création", "LAST_ACTIVITY" => "Dernière activité", + "NUMBER_OF_PARTICIPANTS" => "Nombre de participants", "LOCKED" => "Verrouillé", "ASK_FOR_NAME" => "Exige de saisir un nom", "PASSWORD_PROTECTED" => "Protection par mot de passe", diff --git a/public/vroom.pl b/public/vroom.pl index 364d2f9..41350ca 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -802,6 +802,7 @@ get '/help' => 'help'; get '/admin/(:room)' => sub { my $self = shift; my $room = $self->stash('room'); + $self->delete_participants; my $data = $self->get_room($room); unless ($data){ return $self->render('error', @@ -810,7 +811,11 @@ get '/admin/(:room)' => sub { room => $room ); } - $self->stash(room => $room); + my $num = scalar $self->get_participants($room); + $self->stash( + room => $room, + participants => $num + ); } => 'manage_room'; # And this one displays the list of existing rooms get '/admin' => sub { diff --git a/templates/default/manage_room.html.ep b/templates/default/manage_room.html.ep index 5ec2cfc..05befe9 100644 --- a/templates/default/manage_room.html.ep +++ b/templates/default/manage_room.html.ep @@ -65,6 +65,14 @@ + <%=l 'NUMBER_OF_PARTICIPANTS' %> + + + <%= $participants %> + + + + <%=l 'LOCKED' %>