Klaus KXXmpf write:
ref: refs/heads/master commit d1e9f121df16fe85120b62f0d961c276e5013234 Author: Klaus Kأ¤mpf <kkaempf@suse.de> Date: Tue Nov 24 11:16:12 2009 +0100
Better indentation
webclient/app/views/layouts/main.rhtml | 64 ++++++++++++++++--------------- 1 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/webclient/app/views/layouts/main.rhtml b/webclient/app/views/layouts/main.rhtml index 6e5f44f..cd161be 100644 --- a/webclient/app/views/layouts/main.rhtml +++ b/webclient/app/views/layouts/main.rhtml @@ -48,19 +48,19 @@ <h1><%= _("My Appliance") %></h1>
<div id="login-wrapper">
<% host = Host.find(session[:host]) rescue nil
user = session[:user]
if host.blank? || user.blank? -%>
<% else -%>
<ul>
-%></strong></li> - <li><%=_("User:")%> <strong><%= user -%></strong></li><li><%=_("Connected host:")%> <strong><%= host.name
</ul>
<ul class='header-links'>
'/controlpanel'%></em></li> - <li><em><%= link_to _("Logout"), '/logout' %></em></li> - </ul><li><em><%= link_to _("Control panel"),
<% end -%>
<% host = Host.find(session[:host]) rescue nil
user = session[:user]
if host.blank? || user.blank? -%>
<% else -%>
Ugh, WTF (I know that klaus doesn't write that code)? use unless and then see if ... which do nothing and immediately else if really not good practice.
<ul>
-%></strong></li> + <li><%=_("User:")%> <strong><%= user -%></strong></li> + </ul><li><%=_("Connected host:")%> <strong><%= host.name
<ul class='header-links'>
'/controlpanel'%></em></li> + <li><em><%= link_to _("Logout"), '/logout' %></em></li> + </ul><li><em><%= link_to _("Control panel"),
</div><% end -%> </div>
@@ -68,33 +68,35 @@
<!-- here both flash and dynamic notifications should be added --> <div id="flash-messages" class="grid_12 alpha">
<div id="language_selection"></div>
<!-- show the flash messages -->
<div id="language_selection"></div>
<!-- show the flash messages -->
<% flash.each do |flash_type, message| %>
<%
flash_icon = case flash_type
when :error then "ui-icon-alert"
else "ui-icon-info"
end
flash_style = case flash_type
when :error then "ui-state-error"
else "ui-state-highlight"
end
%>
<% flash.each do |flash_type, message| %>
<%
flash_icon = case flash_type
when :error then "ui-icon-alert"
else "ui-icon-info"
end
flash_style = case flash_type
when :error then "ui-state-error"
else "ui-state-highlight"
end
%>
grid_12"> - <p><span class="ui-icon <%= flash_icon %>"></span><strong><%= message %></strong></p> - </div><div class="flash-message <%= flash_style %> ui-corner-all
<% flash.delete flash_type -%>
<% end %>
grid_12"> + <p><span class="ui-icon <%= flash_icon %>"></span><strong><%= message %></strong></p> + </div><div class="flash-message <%= flash_style %> ui-corner-all
<% flash.delete flash_type -%>
<% end %> </div> <!-- flash messages -->
</div><div id="progress" style="display: none;"> <%= image_tag("/images/working.gif") %><%=_("...Wait...")%> </div> <%= yield %>
<div id="footer" class="container_12"> <div class="copy">© 2009 Novell, Inc.</div> </div>
-- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast (language,time,basesystem,ntp) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org