Skip to content

Commit

Permalink
Add edit profile edit links on the update_users page
Browse files Browse the repository at this point in the history
Add partial for displaying edit links in a table on a per user basis
  • Loading branch information
valleyjo committed Aug 11, 2015
1 parent 852ccce commit 89278cc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
4 changes: 4 additions & 0 deletions app/views/admin/users/_user_edit.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
%tr
%td= user.id
%td= user.name
%td= link_to "Edit", edit_user_path(user), class: "btn btn-md btn-primary"
25 changes: 25 additions & 0 deletions app/views/admin/users/update_users.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,28 @@
%p These positions correlate to event types. A user may be assigned to manage a specific event type.
%p Leave the user blank if you want to be the sole administrator of an event type.
= render partial: 'admin/users/position_update', collection: @event_type_admins, as: :position

.container
%hr
%h1 Edit User Profile Information
.col-md-4
%h3 Active
%table.table.table-striped
%th ID
%th Name
%th Edit Link
= render partial: 'admin/users/user_edit', collection: User.active, as: :user
.col-md-4
%h3 Inactive
%table.table.table-striped
%th ID
%th Name
%th Edit Link
= render partial: 'admin/users/user_edit', collection: User.inactive, as: :user
.col-md-4
%h3 Alumni
%table.table.table-striped
%th ID
%th Name
%th Edit Link
= render partial: 'admin/users/user_edit', collection: User.alumni, as: :user
5 changes: 0 additions & 5 deletions app/views/devise/registrations/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@

%hr
%h4 Undergrads Only:
.form-group
= f.label :avatar, 'Profile Picture'
%p Upload a square image for best results. Your picture will appear distorted otherwise.
= f.file_field :avatar

.form-group
= f.label :about, 'Short Bio'
= f.text_area :about, class: 'form-control', placeholder: resource.about
Expand Down

0 comments on commit 89278cc

Please sign in to comment.