Sha256: c967f08816b75ff1f316cba19b4bcbfdca4e7e462ba8be94309e44830b7ce03b

Contents?: true

Size: 1.36 KB

Versions: 18

Compression:

Stored size: 1.36 KB

Contents

<%
  self.page_title = "Editing user: #{@user.name}"
  if @user == current_user
    self.page_description = "You are editing " + link_to("your own", [:admin, @user]) + " profile."
  else
    self.page_description = "You are editing " + link_to("#{@user.name}", [:admin, @user]) + "'s profile."
  end
  self.page_description_links = link_to("View all users", admin_users_path)
%>

<% content_for :sidebar do %>
  <% if @user != current_user %>
    <h2>Preventing access</h2>
    <p>
      Unchecking the <cite>This account is activated</cite> box will effectively disable
      logins.
    </p>
  <% end %>
<% end %>

<%= form_for([:admin, @user],
             html: { multipart: true },
             builder: PagesCore::Admin::FormBuilder) do |f| %>

  <h2>Account details</h2>
  <%= f.labelled_text_field :name %>
  <%= f.labelled_text_field :email %>

  <h2>Profile picture</h2>

  <%= f.image_uploader :image, alternative: @user.name %>

  <% if policy(@user).change_password? %>
    <h2>Password</h2>
    <%= f.labelled_password_field :password, 'Change password' %>
    <%= f.labelled_password_field :confirm_password, 'Confirm password' %>
    <p>
      Leave the password blank if you do not wish to change the password.
    </p>
  <% end %>

  <%= render partial: "access_control", locals: { user: @user, f: f } %>

  <p>
    <button type="submit">Save</button>
  </p>

<% end %>

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pages_core-3.12.0 app/views/admin/users/edit.html.erb
pages_core-3.11.3 app/views/admin/users/edit.html.erb
pages_core-3.11.2 app/views/admin/users/edit.html.erb
pages_core-3.11.1 app/views/admin/users/edit.html.erb
pages_core-3.11.0 app/views/admin/users/edit.html.erb
pages_core-3.10.2 app/views/admin/users/edit.html.erb
pages_core-3.10.1 app/views/admin/users/edit.html.erb
pages_core-3.9.2 app/views/admin/users/edit.html.erb
pages_core-3.9.1 app/views/admin/users/edit.html.erb
pages_core-3.9.0 app/views/admin/users/edit.html.erb
pages_core-3.8.3 app/views/admin/users/edit.html.erb
pages_core-3.8.2 app/views/admin/users/edit.html.erb
pages_core-3.8.1 app/views/admin/users/edit.html.erb
pages_core-3.8.0 app/views/admin/users/edit.html.erb
pages_core-3.7.0 app/views/admin/users/edit.html.erb
pages_core-3.6.2 app/views/admin/users/edit.html.erb
pages_core-3.6.1 app/views/admin/users/edit.html.erb
pages_core-3.6.0 app/views/admin/users/edit.html.erb