Sha256: 8f2335cf63e033e041019d256ba5bf976734d7b13c1efab327a4030f2ff5df7a

Contents?: true

Size: 1.63 KB

Versions: 3

Compression:

Stored size: 1.63 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::FormBuilder do |f| %>

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

  <h2>Picture</h2>
  <% if @user.image %>
    <p id="user-image-info">
      <%= (@user==current_user) ? "You already have" : "#{@user.name} already has" %> a profile picture.
      You can
      <%= link_to "delete it", delete_image_admin_user_path(@user), method: :delete, class: :delete %>
      or upload a new file below to replace it.
    </p>
  <% end %>

  <%= f.labelled_file_field :image %>

  <% 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

3 entries across 3 versions & 1 rubygems

Version Path
pages_core-3.4.3 app/views/admin/users/edit.html.erb
pages_core-3.5.1 app/views/admin/users/edit.html.erb
pages_core-3.4.2 app/views/admin/users/edit.html.erb