osbridge/openconferenceware

View on GitHub
app/views/layouts/open_conference_ware/application.html.erb

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="<%= OpenConferenceWare.tagline %>">
    <meta name="author" content="">
    <meta property="og:title" content="<%= page_title %>"/>
    <%= csrf_meta_tag %>
    <%= yield :meta %>

    <link rel="shortcut icon" href="../../assets/ico/favicon.png">
    <title><%= page_title %> / <%= OpenConferenceWare.organization %>: <%= OpenConferenceWare.tagline %></title>

    <!-- Feeds -->
    <%= auto_discovery_link_tag(:atom, proposals_path(:format => :atom), :title => "#{OpenConferenceWare.organization}: Proposals feed") %>
    <% if admin? %>
      <%= auto_discovery_link_tag(:atom, comments_path(:format => :atom, :secret => OpenConferenceWare::CommentsController::SECRET), :title => "#{OpenConferenceWare.organization}: Proposals comments feed") %>
    <% end %>

    <!-- Stylesheets -->
    <%= stylesheet_link_tag 'open_conference_ware/application' %>
    <%= yield :stylesheets %>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <%= javascript_include_tag 'open_conference_ware/ie' %>
    <![endif]-->

    <!-- Dynamic styles -->
    <% cache "layout,event_track_styles,event_#{current_event_cache_key}" do %>
      <% if event_tracks? && assigned_events %>
        <style type="text/css" media="screen">
          <%= render :partial => 'open_conference_ware/tracks/colors', :formats => [:css], :locals => {:tracks => assigned_events.map(&:tracks_combined).flatten} %>
        </style>
      <% end %>
    <% end %>

    <!-- Scripts -->
    <%= javascript_include_tag 'open_conference_ware/application' %>
    <%= yield :scripts -%>

    <% expose_to_js( :current_user, logged_in? ? current_user.id : false ) -%>
    <% expose_to_js( :authenticity_token, form_authenticity_token ) if protect_against_forgery? -%>

    <script type="text/javascript" charset="utf-8">
      $(document).ready(function() {
  <%=       indent_block( yield(:javascript_expose_values), 3) -%>
  <%=       indent_block( yield(:javascript_on_ready), 3) -%>
      });
    </script>
  </head>
  <body class='<%= "#{controller.controller_name} #{action_name}" %> <%= "#{controller.controller_name}_#{action_name}" %>'>
    <a name='top'></a>
    <div id="wrapper" class="container">
      <%= render :partial => "layouts/open_conference_ware/header" %>

      <div id="content">
        <h2 class='page_title'><%= page_title %></h2>

        <% if false && @breadcrumbs %>
          <ol class="breadcrumb">
            <% @breadcrumbs[0..-2].each do |breadcrumb| %>
               <% txt, path = breadcrumb %>
               <li><%= link_to(h(txt), path) %></li>
            <% end %>
          </div>
        <% end %>

        <!-- Display notices -->
        <%# flash[:success] = "This test is for testing the notifications." %>
        <%# flash[:failure] = "This test is for testing the notifications." %>
        <%# flash[:notice] = "This test is for testing the notifications." %>
        <%= notice %>

        <!-- Display view's content -->
        <%= yield %>
      </div><!-- content -->

      <div id="footer">
        <ul class="xoxo">
          <li id="subscribe-to">
            <h3>Subscribe to</h3>
            <ul>
              <li class="pre-bulletted"><%= link_to "Proposals feed", proposals_path(:format => :atom), :class => :feedable %></li>
              <% if admin? %>
                <li class="pre-bulletted"><%= link_to "Comments feed", comments_path(:format => :atom, :secret => OpenConferenceWare::CommentsController::SECRET), :class => 'feedable' %></li>
              <% end %>
            </ul>
          </li>
        </ul>
        &copy; <%= Date.today.year %> <%= OpenConferenceWare.organization %>
      </div>
  </div><!--wrapper -->

  <%= hidden_field_tag(:current_user_id, current_user.id) if logged_in? %>

  <!-- arbitrary javascript from views -->

  <script type="text/javascript">
    <%= yield :javascript %>
  </script>

</body>
</html>