make coauthor relation can be edit

This commit is contained in:
Rueshyna authored and chris committed 2012-12-06 07:59:43 +08:00
1 parent 8d110cce91
commit e7fdac1d23
8 files changed
+27 -7

No files matched your search

@@ -1,4 +1,2 @@
<%= form_for(@new_relation , url: desktop_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %>
<%= f.text_field :relation %>
<%= f.submit "Save" %>
<% end %>
<%= f.text_field :relation %>
<%= f.submit "Save" %>
@@ -0,0 +1,3 @@
<%= form_for(@new_relation , url: desktop_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %>
<%= render partial: 'desktop/co_author_relations/form' , locals: {:f => f}%>
<% end %>
@@ -1,6 +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><%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), confirm: 'Are you sure?', method: :delete, :class=>"bt-delete" %></td>
</tr>
<% end %>
@@ -0,0 +1,3 @@
<%= form_for(@co_author_relations, url: desktop_co_author_relation_path(@co_author_relations), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %>
<%= render partial: 'desktop/co_author_relations/form' , locals: {:f => f}%>
<% end %>
@@ -1,7 +1,7 @@
<h1>Listing co_author_relations</h1>
<%= submit_tag "Back", :type => "button", class: "bt-cancel fn_btn hh2 thmc2 thmtxt" %>
<%= render 'form' %>
<%= render 'new' %>
<table id="co_author_relation_table">
<thead>
+1 -1
View File
@@ -1,3 +1,3 @@
<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_author_path(@co_author) do |f| %>
<%= form_for @co_author_relation, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_author_path(@co_author_relation) do |f| %>
<%= render partial: 'desktop/co_authors/form', locals: {:f => f} %>
<% end %>
+1 -1
View File
@@ -1,3 +1,3 @@
<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_authors_path do |f| %>
<%= render partial: 'desktop/co_authors/form', locals: {:f => f} %>
<%= render partial: 'desktop/co_author_relations/form', locals: {:f => f} %>
<% end %>