Display the number of participants in the management page

master
Daniel Berteaud 11 years ago
parent 819ac83f63
commit f2db6be49e
  1. 1
      lib/Vroom/I18N/en.pm
  2. 1
      lib/Vroom/I18N/fr.pm
  3. 7
      public/vroom.pl
  4. 8
      templates/default/manage_room.html.ep

@ -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",

@ -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",

@ -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 {

@ -65,6 +65,14 @@
</tr>
<tr>
<th>
<%=l 'NUMBER_OF_PARTICIPANTS' %>
</th>
<th>
<%= $participants %>
</th>
</tr>
<tr>
<th>
<%=l 'LOCKED' %>
</th>
<th>

Loading…
Cancel
Save