diff --git a/lib/Dojo.pm b/lib/Dojo.pm index 9417aaf..3fa6013 100755 --- a/lib/Dojo.pm +++ b/lib/Dojo.pm @@ -56,13 +56,15 @@ sub startup { $logged_in->get('/radio')->to('home#radio'); # =================== - # login user grulla = + # login any temp pass= + my $usert = $r->under('/')->to('users#is_tmp'); # common grulla user my $user = $r->under('/')->to('users#is_grulla'); $user->any('/ccast')->to('home#bcast'); # personal my $guest = $r->under('/')->to('users#is_grulla_tmp'); $guest->any('/bcast')->to('home#bcast'); + $guest->any('/radiop')->to('home#radiop'); # =================== # admin ======================================================================= diff --git a/lib/Dojo/Controller/Home.pm b/lib/Dojo/Controller/Home.pm index 890fd2b..23b11db 100755 --- a/lib/Dojo/Controller/Home.pm +++ b/lib/Dojo/Controller/Home.pm @@ -115,6 +115,13 @@ sub radio{ $c->stash($c->dbv->mod); $c->stash(nick=>$c->session("nick")); } + +sub radiop{ + my $c=shift; + $c->stash(layout=> "defaultContact"); + $c->stash($c->dbv->mod); + $c->stash(nick=>$c->session("nick")); +} sub candy{ my $c=shift; diff --git a/lib/Dojo/Controller/Users.pm b/lib/Dojo/Controller/Users.pm index 7a5b398..086d252 100755 --- a/lib/Dojo/Controller/Users.pm +++ b/lib/Dojo/Controller/Users.pm @@ -64,6 +64,7 @@ sub is_admin { $self->redirect_to('login'); } + sub is_grulla { my $self = shift; return 1 if (($self->session('pmid')//0)>=2); diff --git a/public/home/home/bcast.js b/public/home/home/bcast.js index 7292990..6bf2a09 100755 --- a/public/home/home/bcast.js +++ b/public/home/home/bcast.js @@ -17,6 +17,9 @@ window.onload = function(){ else if (d.icestats.source.listenurl == radio_listen_url){ console.log("transmitiendo radio"); onliner(d); } + else if (d.icestats.source.listenurl == radiop_listen_url){ + console.log("transmitiendo radio"); + onlinerp(d); } else { console.warn("otro canal"); offline(); }} @@ -55,11 +58,11 @@ window.onload = function(){ .on("click",function(){window.location="bcast";}); dataUpdate(); } - function onliner(d){ + function onlinerp(d){ d3.selectAll(".broadcast") .style("display","block"); d3.selectAll("article.broadcast,p.broadcast") - .on("click",function(){window.location="radio";}); + .on("click",function(){window.location="radiop";}); dataUpdate(); } diff --git a/templates/home/radiop.html.ep b/templates/home/radiop.html.ep new file mode 100755 index 0000000..745f066 --- /dev/null +++ b/templates/home/radiop.html.ep @@ -0,0 +1,46 @@ +% stash css=>["/home/radio/radio.css"]; +% stash js=>["/home/radio/link.js","/home/radio/radio.js"]; +
+

Radio Vuelo de grulla

+
+ +
+

<%= $nick %>

+
+ +
+

<%= $rmod %>

+
+ +
+

Salir

+
+ +
+
+

Estás escuchando a

+

+
+
+

Todavía no comenzamos

+

Por favor espera unos minutos

+
+
+
+ +
+
+ +
+

+ +
+ +
+
+ diff --git a/templates/users/logint.html.ep b/templates/users/logint.html.ep index 9111af1..322db58 100755 --- a/templates/users/logint.html.ep +++ b/templates/users/logint.html.ep @@ -1,4 +1,4 @@ -%stash css=>["/users/login/formu.css"]; +%stash css=>["/users/login/formt.css"];

Bienvenido