Sha256: 443e32d67104ef94262280abc3da7d77077e64483a2ef032b7f9ae4b4bb5a37c

Contents?: true

Size: 1.71 KB

Versions: 8

Compression:

Stored size: 1.71 KB

Contents

<% if can? :view, Kaui::AdminTenant %>
    <dl class="dl-horizontal">
      <dt>Name:</dt>
      <dd><%= @allowed_user.kb_username %>&nbsp;</dd>
      <dt>Tenant ID:</dt>
      <dd><%= @allowed_user.description %>&nbsp;</dd>
    </dl>

    <% unless @allowed_user.kaui_tenants.empty? %>
        <h3>Configured tenants:</h3>
        <table id="allowed-user-tenants-table" class="table table-condensed">
          <thead>
          <tr>
            <th>Name</th>
            <th>Tenant Id</th>
            <th>Api Key</th>
          </tr>
          </thead>
          <tbody>
          <% @allowed_user.kaui_tenants.each do |t| %>
              <tr>
                <td><%= link_to t.name, admin_tenant_path(t.id) %></td>
                <td><%= t.kb_tenant_id %></td>
                <td><%= t.api_key %></td>
              </tr>
          <% end %>
          </tbody>
        </table>
    <% end %>
<% end %>

<% if can? :create, Kaui::AdminTenant %>
    <%= form_for(@allowed_user, :url => {:action => :add_tenant}, :html => {:method => :post, :class => "form-horizontal"}) do |f| %>

        <fieldset>
          <%= f.hidden_field(:id) %>
          <div class="control-group">
            <%= label_tag :tenant_name, "Available Tenants:", :class => "control-label" %>
            <div class="controls">
              <%= select_tag :tenant_id, options_for_select(@tenants.map { |t| [t.name, t.id] }) %>
            </div>
          </div>
          <div class="form-actions">
            <%= f.submit 'Chose Tenant', :class => 'btn btn-primary' %>
            <%= link_to 'Back', :back, :class => 'btn' %>
          </div>
        </fieldset>
    <% end %>
<% end %>

<div class="form-actions">
  <%= link_to 'Back', :back, :class => 'btn' %>
</div>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kaui-0.11.0 app/views/kaui/admin_allowed_users/show.html.erb
kaui-0.10.0 app/views/kaui/admin_allowed_users/show.html.erb
kaui-0.9.0 app/views/kaui/admin_allowed_users/show.html.erb
kaui-0.8.4 app/views/kaui/admin_allowed_users/show.html.erb
kaui-0.8.3 app/views/kaui/admin_allowed_users/show.html.erb
kaui-0.8.2 app/views/kaui/admin_allowed_users/show.html.erb
kaui-0.8.1 app/views/kaui/admin_allowed_users/show.html.erb
kaui-0.8.0 app/views/kaui/admin_allowed_users/show.html.erb