myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2725] trunk/app: fixed nested route names for wo


From: noreply
Subject: [myexperiment-hackers] [2725] trunk/app: fixed nested route names for workflow citations
Date: Thu, 20 Oct 2011 14:22:27 -0400 (EDT)

Revision
2725
Author
dgc
Date
2011-10-20 14:22:27 -0400 (Thu, 20 Oct 2011)

Log Message

fixed nested route names for workflow citations

Modified Paths

Diff

Modified: trunk/app/controllers/citations_controller.rb (2724 => 2725)


--- trunk/app/controllers/citations_controller.rb	2011-10-20 16:17:45 UTC (rev 2724)
+++ trunk/app/controllers/citations_controller.rb	2011-10-20 18:22:27 UTC (rev 2725)
@@ -60,7 +60,7 @@
     respond_to do |format|
       if @citation.update_attributes(params[:citation])
         flash[:notice] = 'Citation was successfully updated.'
-        format.html { redirect_to citation_url(@workflow, @citation) }
+        format.html { redirect_to workflow_citation_url(@workflow, @citation) }
       else
         format.html { render :action ="" "edit" }
       end
@@ -130,7 +130,7 @@
     (err = Citation.new.errors).add(attr, message)
     
     respond_to do |format|
-      format.html { redirect_to citations_url(params[:workflow_id]) }
+      format.html { redirect_to workflow_citations_url(params[:workflow_id]) }
     end
   end
   

Modified: trunk/app/views/citations/_citation.rhtml (2724 => 2725)


--- trunk/app/views/citations/_citation.rhtml	2011-10-20 16:17:45 UTC (rev 2724)
+++ trunk/app/views/citations/_citation.rhtml	2011-10-20 18:22:27 UTC (rev 2725)
@@ -13,6 +13,6 @@
 <% end %>
 
 <% if actions and Authorization.is_authorized?("edit", nil, item, current_user) %>
-	&nbsp;&nbsp;<small>[<%= link_to "view", citation_path(item, citation) %>]</small>
-	&nbsp;<small>[<%= link_to "edit", edit_citation_path(item, citation) %>]</small>
-<% end %>
\ No newline at end of file
+	&nbsp;&nbsp;<small>[<%= link_to "view", workflow_citation_path(item, citation) %>]</small>
+	&nbsp;<small>[<%= link_to "edit", edit_workflow_citation_path(item, citation) %>]</small>
+<% end %>

Modified: trunk/app/views/citations/_table.rhtml (2724 => 2725)


--- trunk/app/views/citations/_table.rhtml	2011-10-20 16:17:45 UTC (rev 2724)
+++ trunk/app/views/citations/_table.rhtml	2011-10-20 18:22:27 UTC (rev 2725)
@@ -26,9 +26,9 @@
     <td><%=formatted_issn citation.issn %></td>
     <% end %>
     <td class="actions">
-      <%= icon "show", citation_path(workflow, citation), nil, nil, "View" %> 
-      <% if logged_in? && Authorization.is_authorized?("edit", nil, @workflow, current_user) %><%= icon "edit", edit_citation_path(workflow, citation) %> <% end %>
-      <% if logged_in? && Authorization.is_authorized?("destroy", nil, @workflow, current_user) %><%= icon "destroy", citation_path(workflow, citation), nil, :confirm => 'Are you sure?', :method => :delete %><% end %>
+      <%= icon "show", workflow_citation_path(workflow, citation), nil, nil, "View" %> 
+      <% if logged_in? && Authorization.is_authorized?("edit", nil, @workflow, current_user) %><%= icon "edit", edit_workflow_citation_path(workflow, citation) %> <% end %>
+      <% if logged_in? && Authorization.is_authorized?("destroy", nil, @workflow, current_user) %><%= icon "destroy", workflow_citation_path(workflow, citation), nil, :confirm => 'Are you sure?', :method => :delete %><% end %>
     </td>
   </tr>
 <% end %>
@@ -38,4 +38,4 @@
 
 No citations
 
-<% end %>
\ No newline at end of file
+<% end %>

Modified: trunk/app/views/citations/index.rhtml (2724 => 2725)


--- trunk/app/views/citations/index.rhtml	2011-10-20 16:17:45 UTC (rev 2724)
+++ trunk/app/views/citations/index.rhtml	2011-10-20 18:22:27 UTC (rev 2725)
@@ -2,7 +2,7 @@
 
 <% if Authorization.is_authorized?("edit", nil, @workflow, current_user) %>
   <ul class="sectionIcons">
-    <li><%= icon('new', new_citation_path(@workflow), nil, nil, 'New Citation', nil) %></li>
+    <li><%= icon('new', new_workflow_citation_path(@workflow), nil, nil, 'New Citation', nil) %></li>
 	</ul>
 	<br/>
 <% end %>
@@ -20,4 +20,4 @@
       <%= i.to_i + 1 %>.  <%= render :partial => "citations/citation", :locals => { :citation => @citations[i], :item => @workflow } %>
     </p>
   <% end %>
-<% end %>
\ No newline at end of file
+<% end %>

Modified: trunk/app/views/citations/show.rhtml (2724 => 2725)


--- trunk/app/views/citations/show.rhtml	2011-10-20 16:17:45 UTC (rev 2724)
+++ trunk/app/views/citations/show.rhtml	2011-10-20 18:22:27 UTC (rev 2725)
@@ -3,11 +3,11 @@
 <ul class="sectionIcons">
   <% if logged_in? %>
     <% if Authorization.is_authorized?("edit", nil, @workflow, current_user) %>
-      <li><%= icon('edit', edit_citation_path(@workflow, @citation), nil, nil, 'Edit Citation') %></li>
+      <li><%= icon('edit', edit_workflow_citation_path(@workflow, @citation), nil, nil, 'Edit Citation') %></li>
     <% end %>
 
     <% if Authorization.is_authorized?("destroy", nil, @workflow, current_user) %>
-      <li><%= icon('destroy', citation_path(@workflow, @citation), nil, { :confirm => 'Are you sure?', :method => :delete }, 'Delete Citation') %></li>
+      <li><%= icon('destroy', workflow_citation_path(@workflow, @citation), nil, { :confirm => 'Are you sure?', :method => :delete }, 'Delete Citation') %></li>
     <% end %>
   <% end %>
 </ul>

Modified: trunk/app/views/contributions/_citations_tab.rhtml (2724 => 2725)


--- trunk/app/views/contributions/_citations_tab.rhtml	2011-10-20 16:17:45 UTC (rev 2724)
+++ trunk/app/views/contributions/_citations_tab.rhtml	2011-10-20 18:22:27 UTC (rev 2725)
@@ -16,10 +16,10 @@
 
     <% if Authorization.is_authorized?("edit", nil, item, current_user) %>
 	    <ul class="sectionIcons">
-	      <li><%= icon('new', new_citation_path(item), nil, nil, 'New Citation', nil) %></li>
-	      <li><%= icon('edit', citations_path(item), nil, nil, 'Edit Citations', nil) %></li>
+	      <li><%= icon('new', new_workflow_citation_path(item), nil, nil, 'New Citation', nil) %></li>
+	      <li><%= icon('edit', workflow_citations_path(item), nil, nil, 'Edit Citations', nil) %></li>
 	    </ul>
 	  <% end %>
 
   </div>
-</div>
\ No newline at end of file
+</div>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]