Sha256: c14dff991307e33ad6bba4a125fa38ccf691bec2163717e8b3194fdd74b1a2a7

Contents?: true

Size: 1.01 KB

Versions: 10

Compression:

Stored size: 1.01 KB

Contents

<%  @title = 'Change user level' %>
<%= erb :'template/header' %>

<% if defined? @error %>
  <p class="error"><%= @error %></p>
<% elsif defined? @success %>
  <p class="success"><%= @success %></p>
<% elsif defined? @users %>
  <form action="<%= @current_url %>" method="post">

    <select name="username">
      <% @users.each { |user| %>
        <option value="<%= user.username %>"><%= user.username %></option>
      <% } %>
    </select><br />

    <%= csrf_tag %>
    <input type="submit" name="go" value="Change">
  </form>
<% else %>
  <form action="<%= @current_url %>" method="post">

    <select name="level">
      <% @levels.each_pair { |key, val| %>
        <option value="<%= key %>" <%= 'selected' if val == @user.permission_level %>><%= key.capitalize %></option>
      <% } %>
    </select><br />

    <%= csrf_tag %>
    <input type="hidden" value="<%= @user.username %>" name="username">
    <input type="submit" value="Change">
  </form>
<% end %>

<%= erb :'template/footer' %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gennaro-0.3.6.2 templates/authentication/views/user/change_level.erb
gennaro-0.3.6.1 templates/authentication/views/user/change_level.erb
gennaro-0.3.6 templates/authentication/views/user/change_level.erb
gennaro-0.3.5 templates/authentication/views/user/change_level.erb
gennaro-0.3.4.2 templates/authentication/views/user/change_level.erb
gennaro-0.3.4.1 templates/authentication/views/user/change_level.erb
gennaro-0.3.4 templates/authentication/views/user/change_level.erb
gennaro-0.3.3 templates/authentication/views/user/change_level.erb
gennaro-0.3.2.3 templates/authentication/views/user/change_level.erb
gennaro-0.3.2.2 templates/authentication/views/user/change_level.erb