Edit registration for admin

This commit is contained in:
differentreality 2013-07-12 11:43:31 +03:00
parent 463430b3e8
commit 19b11a79ff
5 changed files with 113 additions and 2 deletions

View file

@ -0,0 +1,25 @@
.container-fluid
.row-fluid
.span12
%h3
Edit registration of #{@person.public_name} for #{@conference.title}
%br
.row-fluid
.span12
= semantic_form_for(@registration, :url => admin_conference_registrations_edit_path(@conference.short_title, @registration.id), :html => { :method => :put }) do |f|
.span6
= f.inputs :name => "Personal Data" do
= f.fields_for :person do |p|
= p.label :first_name
= p.text_field :first_name
= p.label :last_name
= p.text_field :last_name
= p.label :email
= p.text_field :email
= p.label :affiliation
= p.text_field :company
= p.label :Nickname
= p.text_field :irc_nickname
= render :partial => 'shared/conference_registration', :locals => { :f => f }
= f.action :submit, :button_html => { :value => "Edit Registration", :class => "btn btn-primary" }

View file

@ -38,7 +38,8 @@
- else
= registration.send(field.to_sym)
%td
= link_to "Edit", "#", :class => "btn btn-primary"
= link_to "Edit", admin_conference_registrations_edit_path(@conference.short_title, :id => registration.id), :method => :get, :class => "btn btn-primary"
%td
= link_to "Delete", admin_conference_registrations_path(@conference.short_title, :id => registration.id), :method => :delete, :class => "btn btn-danger", :confirm => "Really delete registration for #{registration.public_name} #{registration.email}?"