From df6d28640a93c933b8d2866546306a1a968e1cdf Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Thu, 9 May 2013 13:34:35 -0300 Subject: [PATCH] Including a link to the start of the catalog on catalog categories left block --- app/models/enterprise.rb | 4 ++++ app/views/catalog/index.rhtml | 3 ++- public/stylesheets/application.css | 6 +++--- test/unit/enterprise_test.rb | 8 ++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb index 5001a69..fc19707 100644 --- a/app/models/enterprise.rb +++ b/app/models/enterprise.rb @@ -185,4 +185,8 @@ class Enterprise < Organization Scrap.find_by_sql("SELECT id, updated_at, 'Scrap' AS klass FROM scraps WHERE scraps.receiver_id = #{self.id} AND scraps.scrap_id IS NULL UNION SELECT id, updated_at, 'ActionTracker::Record' AS klass FROM action_tracker WHERE action_tracker.target_id = #{self.id} UNION SELECT action_tracker.id, action_tracker.updated_at, 'ActionTracker::Record' AS klass FROM action_tracker INNER JOIN articles ON action_tracker.target_id = articles.id WHERE articles.profile_id = #{self.id} AND action_tracker.target_type = 'Article' ORDER BY action_tracker.updated_at DESC") end + def catalog_url + { :profile => identifier, :controller => 'catalog'} + end + end diff --git a/app/views/catalog/index.rhtml b/app/views/catalog/index.rhtml index 34fd648..d5be460 100644 --- a/app/views/catalog/index.rhtml +++ b/app/views/catalog/index.rhtml @@ -7,7 +7,8 @@