From 073231df9b01ae2bb8340efbe1f05134b95f6b59 Mon Sep 17 00:00:00 2001 From: Jan Schulz-Hofen Date: Thu, 18 May 2017 12:13:26 +0200 Subject: [PATCH 3/4] Make common/_tabs partial usable without JS partial switching When no :partial is given, render regular links causing regular page refreshes. --- app/views/common/_tabs.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/common/_tabs.html.erb b/app/views/common/_tabs.html.erb index 26a1c08..1b880c9 100644 --- a/app/views/common/_tabs.html.erb +++ b/app/views/common/_tabs.html.erb @@ -4,7 +4,7 @@
  • <%= link_to l(tab[:label]), (tab[:url] || { :tab => tab[:name] }), :id => "tab-#{tab[:name]}", :class => (tab[:name] != selected_tab ? nil : 'selected'), - :onclick => "showTab('#{tab[:name]}', this.href); this.blur(); return false;" %>
  • + :onclick => tab[:partial] ? "showTab('#{tab[:name]}', this.href); this.blur(); return false;" : nil %> <% end -%>