Skip to content

Commit

Permalink
adjust layout & helper
Browse files Browse the repository at this point in the history
  • Loading branch information
tsechingho committed Jul 9, 2009
1 parent a687642 commit 1a204b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/helpers/layout_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ def stylesheet(*args)

def javascript(*args)
args = args.map { |arg| arg == :defaults ? arg : arg.to_s }
content_for(:head) { javascript_include_tag(*args) }
content_for(:foot) { javascript_include_tag(*args) }
end
end
14 changes: 9 additions & 5 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title><%=h yield(:title) || t('common.titles.untitled') %></title>
<%= stylesheet_link_tag :all, :recursive => true %>
<%# stylesheet_link_tag :all, :recursive => true, :cache => true %>
<%= stylesheet_link_tag 'reset', 'application', :cache => true %>
<style type="text/css">
#user_pannel, #locale_pannel, #locale_pannel form {display: inline}
</style>
<%= javascript_include_tag :defaults %>
<%= yield(:head) %>
<%= yield :head %>
</head>
<body>
<!--[if lt IE 7]><body class="ie6"><![endif]-->
<!--[if gte IE 7]><body class="ie"><![endif]-->
<!--[if !IE]>--><body><!--<![endif]-->
<div id="container">
<%= render :partial => 'users/pannel' %>

<hr class="clear" />

<%- flash.each do |name, msg| -%>
<%= content_tag :p, msg, :id => "flash_#{name}", :class => "notice" %>
<%= content_tag :p, msg, :id => "flash_#{name}", :class => name %>
<%- end -%>

<%- if show_title? -%>
Expand All @@ -28,5 +30,7 @@

<%= yield %>
</div>
<%= javascript_include_tag :defaults, :cache => true %>
<%= yield :foot %>
</body>
</html>

0 comments on commit 1a204b5

Please sign in to comment.