application.rhtml 7.44 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="pt-br" lang="pt-br">
  <head>
    <title>
      <%= @environment.name() %>
      <%- if @category -%>
        &rarr; <%= @category.full_name -%>
      <%- end -%>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="FIXME: Descriptions of Noosfero" />
    <meta name="keywords" content="Noosfero, Community, Open Source" />
    <link rel="shortcut icon" href="<%= '/designs/themes/' + current_theme + '/images/favicon.ico' %>" type="image/x-icon" />

    <%= javascript_include_tag 'default-config' %>
    <%= javascript_include_tag :defaults %>
    <%# javascript_include_tag 'animator' %>

    <%= javascript_include_tag 'jquery-latest.js' %>
    <script type="text/javascript">
      jQuery.noConflict();
    </script>
    <%= javascript_include_tag 'thickbox.js' %>

    <%= javascript_include_tag 'menu' %>
    <%= javascript_include_tag 'auto-open-menu' %>
    <%= include_lightbox_header %>
    <%= javascript_include_tag 'cms' if @controller.controller_name == 'cms' %>
    <%= theme_javascript %>

    <%#
     stylesheet_import is better then stylesheet_link_tag because the stylesheet
     must be loaded before the page show.
    %>
    <%=
      # Load the principal css files:
      stylesheet_import( %w( common help menu article button search blocks forms login-box thickbox )
                         ) + "\n" +
      stylesheet_import( %w( common help menu article button search blocks forms login-box ),
                         :themed_source => true ) + "\n" +
      # Load the boxes's css file if each exists:
      import_blocks_stylesheets +
      # Load the controller's css file if it exists:
      stylesheet_import( "controller_"+ @controller.controller_name() ) + "\n" +
      stylesheet_import( "controller_"+ @controller.controller_name(), :themed_source => true )
    %>

    <%# FIXME %>
    <%= stylesheet_link_tag '/designs/templates/default/stylesheets/style.css' %>
    <%= stylesheet_link_tag '/designs/icons/default/style.css' %>

    <base href="<%= environment.top_url %>"/>
  </head>

  <body class='noosfero category<%= category_color %><%=
    # Identify the current controller and action for the CSS:
    " controller_"+ @controller.controller_name() +
    " action_"+ @controller.controller_name() +"_"+ @controller.action_name()
    %>' onload='noosfero_init();'
    help=<%= _('Pass the mouse over page elements to get help on them. Click the question mark icon on the top-right corner to deactivate this help window.').inspect %> >
    <script type="text/javascript">
      /* Adds a class to "msie" to the body element if a Microsoft browser is
       * detected. This is needed to workaround several of their limitations.
       */
      if ( navigator.appVersion.indexOf("MSIE") > -1 ) {
        document.body.className += " msie msie" +
          navigator.appVersion.replace(/^.*MSIE\s+([0-9]+).*$/, "$1");
      }
    </script>

    <% unless flash[:notice].nil? %>
      <div id="notice" onclick="Element.hide('notice');" style="display:none">
        <%= flash[:notice] %>
        <%= javascript_tag(
          visual_effect( :appear,    'notice', :duration => 2, :queue => :end ) +
          visual_effect( :highlight, 'notice', :duration => 3, :queue => :end ) +
          visual_effect( :fade,      'notice', :duration => 2, :queue => :end )
        ) %>
      </div>
    <% end %>

    <div id="accessibility_menu">
      <a href="#content" id="link_go_content"><span><%= _('Go to content') %></span></a>
    </div><!-- accessibility_menu -->

    <div id="wrap">
    <div id="wrap2">
    <div id="wrap3">
    <div id="wrap4">

      <div id="beta-tag"><span>BETA</span></div>

      <div id="noosfero_bar" help="#noosfero_bar_help">
        <div id="noosfero_bar_help" style="display:none">
        <%= _("This is %s's shortcuts bar. Using it you have access to the main features of the environment and you find the information of your interest more quickly.") % @environment.name %>
        <p/>
        <%= _("This bar helps you find information following two paths or <strong>dimensions</strong>. First dimension is composed of <em>categories</em>, which you'll find in the colored tabs in the top. Second dimension has <em>content types</em>, and you'll find them in the animated bar on your right.") % @environment.name %>
        </div>

        <div id="navigation_bar">
          <%= link_to "<span>"+ @environment.name() +"</span>",
                      { :controller=>"home" },
                        :id=>"menu_link_to_envhome",
                        :title=>@environment.name  %>
          <% cache(:controller => 'public', :action => 'categories_menu') do %>
            <%= render :file => 'shared/categories_menu' %>
          <% end %>
          <%= render :file => 'shared/assets_menu' %>
        </div><!-- id='navigation_bar' -->
        <script type="text/javascript">
          prepareMenu('navigation_bar', { timeout: 1000 });
        </script>

        <div id="language-selector">
           <%= language_chooser(:element => 'dropdown') %>
        </div>

        <div id="user_box">
          <%= render :file => 'shared/user_menu' %>
        </div><!-- id='user_box' -->

        <a href="#" id="btShowHelp" class="icon-help32on help-on"
           title="<%= _('Turn help on/off') %>"
           onclick="mouseHelpOnOff(); return false"><span><%= _('Help') %></span></a>

      </div><!-- id="noosfero_bar" -->

      <div id="frame"><!-- Frame que envolve toda pagina de um usuario -->
        <div id="header">
          <!-- Abaixo um cabeçalho especifico para a pagina de usuario. -->
        </div><!-- id="header" -->
        <div id="content">
          <div id="header_content">
          </div>

          <% if @controller.send(:boxes_editor?) %>
            <%= yield %>
            <%= display_boxes_editor(@controller.boxes_holder) %>
          <% else %>
            <% if uses_design_blocks?  %>
              <%= display_boxes(@controller.boxes_holder, yield) %>
            <% else %>
              <%= yield %>
            <% end %>
          <% end %>

        </div><!-- id="content" -->
        <div id="footer_content"><!-- Rodape do Conteudo -->
        </div><!-- id="footer_content" -->
      </div><!-- id="frame" -->
    </div><!-- id="wrap4" -->
    </div><!-- id="wrap3" -->
    </div><!-- id="wrap2" -->
    </div><!-- id="wrap" -->

    <div id="footer">
      <%= theme_footer %>
    </div><!-- id="footer" -->

    <div id="helpBox" style="display:none">
      <div id="helpBoxBody">
        <div class="helpAvatar"></div>
        <div id="helpBoxContent"></div>
      </div>
    </div>
    <%= javascript_include_tag 'show-mouse-help' %>
    <%= javascript_include_tag 'noosfero-show-help' %>

    <div id="better-browser-promotion" style="display:none">
      <h3><%=
      _('Your web browser is obsolete!') +'</h3><p/>'+
      _('This website will not look as good as it could.
         Don\'t you want to use Firefox? That is a great web browser, free,
         and made by people of all the world parts.')
      %><p/>
      <b id="bbp-getff"><a href="http://getfirefox.com" class="icon-firefox" target="getff"><%= _('Get Firefox Now!') %></a></b>
    </div>
    <%= javascript_include_tag 'better-browser-promotion' %>

    <% if is_testing_theme %>
      <%= render :file => 'shared/theme_test_panel' %>
    <% end %>

  </body>
</html>