Sha256: edfeb793377855425febd799f259177437ce3abcfb2a471d7a04b3087d894669

Contents?: true

Size: 1.1 KB

Versions: 10

Compression:

Stored size: 1.1 KB

Contents

<% if @user.new_record? && Pageflow.config.quotas.get(:users, @user.account).exhausted? %>
  <%= render 'admin/users/quota_exhausted' %>
<% else %>
  <%= semantic_form_for([:admin, @user.becomes(User)]) do |f| %>
    <%= f.inputs "Details" do %>
      <% if @user.new_record? %>
        <%= quota_state_description(:users, @user.account) %>
      <% end %>

      <%= f.input :email, :hint => f.object.new_record? && I18n.t('pageflow.admin.users.email_invitation_hint') %>
      <%= f.input :first_name %>
      <%= f.input :last_name %>
      <%= f.input :locale,
                  as: :select,
                  include_blank: false,
                  collection: available_locales_collection %>

      <% if authorized?(:read, Pageflow::Account) %>
        <%= f.input :account, :include_blank => false %>
      <% end %>

      <%= f.input :role, :collection => collection_for_user_roles, :include_blank => false, :hint => authorized?(:read, Pageflow::Account) ? I18n.t('pageflow.admin.users.role_hint.admin') : I18n.t('pageflow.admin.users.role_hint.others') %>
    <% end %>
    <%= f.actions %>
  <% end %>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pageflow-0.10.0 app/views/admin/users/_form.html.erb
pageflow-0.9.2 app/views/admin/users/_form.html.erb
pageflow-0.9.1 app/views/admin/users/_form.html.erb
pageflow-0.9.0 app/views/admin/users/_form.html.erb
pageflow-0.8.2 app/views/admin/users/_form.html.erb
pageflow-0.8.1 app/views/admin/users/_form.html.erb
pageflow-0.8.0 app/views/admin/users/_form.html.erb
pageflow-0.7.2 app/views/admin/users/_form.html.erb
pageflow-0.7.1 app/views/admin/users/_form.html.erb
pageflow-0.7.0 app/views/admin/users/_form.html.erb