/app/views/layouts/application.html.erb

https://github.com/lamhaianh/ror_ecommerce · Ruby HTML · 111 lines · 90 code · 15 blank · 6 comment · 3 complexity · 80e830d8f990254d7074fb24feccf8c7 MD5 · raw file

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>
  5. <%= site_name %>: <%= yield :title %>
  6. </title>
  7. <%#= stylesheet_link_tag :all %>
  8. <%= stylesheet_link_tag 'buttons.css', :media => 'screen, projection' %>
  9. <%= stylesheet_link_tag 'screen.css', :media => 'screen, projection' %>
  10. <%= stylesheet_link_tag 'link_icons.css', :media => 'screen, projection' %>
  11. <%= stylesheet_link_tag 'sprite.css' %>
  12. <%= stylesheet_link_tag 'print.css', :media => 'print'%>
  13. <%= stylesheet_link_tag 'main.css' %>
  14. <!--[if lt IE 8]
  15. <%= stylesheet_link_tag 'ie.css', :media => 'screen, projection'%>
  16. <![endif]-->
  17. <!--[if lt IE 7]
  18. <%= stylesheet_link_tag 'ie6.css', :media => 'screen, projection' %>
  19. <![endif]-->
  20. <%= csrf_meta_tag %>
  21. <%= javascript_include_tag 'jquery-1.5.2.min', 'rails', 'jquery-ui-1.8.12.custom.min','application' %>
  22. <%= yield :head %>
  23. </head>
  24. <body >
  25. <div class="bp">
  26. <%= raw "<p class='flash_notice'> #{notice}</p>" if notice %>
  27. <%= raw "<p class='flash_error'>#{alert}</p>" if alert %>
  28. </div>
  29. <div class=" bp">
  30. <div id="header_wrapper" class='bp'>
  31. <div class="container logged-in" id="header">
  32. <h1 id="logo">
  33. <%= link_to image_tag( "logos/#{Image::MAIN_LOGO}.png", :alt => 'hadean image.'), root_path %>
  34. <%#= link_to 'RoR Ecommerce', root_path %>
  35. </h1>
  36. <ul id="menu-main">
  37. <li id="menu-main-discover">
  38. <a href="/"><strong>Commerce</strong> <span>that scales</span></a>
  39. </li>
  40. <li class="" id="menu-main-cart">
  41. <%= link_to(shopping_cart_items_path, :id => 'cart_items_buttons') do %>
  42. <strong> Cart </strong> <span>view your stuff.</span>
  43. <% end %>
  44. </li>
  45. <li class="" id="menu-main-wish">
  46. <%= link_to(wish_items_path, :id => 'wish_items_button') do %>
  47. <strong> Wish List </strong> <span>what you want.</span>
  48. <% end %>
  49. </li>
  50. <li class="" id="menu-main-user">
  51. <div>
  52. <% unless most_likely_user %>
  53. <strong><%= link_to 'Login', login_path %></strong> or
  54. <span><%= link_to 'Sign up', signup_path %></span>
  55. <% else %>
  56. <strong>Hi <%= most_likely_user.first_name %></strong>
  57. <span>(<%= link_to 'not you?', logout_path %>)</span>
  58. <% end %>
  59. </div>
  60. </li>
  61. </ul>
  62. <%= form_for search_product, :html => {:class => 'search'} do %>
  63. <div class="field search">
  64. <span class="icon-search"></span>
  65. <%= text_field_tag 'q', nil , :class => 'input-search text', :id => 'term' %>
  66. <%= submit_tag 'Go', :class => 'button spade' %>
  67. </div>
  68. <% end %>
  69. </div>
  70. </div>
  71. <div id="sub_header_wrapper" class='bp'>
  72. <div id="sub_sub_header_wrapper" class='container'>
  73. <%= render 'shared/main_product_tabs' %>
  74. </div>
  75. </div>
  76. </div>
  77. <div id='content_wrapper' class='container'>
  78. <%= yield %>
  79. </div>
  80. </div>
  81. <%= render 'shared/main_footer' %>
  82. <%= yield :bottom %>
  83. <script>
  84. jQuery(window).ready(
  85. function() {
  86. jQuery('.flash_notice').delay(6000).slideUp( 'slow');
  87. jQuery('.flash_error').delay(6000).slideUp( 'slow');
  88. }
  89. );
  90. </script>
  91. <%# javascript_include_tag :defaults %>
  92. <%#= javascript_include_tag 'jquery-1.4.2.min', 'rails' %>
  93. <%#= javascript_include_tag :all, :cache => true %>
  94. </body>
  95. <%= yield :below_body %>
  96. </html>