myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [1886] branches/event_logging/app/helpers/applica


From: noreply
Subject: [myexperiment-hackers] [1886] branches/event_logging/app/helpers/application_helper.rb: Work on news generation.
Date: Fri, 24 Oct 2008 13:18:34 -0400 (EDT)

Revision
1886
Author
alekses6
Date
2008-10-24 13:18:34 -0400 (Fri, 24 Oct 2008)

Log Message

Work on news generation. Changed presentation of versioned items added to a pack: "[X]" with X standing for version number is added to every relevant news entry.

Modified Paths

Diff

Modified: branches/event_logging/app/helpers/application_helper.rb (1885 => 1886)


--- branches/event_logging/app/helpers/application_helper.rb	2008-10-24 15:47:40 UTC (rev 1885)
+++ branches/event_logging/app/helpers/application_helper.rb	2008-10-24 17:18:34 UTC (rev 1886)
@@ -1560,9 +1560,14 @@
                # ..and check if local entry (and the item it points to) can still be found
                contributable_entry = PackContributableEntry.find(log_entry.activity_loggable_id)
                object, object_path = evaluate_object_instance_and_path(contributable_entry.contributable_type, contributable_entry.contributable_id)
-               object_path += "?version=#{contributable_entry.contributable_version}" unless contributable_entry.contributable_version.nil? 
                object_visible_name = contributable_name_from_instance(object)
                
+               unless contributable_entry.contributable_version.nil?
+                 version = contributable_entry.contributable_version
+                 object_path += "?version=#{version}"
+                 object_visible_name += " [#{version}]"
+               end
+               
                authorized = false unless my_event || object.authorized?("view", current_viewer)
                
                if authorized

reply via email to

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