mirror of
https://github.com/dani/vroom.git
synced 2024-06-30 15:23:41 +02:00
Remove get_url wrapper
This commit is contained in:
parent
a6f94946b3
commit
5a832da7a2
|
@ -3,7 +3,7 @@
|
|||
%= include 'public_toolbar'
|
||||
|
||||
<div class="col-sm-offset-3 col-md-offset-4 col-sm-6 col-md-4">
|
||||
<a class="btn btn-primary btn-block" href="<%= $self->get_url('/admin/rooms') %>">
|
||||
<a class="btn btn-primary btn-block" href="<%= $self->url_for('/admin/rooms') %>">
|
||||
<%=l 'ROOM_MANAGEMENT' %>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -11,21 +11,21 @@
|
|||
</p>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-lg-4 col-xl-3">
|
||||
<a class="btn btn-primary btn-lg btn-full" role="button" href="<%= $self->get_url('/') %>">
|
||||
<a class="btn btn-primary btn-lg btn-full" role="button" href="<%= $self->url_for('/') %>">
|
||||
<%=l 'BACK_TO_MAIN_MENU' %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 col-lg-4 col-xl-3">
|
||||
<% if ($err eq 'ERROR_NAME_CONFLICT'){ %>
|
||||
<a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->get_url('/') . $room %>">
|
||||
<a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->url_for("/$room") %>">
|
||||
<%=l 'JOIN_THIS_ROOM' %>
|
||||
</a>
|
||||
<% } elsif ($err eq 'WRONG_PASSWORD'){ %>
|
||||
<a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->get_url('/password') . '/' . $room %>">
|
||||
<a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->url_for("/password/$room") %>">
|
||||
<%=l 'TRY_AGAIN' %>
|
||||
</a>
|
||||
<% } elsif ($err eq 'ERROR_ROOM_s_LOCKED' && stash 'ownerPass'){ %>
|
||||
<a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->get_url('/password') . '/' . $room %>">
|
||||
<a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->url_for("/password/$room") %>">
|
||||
<%=l 'AUTH_IF_OWNER' %>
|
||||
</a>
|
||||
<% } elsif ($err eq 'ERROR_ROOM_s_DOESNT_EXIST'){ %>
|
||||
|
@ -36,7 +36,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% if ($err eq 'ERROR_ROOM_s_DOESNT_EXIST'){ %>
|
||||
<form id="createRoom" action="<%= $self->get_url('/create') %>" method="post">
|
||||
<form id="createRoom">
|
||||
<input type="text" id="roomName" name="roomName" value="<%= $room %>" hidden/>
|
||||
</form>
|
||||
<% } %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
%= include 'public_toolbar'
|
||||
<div class="container-fluid">
|
||||
<div class="well publicForm">
|
||||
<form role="form" action="<%= $self->get_url('/feedback') %>" method="post">
|
||||
<form role="form" action="<%= $self->url_for('/feedback') %>" method="post">
|
||||
<legend class=text-center">
|
||||
<%=l 'GIVE_US_YOUR_FEEDBACK' %>
|
||||
</legend>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<button type="submit" class="btn btn-primary">
|
||||
<%=l 'SUBMIT' %>
|
||||
</button>
|
||||
<a href="<%= $self->get_url('/') %>" class="btn btn-default">
|
||||
<a href="<%= $self->url_for('/') %>" class="btn btn-default">
|
||||
<%=l 'CANCEL' %>
|
||||
</a>
|
||||
</form>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<h2><%=l 'THANK_YOU' %></h2>
|
||||
<p><%=l 'THANKS_FOR_YOUR_FEEDBACK' %></p>
|
||||
<div class='btn-group'>
|
||||
<a class="btn btn-primary btn-lg" role="button" href="<%= $self->get_url('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a>
|
||||
<a class="btn btn-primary btn-lg" role="button" href="<%= $self->url_for('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
</p>
|
||||
<div class='row'>
|
||||
<div class="col-sm-6 col-lg-4 col-xl-3">
|
||||
<a class="btn btn-primary btn-lg btn-full" role="button" href="<%= $self->get_url('/') %>">
|
||||
<a class="btn btn-primary btn-lg btn-full" role="button" href="<%= $self->url_for('/') %>">
|
||||
<%=l 'BACK_TO_MAIN_MENU' %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 col-lg-4 col-xl-3">
|
||||
<a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->get_url('/feedback') %>">
|
||||
<a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->url_for('/feedback') %>">
|
||||
<%=l 'GIVE_US_YOUR_FEEDBACK' %>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="description" content=" <%=l 'VROOM_DESC' %>" />
|
||||
<% my @css = qw(css/bootstrap.css css/bootstrap-switch.css css/toc-scroll.css css/vroom.css); %>
|
||||
<%=css @css %>
|
||||
<link rel="icon" type="image/png" href="<%= $self->get_url('/') %>img/favicon.png" />
|
||||
<link rel="icon" type="image/png" href="<%= $self->url_for('/img/favicon.png') %>" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrap">
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<%=l 'CLICK_SEND_OR_JOIN_NOW' %>
|
||||
</p>
|
||||
</div>
|
||||
<a class="btn btn-default btn-lg" role="button" href="<%= $self->get_url('/') . $room %><% if ($token ne ''){ %>?token=<%= $token %><% } %>">
|
||||
<a class="btn btn-default btn-lg" role="button" href="<%= $self->url_for("/$room") %><% if ($token ne ''){ %>?token=<%= $token %><% } %>">
|
||||
<%=l 'JOIN_THIS_ROOM' %>
|
||||
</a>
|
||||
<button type="submit" class="btn btn-primary btn-lg">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<h2><%=l 'MESSAGE_SENT' %></h2>
|
||||
<p><%=l 'ORGANIZER_WILL_GET_YOUR_MESSAGE' %></p>
|
||||
<div class='btn-group'>
|
||||
<a class="btn btn-primary btn-lg" role="button" href="<%= $self->get_url('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a>
|
||||
<a class="btn btn-primary btn-lg" role="button" href="<%= $self->url_for('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
<%=l 'CLICK_IF_NO_WEBCAM' %>
|
||||
</p>
|
||||
<p class="text-center">
|
||||
<a class="btn btn-default btn-lg" href="<%= $self->get_url('/') . $room %>?video=false">
|
||||
<a class="btn btn-default btn-lg" href="<%= $self->url_for("/$room") %>?video=false">
|
||||
<span class="glyphicon glyphicon-headphones">
|
||||
</span>
|
||||
</a>
|
||||
|
@ -254,7 +254,7 @@
|
|||
<button id="displayNamePreButton" class="btn btn-primary disabled" type="submit">
|
||||
<%=l 'SUBMIT' %>
|
||||
</button>
|
||||
<a class="btn btn-default" href="<%= $self->get_url('/') %>">
|
||||
<a class="btn btn-default" href="<%= $self->url_for('/') %>">
|
||||
<%=l 'CANCEL' %>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -326,7 +326,7 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<audio id="mohPlayer" src="<%= $self->get_url('/') %>snd/moh/<%= $moh %>" loop></audio>
|
||||
<audio id="mohPlayer" src="<%= $self->url_for('/snd/moh/' . $moh) %>" loop></audio>
|
||||
<div id="view" class="view row-fluid">
|
||||
<div id="webRTCVideo" class="col-xs-12 col-sm-4">
|
||||
<div class="col-xs-3 col-sm-12 col-lg-6 previewContainer" id="videoLocalContainer">
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<script type="text/javascript">
|
||||
var rootUrl = '<%= $self->get_url('/'); %>';
|
||||
<% my $url = $self->url_for('/');
|
||||
$url .= ($url =~ m/\/$/) ? '' : '/'; %>
|
||||
var rootUrl = '<%= $url %>';
|
||||
var currentLang = '<%= $self->languages %>';
|
||||
var api_key = '<%= ($self->session('key')) ? $self->session('key') : '' %>';
|
||||
var roomName;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<h2><%=l 'YOU_HAVE_BEEN_KICKED' %></h2>
|
||||
<p><%=l 'AN_ADMIN_HAS_KICKED_YOU' %></p>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary btn-lg" role="button" href="<%= $self->get_url('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a>
|
||||
<a class="btn btn-primary btn-lg" role="button" href="<%= $self->url_for('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12,20 +12,20 @@
|
|||
<div class="collapse navbar-collapse" id="toolbar">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="<%= $self->get_url('/') %>"><%=l 'HOME' %></a>
|
||||
<a href="<%= $self->url_for('/') %>"><%=l 'HOME' %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%= $self->get_url('/help') %>"><%=l 'HELP' %></a>
|
||||
<a href="<%= $self->url_for('/help') %>"><%=l 'HELP' %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%= $self->get_url('/about') %>"><%=l 'ABOUT' %></a>
|
||||
<a href="<%= $self->url_for('/about') %>"><%=l 'ABOUT' %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%= $self->get_url('/feedback') %>"><%=l 'FEEDBACK' %></a>
|
||||
<a href="<%= $self->url_for('/feedback') %>"><%=l 'FEEDBACK' %></a>
|
||||
</li>
|
||||
<% if ($config->{'interface.demo'}){ %>
|
||||
<li>
|
||||
<a href="<%= $self->get_url('/documentation') %>"><%=l 'DOCUMENTATION' %></a>
|
||||
<a href="<%= $self->url_for('/documentation') %>"><%=l 'DOCUMENTATION' %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li class="hidden-xs">
|
||||
|
|
8
vroom.pl
8
vroom.pl
|
@ -498,14 +498,6 @@ helper get_mtime => sub {
|
|||
return stat($file)->mtime;
|
||||
};
|
||||
|
||||
# Wrapper arround url_for which adds a trailing / if needed
|
||||
helper get_url => sub {
|
||||
my $self = shift;
|
||||
my $url = $self->url_for(shift);
|
||||
$url .= ($url =~ m/\/$/) ? '' : '/';
|
||||
return $url;
|
||||
};
|
||||
|
||||
# Add an email address to the list of notifications
|
||||
helper add_notification => sub {
|
||||
my $self = shift;
|
||||
|
|
Loading…
Reference in New Issue
Block a user