myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3698] branches/packs/app: added link to the RO c


From: noreply
Subject: [myexperiment-hackers] [3698] branches/packs/app: added link to the RO context when annotations refer to them
Date: Tue, 10 Sep 2013 14:57:20 +0000 (UTC)

Revision
3698
Author
dgc
Date
2013-09-10 14:57:20 +0000 (Tue, 10 Sep 2013)

Log Message

added link to the RO context when annotations refer to them

Modified Paths

Diff

Modified: branches/packs/app/helpers/items_helper.rb (3697 => 3698)


--- branches/packs/app/helpers/items_helper.rb	2013-09-10 12:11:37 UTC (rev 3697)
+++ branches/packs/app/helpers/items_helper.rb	2013-09-10 14:57:20 UTC (rev 3698)
@@ -51,6 +51,11 @@
 
   def resource_link(resource)
 
+    if resource.kind_of?(Pack)
+      return "<span class='resource-link'>#{image_tag("manhattan_studio/folder-closed_16.png")}" +
+             " #{link_to(h(resource.label), polymorphic_path(resource))}</span>"
+    end
+
     association = find_association(resource)
 
     image = "<img src=''>"

Modified: branches/packs/app/views/annotations/_annotation.html.erb (3697 => 3698)


--- branches/packs/app/views/annotations/_annotation.html.erb	2013-09-10 12:11:37 UTC (rev 3697)
+++ branches/packs/app/views/annotations/_annotation.html.erb	2013-09-10 14:57:20 UTC (rev 3698)
@@ -36,6 +36,8 @@
               <% resource = context.find_resource_by_path(value) -%>
               <% if resource %>
                 <%= resource_link(context.find_resource_by_path(value)) -%>
+              <% elsif value.to_s == context.research_object.uri.to_s %>
+                <%= resource_link(context) -%>
               <% else %>
                 <%= link_to(h(value), value, :rel => 'nofollow') -%>
               <% end %>

reply via email to

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