]> source.dussan.org Git - redmine.git/commitdiff
Fixed: an error is raised when no tab is available on project settings (#3179).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 19 Apr 2009 08:45:00 +0000 (08:45 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 19 Apr 2009 08:45:00 +0000 (08:45 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2674 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/settings.rhtml

index c7b0f5006c220156823492c2e4aa17d5ca037ba4..e8be1a091122f77019491c78de9e6fc704a57b8a 100644 (file)
@@ -1,6 +1,8 @@
 <h2><%=l(:label_settings)%></h2>
 
 <% tabs = project_settings_tabs %>
+
+<% if tabs.any? %>
 <% selected_tab = params[:tab] ? params[:tab].to_s : tabs.first[:name] %>
 
 <div class="tabs">
@@ -20,5 +22,8 @@
                        :style => (tab[:name] != selected_tab ? 'display:none' : nil),
                        :class => 'tab-content') %>
 <% end -%>
+<% else %>
+<p class="nodata"><%= l(:label_no_data) %></p>
+<% end %>
 
 <% html_title(l(:label_settings)) -%>