Check if etherpad is enabled with the get_opt_features helper

Instead of stashing the value
master
Daniel Berteaud 9 years ago
parent 52596a8b03
commit 4fb913d0f1
  1. 4
      templates/default/index.html.ep
  2. 6
      templates/default/join.html.ep
  3. 4
      vroom.pl

@ -66,7 +66,7 @@
<li data-target="#carouselIndex" data-slide-to="4"></li>
<li data-target="#carouselIndex" data-slide-to="5"></li>
<li data-target="#carouselIndex" data-slide-to="6"></li>
<% if ($etherpad eq 'true'){ %>
<% if ($self->get_opt_features->{etherpad}){ %>
<li data-target="#carouselIndex" data-slide-to="7"></li>
<% } %>
</ol>
@ -148,7 +148,7 @@
</h2>
</div>
</div>
<% if ($etherpad eq 'true') { %>
<% if ($self->get_opt_features->{etherpad}) { %>
<div class="item carouselIndexItem col-xs-10 col-xs-offset-1">
%= image '/img/note.png', alt => $self->l('COLLABORATIVE_NOTETAKING'), class => "img-responsive carouselLogo"
<p>

@ -51,7 +51,7 @@
0
</span>
</button>
<% if ($etherpad eq 'true'){ %>
<% if ($self->get_opt_features->{etherpad}){ %>
<button class="btn btn-lg btn-default help btn-etherpad" data-toggle="tooltip" data-placement="bottom" title="<%=l 'OPEN_ETHERPAD' %>">
<span class="glyphicon glyphicon-pencil">
</span>
@ -368,7 +368,7 @@
</div>
</div>
<div id="mainView" class="col-xs-12 col-sm-8">
<% if ($etherpad eq 'true'){ %>
<% if ($self->get_opt_features->{etherpad}){ %>
<div id="etherpadContainer" class="hidden-xs"></div>
<% } %>
<div id="mainVideo">
@ -386,7 +386,7 @@
var roomName = '<%= $room %>';
$( document ).ready(function() {
etherpad = {
enabled: <%= $etherpad %>,
enabled: <%= $self->get_opt_features->{etherpad} ? 'true' : 'false' %>,
<%
my $ethuri = Mojo::URL->new($config->{'etherpad.uri'});
%>

@ -1492,8 +1492,7 @@ get '/' => sub {
my $self = shift;
$self->login;
$self->stash(
page => 'index',
etherpad => ($optf->{etherpad}) ? 'true' : 'false'
page => 'index'
);
} => 'index';
@ -2400,7 +2399,6 @@ get '/:room' => sub {
page => 'room',
moh => $self->choose_moh(),
video => $video,
etherpad => ($optf->{etherpad}) ? 'true' : 'false',
etherpadGroup => $data->{etherpad_group},
ua => $self->req->headers->user_agent
);

Loading…
Cancel
Save