myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3110] branches/events/app/views/widgets/_user_ta


From: noreply
Subject: [myexperiment-hackers] [3110] branches/events/app/views/widgets/_user_tabnav.rhtml: hide user tabs that have no content
Date: Sat, 25 Aug 2012 05:54:56 +0000 (UTC)

Revision
3110
Author
dgc
Date
2012-08-25 05:54:56 +0000 (Sat, 25 Aug 2012)

Log Message

hide user tabs that have no content

Modified Paths

Diff

Modified: branches/events/app/views/widgets/_user_tabnav.rhtml (3109 => 3110)


--- branches/events/app/views/widgets/_user_tabnav.rhtml	2012-08-24 22:58:01 UTC (rev 3109)
+++ branches/events/app/views/widgets/_user_tabnav.rhtml	2012-08-25 05:54:56 UTC (rev 3110)
@@ -57,23 +57,29 @@
     end
   end
          
-  add_tab do |t|
-    t.named 'Credits'
-    t.titled 'Credits'
-    t.links_to :action ="" 'credits', :id => @user.id
-  end 
+  unless @user.creditations.empty?
+    add_tab do |t|
+      t.named 'Credits'
+      t.titled 'Credits'
+      t.links_to :action ="" 'credits', :id => @user.id
+    end 
+  end
          
-  add_tab do |t|
-    t.named 'Tags by User'
-    t.titled 'Tags by User'
-    t.links_to :action ="" 'tags', :id => @user.id
+  unless @user.bookmarks.empty?
+    add_tab do |t|
+      t.named 'Tags by User'
+      t.titled 'Tags by User'
+      t.links_to :action ="" 'tags', :id => @user.id
+    end
   end
 
-	add_tab do |t|
-    t.named 'Favourites'
-    t.titled 'Favourites'
-    t.links_to :action ="" 'favourites', :id => @user.id
-  end 
+  unless @user.tags.empty?
+    add_tab do |t|
+      t.named 'Favourites'
+      t.titled 'Favourites'
+      t.links_to :action ="" 'favourites', :id => @user.id
+    end 
+  end
 
   #add_tab do |t|
   #  t.named 'Home'

reply via email to

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