myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2853] trunk: fixed issue with showing pack relat


From: noreply
Subject: [myexperiment-hackers] [2853] trunk: fixed issue with showing pack relationships and deleted pack items
Date: Tue, 29 Nov 2011 06:52:41 -0500 (EST)

Revision
2853
Author
dgc
Date
2011-11-29 06:52:40 -0500 (Tue, 29 Nov 2011)

Log Message

fixed issue with showing pack relationships and deleted pack items

Modified Paths

Diff

Modified: trunk/app/models/pack_remote_entry.rb (2852 => 2853)


--- trunk/app/models/pack_remote_entry.rb	2011-11-29 11:51:55 UTC (rev 2852)
+++ trunk/app/models/pack_remote_entry.rb	2011-11-29 11:52:40 UTC (rev 2853)
@@ -1,4 +1,4 @@
-# myExperiment: app/models/pack_remote_entry.rb
+#/ myExperiment: app/models/pack_remote_entry.rb
 #
 # Copyright (c) 2008 University of Manchester and the University of Southampton.
 # See license.txt for details.
@@ -31,4 +31,8 @@
     # Rails 2 - use pack.destroyed? instead of pack.contribution.nil?
     pack.touch unless pack.contribution.nil?
   end
+
+  def available?
+    true
+  end
 end

Modified: trunk/app/views/relationships/_relationships.rhtml (2852 => 2853)


--- trunk/app/views/relationships/_relationships.rhtml	2011-11-29 11:51:55 UTC (rev 2852)
+++ trunk/app/views/relationships/_relationships.rhtml	2011-11-29 11:52:40 UTC (rev 2853)
@@ -10,7 +10,11 @@
   <ol class="relationship_sentences">
     <% relationships.each do |relationship| %>
       <li>
-        <%= pack_entry_link(relationship.subject) -%>
+        <% if relationship.subject.available? %>
+            <%= pack_entry_link(relationship.subject) -%>
+        <% else %>
+          <span class="deletedPackItem">deleted item</span>
+        <% end %>
 
         <% if relationship.predicate.phrase %>
           <%=h relationship.predicate.phrase -%>
@@ -18,7 +22,11 @@
           <%=h relationship.predicate.preferred_label.text.underscore.humanize.downcase -%>
         <% end %>
 
-        <%= pack_entry_link(relationship.objekt) -%>.
+        <% if relationship.objekt.available? %>
+          <%= pack_entry_link(relationship.objekt) -%>.
+        <% else %>
+          <span class="deletedPackItem">deleted item</span>
+        <% end %>
 
         <% if can_edit && defined?(show_delete) && show_delete %>
           <%= link_to_remote("<img src='' />",

Modified: trunk/public/stylesheets/styles.css (2852 => 2853)


--- trunk/public/stylesheets/styles.css	2011-11-29 11:51:55 UTC (rev 2852)
+++ trunk/public/stylesheets/styles.css	2011-11-29 11:52:40 UTC (rev 2853)
@@ -1886,6 +1886,10 @@
 #packItems .user {
 }
 
+.deletedPackItem {
+  color: gray;
+}
+
 table.quick_add {
 	border-collapse: collapse; 
 	width: 99%;

reply via email to

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