edit coauthor relation done

This commit is contained in:
harrybomrah authored and chris committed 2012-12-06 07:59:44 +08:00
1 parent 4681f0ee36
commit 3d1fb48489
5 files changed
+33 -9

No files matched your search

@@ -1,5 +1,5 @@
<% if not @co_author_relation.new_record? %>
<%= submit_tag "Cancel", :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %>
<% end %>
<%= f.text_field :relation %>
<%= f.submit "Save" %>
<% if not @co_author_relation.new_record? %>
<%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type" %>
<% end %>
@@ -1,7 +1,7 @@
<% @co_author_relations.each do |co_author_relation| %>
<tr>
<td><%= co_author_relation.relation %></td>
<td><%= link_to 'Edit', edit_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit" %></td>
<td class="form_space"><%= co_author_relation.relation %></td>
<td><%= link_to 'Edit', edit_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type" %></td>
<td><%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), confirm: 'Are you sure?', method: :delete, :class=>"bt-delete" %></td>
</tr>
<% end %>
@@ -1,3 +1,3 @@
<%= form_for(@co_author_relation, url: desktop_co_author_relation_path(@co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %>
<%= form_for(@co_author_relation, url: desktop_co_author_relation_path(@co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %>
<%= render partial: 'desktop/co_author_relations/form' , locals: {:f => f}%>
<% end %>