Skip to content

Instantly share code, notes, and snippets.

@gabrieltong
Created February 18, 2014 08:11
Show Gist options
  • Select an option

  • Save gabrieltong/9066649 to your computer and use it in GitHub Desktop.

Select an option

Save gabrieltong/9066649 to your computer and use it in GitHub Desktop.
bootstrap layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= content_for?(:title) ? yield(:title) : "RailsWanguo" %></title>
<%= csrf_meta_tags %>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
<![endif]-->
<%= stylesheet_link_tag "application", :media => "all" %>
<!-- For third-generation iPad with high-resolution Retina display: -->
<!-- Size should be 144 x 144 pixels -->
<!-- Size should be 32 x 32 pixels -->
<%= javascript_include_tag "application" %>
</head>
<body>
<%= nav_bar :fixed => :top, :brand => "考拉", :responsive => true do %>
<%= menu_group do %>
<%=menu_item '下载', entrance_download_path %>
<% if current_user && can?(:view,School) %>
<%=menu_item '学员列表', people_path %>
<% end %>
<% if current_user && can?(:view,School) %>
<%=menu_item '课程管理', schools_path %>
<% end %>
<% if current_user && can?(:view,Book) %>
<%=menu_item '书籍管理', books_path %>
<% end %>
<% if current_user && can?(:valid,Captcha) %>
<%=menu_item '查看验证码',captchas_valid_path%>
<% end %>
<% if current_user && can?(:view,Import) %>
<%=menu_item '导入数据', imports_path %>
<% end %>
<% if current_user && can?(:view,Law) %>
<%=menu_item '法条班数据', laws_path %>
<% end %>
<% if current_user && can?(:view,Freelaw) %>
<%=menu_item '免费法条', freelaws_path %>
<% end %>
<% if current_user && can?(:view,Question) %>
<%=menu_item '历年真题', questions_path %>
<% end %>
<%=menu_item '统计信息', 'http://www.umeng.com/apps/' %>
<%=menu_item '通知', 'http://developer.baidu.com/console#push!appid=1730770' %>
<% end %>
<%= menu_group :pull => :right do %>
<% if current_user %>
<%= menu_item "注销", sign_out_path, method: :delete %>
<% else %>
<%= menu_item "登陆", sign_in_path %>
<% end %>
<% end %>
<% end %>
<div class="container">
<div class="row">
<div class="span12">
<br/>
<br/>
<br/>
<%= bootstrap_flash %>
<%= yield %>
</div>
</div><!--/row-->
<br/><br/><br/><br/>
</div> <!-- /container -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment