application-ng.rhtml 4.48 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= html_language %>" lang="<%= html_language %>">
  <head>
    <title><%= h page_title %></title>
    <%= yield(:feeds) %>
    <!--<meta http-equiv="refresh" content="1"/>-->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="<%= @environment.name %>" />
    <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
    <%= noosfero_javascript %>
    <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
    <%= stylesheet_link_tag template_stylesheet_path %>
    <%= stylesheet_link_tag icon_theme_stylesheet_path %>
    <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
    <% @plugins.enabled_plugins.each do |plugin| %>
      <% if plugin.stylesheet? %>
        <%= stylesheet_tag plugin.class.public_path('style.css'), {} %>
      <% end %>
    <% end %>
    <%= stylesheet_link_tag theme_stylesheet_path %>

    <%# Add custom tags/styles/etc via content_for %>
    <%= yield :head %>
    <%= javascript_tag('render_all_jquery_ui_widgets()') %>
    <% @plugins.enabled_plugins.each do |plugin| %>
      <% plugin.js_files.each do |js_file| %>
        <%= javascript_src_tag plugin.class.public_path(js_file), {} %>
      <% end %>
    <% end %>
    <%=
      @plugins.map(:head_ending).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>
  </head>
  <body class="<%=
    # Identify the current controller and action for the CSS:
    " controller-"+ @controller.controller_name() +
    " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
    " template-"+ ( profile.nil? ? "default" : profile.layout_template ) +
    (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "")
    %>" >

    <a href="#content" id="link-go-content"><span><%= _("Go to the content") %></span></a>
    <%=
      @plugins.map(:body_beginning).collect do |content|
        content.respond_to?(:call) ? content.call : content
      end.join("\n")
    %>

    <div id="wrap-1">
      <div id='theme-header'>
        <%= theme_header %>
      </div>
      <div id="wrap-2">
        <div id="user">
          <span class='logged-in' style='display: none;'>
            <%= usermenu_logged_in %>
          </span>
          <span class='not-logged-in' style='display: none'>
              <%= _("<span class='login'>%s</span> <span class='or'>or</span> <span class='signup'>%s</span>") % [thickbox_inline_popup_link('<i class="icon-menu-login"></i><strong>' + _('Login') + '</strong>', login_url, 'inlineLoginBox', :id => 'link_login'), link_to('<strong>' + _('Register') + '</strong>', :controller => 'account', :action => 'signup') ] %>
              <div id='inlineLoginBox' style='display: none;'>
                <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>
              </div>
          </span>
          <form action="/search" class="search_form" method="get" class="clean">
            <input name="query" size="15" value="<%=_('Search...')%>"
                onfocus="this.form.className='focused';
                         if(this.value=='<%=_('Search...')%>'){this.value=''}"
                onblur="this.form.className='';
                        if(/^\s*$/.test(this.value)){
                          this.value='<%=_('Search...')%>';
                          this.form.className='clean'
                        }" />
            <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div>
          </form>
        </div><!-- end id="user" -->

        <h1 id="site-title">
          <%= theme_site_title %>
        </h1>
        <div id="navigation">
          <ul>
            <%= theme_extra_navigation %>
          </ul>
          <div id="navigation-end"></div>
        </div><!-- end id="navigation" -->
        <div id="content">
          <div id="content-inner">
            <%= insert_boxes(yield) %>
            <br style='clear: both'/>
          </div><!-- end id="content-inner" -->
        </div><!-- end id="content" -->
      </div><!-- end id="wrap-2" -->
    </div><!-- end id="wrap-1" -->
    <%= render_environment_features(:logged_in) %>
    <div id="theme-footer">
      <%= theme_footer %>
    </div><!-- end id="theme-footer" -->
    <%= noosfero_layout_features %>
    <%= theme_javascript_ng %>
  </body>
</html>