myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2599] trunk/app/views: fixed edit relationships


From: noreply
Subject: [myexperiment-hackers] [2599] trunk/app/views: fixed edit relationships view
Date: Fri, 3 Jun 2011 07:38:06 -0400 (EDT)

Revision
2599
Author
dgc
Date
2011-06-03 07:38:05 -0400 (Fri, 03 Jun 2011)

Log Message

fixed edit relationships view

Modified Paths

Diff

Modified: trunk/app/views/packs/show.rhtml (2598 => 2599)


--- trunk/app/views/packs/show.rhtml	2011-06-03 10:33:43 UTC (rev 2598)
+++ trunk/app/views/packs/show.rhtml	2011-06-03 11:38:05 UTC (rev 2599)
@@ -88,7 +88,7 @@
 				Relationships <span class="count_text">(<%= @pack.relationships.length -%>)</span>
 			</h4>
 
-			<%= render :partial => "relationships/relationships", :locals => { :relationships => @pack.relationships, :show_delete => true } -%>
+			<%= render :partial => "relationships/relationships", :locals => { :pack => @pack, :show_delete => true } -%>
 			
       <% if @authorised_to_edit %>
         <br />

Modified: trunk/app/views/relationships/_relationships.rhtml (2598 => 2599)


--- trunk/app/views/relationships/_relationships.rhtml	2011-06-03 10:33:43 UTC (rev 2598)
+++ trunk/app/views/relationships/_relationships.rhtml	2011-06-03 11:38:05 UTC (rev 2599)
@@ -1,4 +1,5 @@
-<% can_edit = Authorization.check(:action ="" 'edit', :object => @pack, :user => current_user) %>
+<% can_edit = Authorization.check(:action ="" 'edit', :object => pack, :user => current_user) %>
+<% relationships = pack.relationships %>
 
 <% if relationships.empty? %>
 

Modified: trunk/app/views/relationships/edit_relationships.rhtml (2598 => 2599)


--- trunk/app/views/relationships/edit_relationships.rhtml	2011-06-03 10:33:43 UTC (rev 2598)
+++ trunk/app/views/relationships/edit_relationships.rhtml	2011-06-03 11:38:05 UTC (rev 2599)
@@ -34,7 +34,7 @@
 <h2>Relationships</h2>
 
 <div id="relationshipsElement">
-  <%= render(:partial => "relationships", :locals => { :relationships => @relationships, :show_delete => true }) -%>
+  <%= render(:partial => "relationships", :locals => { :pack => @context, :show_delete => true }) -%>
 </div>
 
 <p style="text-align: center">

reply via email to

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