[yast-devel] Re: [yast-commit] <web-client> master : - control panel: skip the plugins without data (bnc#557131) - 0.0.16
On Fri, Nov 20, 2009 at 09:46:13AM +0100, Jiri Suchomel wrote:
ref: refs/heads/master commit d27da79f667358dd476c72324775d5ad0222f8ad Author: Jiri Suchomel <jsuchome@suse.cz> Date: Fri Nov 20 09:46:13 2009 +0100
- control panel: skip the plugins without data (bnc#557131) - 0.0.16 --- webclient/app/views/controlpanel/index.rhtml | 1 + webclient/package/yast2-webclient.changes | 6 ++++++ webclient/package/yast2-webclient.spec | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/webclient/app/views/controlpanel/index.rhtml b/webclient/app/views/controlpanel/index.rhtml index d07fb56..a91590e 100644 --- a/webclient/app/views/controlpanel/index.rhtml +++ b/webclient/app/views/controlpanel/index.rhtml @@ -66,6 +66,7 @@ <div class="list-row overview">
<% @shortcuts.each do |name, data| %> + <% next if data.nil? || data.empty? %> "next if data.blank?", see http://api.rubyonrails.org/classes/Object.html#M000279
But there is no test case. Because there is no model for the shortcuts. It is all in the controlpanel controller. Why should we deal with an empty shortcut? I don't like adding more (questionable) logic to code that is too complex already. Please simply remove the shortcut file instead (or rename to disabled-shortcut.yml). -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
On Friday 20 of November 2009 10:05:24 Martin Vidner wrote:
But there is no test case. Because there is no model for the shortcuts. It is all in the controlpanel controller. Why should we deal with an empty shortcut?
From the perspective of a user dealing with shortcut.yml, commenting its entries seemed to be more understandable than renaming a file. j -- Jiri Suchomel SUSE LINUX, s.r.o. e-mail: jsuchome@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Praha 9, Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Jiří Suchomel
-
Martin Vidner