Better button layout on error page

master
Daniel Berteaud 11 years ago
parent 8257c4401a
commit 4266377454
  1. 3
      public/css/vroom.css
  2. 23
      templates/default/error.html.ep

@ -257,6 +257,9 @@
text-align: justify; text-align: justify;
text-justify: inter-word; text-justify: inter-word;
} }
.btn-full {
width: 100% !important;
}
html, html,
body { body {
height: 100%; height: 100%;

@ -5,16 +5,19 @@
<div class="jumbotron alert-danger"> <div class="jumbotron alert-danger">
<h2><%=l 'ERROR_OCCURRED' %></h2> <h2><%=l 'ERROR_OCCURRED' %></h2>
<p><%= $msg %></p> <p><%= $msg %></p>
<div class="btn-group"> <div class="row">
<a class="btn btn-primary btn-lg" role="button" href="<%= $self->get_url('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a> <div class="col-sm-6 col-lg-4 col-xl-3">
<% if ($err eq 'ERROR_NAME_CONFLICT'){ %> <a class="btn btn-primary btn-lg btn-full" role="button" href="<%= $self->get_url('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a>
<a class="btn btn-default btn-lg" role="button" href="<%= $self->get_url('/') . $room %>"><%=l 'JOIN_THIS_ROOM' %></a> </div>
<% } elsif ($err eq 'WRONG_PASSWORD'){ %> <div class="col-sm-6 col-lg-4 col-xl-3">
<a class="btn btn-default btn-lg" role="button" href="<%= $self->get_url('/password') . '/' . $room %>"><%=l 'TRY_AGAIN' %></a> <% if ($err eq 'ERROR_NAME_CONFLICT'){ %>
<% } elsif ($err eq 'ERROR_ROOM_s_LOCKED' && stash 'ownerPass'){ %> <a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->get_url('/') . $room %>"><%=l 'JOIN_THIS_ROOM' %></a>
<a class="btn btn-default btn-lg" role="button" href="<%= $self->get_url('/password') . '/' . $room %>"><%=l 'AUTH_IF_OWNER' %></a> <% } elsif ($err eq 'WRONG_PASSWORD'){ %>
<% } elsif ($err eq 'ERROR_ROOM_s_DOESNT_EXIST'){ %> <a class="btn btn-default btn-lg btn-full" role="button" href="<%= $self->get_url('/password') . '/' . $room %>"><%=l 'TRY_AGAIN' %></a>
<button class="btn btn-default btn-lg" type="submit" form="createRoom"><%=l 'CREATE_THIS_ROOM' %></button> <% } 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 %>"><%=l 'AUTH_IF_OWNER' %></a>
<% } elsif ($err eq 'ERROR_ROOM_s_DOESNT_EXIST'){ %>
<button class="btn btn-default btn-lg btn-full" style="width: 100%" type="submit" form="createRoom"><%=l 'CREATE_THIS_ROOM' %></button>
<% } %> <% } %>
</div> </div>
<% if ($err eq 'ERROR_ROOM_s_DOESNT_EXIST'){ %> <% if ($err eq 'ERROR_ROOM_s_DOESNT_EXIST'){ %>

Loading…
Cancel
Save