index.rhtml 2.62 KB
<% if environment.enabled?('display_wizard_signup') && !logged_in? %>
  <%= lightbox_button(:new, _('Signup'), { :controller => 'account', :action => 'wizard' }, :class => 'wizard', :id => 'signup-wizard') %>
<% end %>

<% if @has_news %>
  <h1><%= _('News') %></h1>
  <% cache @news_cache_key do %>
    <div id='highlighted-news'>
      <% @highlighted_news.each_with_index do |highlighted, index| %>
        <div class='highlighted-news-item post-<%= index + 1 %>'>
          <h2><%= link_to(highlighted.title, highlighted.url, :class => 'post-title') %></h2>
          <span class="post-date"><%= show_date(highlighted.published_at, true) %> </span></p>
          <p class='headline'><%= highlighted.first_paragraph %></p>
          <br style='clear:both' />
        </div>
      <% end%>
    </div>

    <div class='sep'></div>

    <div id='portal-news'>
      <ul>
        <% @portal_news.each do |news| %>
          <li>
          <span class="post-date"><%= show_date(news.published_at, true) %> </span>
          <%= link_to(news.title, news.url, :class =>  'post-title' ) %>
          </li>
        <% end%>
      </ul>
    </div>

    <div class='sep'></div>

    <% @area_news.each_with_index do |folder, i| %>
      <% content_tag(:div, :class => ["news-area", ['even', 'odd'][i%2]].join(' ')) do %>
        <h3><%= link_to folder.title, folder.url %></h3>
          <ul>
          <% folder.news(4).each do |news| %>
            <li> <%= link_to(news.title, news.url) %></li>
          <% end%>
          </ul>
        <%= link_to _('View more'), folder.url, :class => 'news-see-more'  %>
      <%end %>
    <% end %>
  <% end %>
<% else %>
  <%= environment.description %>
<% end %>

<% if environment.enabled?('enterprise_activation') %>

    <div id='activation_enterprise'>
    <% form_tag({:controller => 'account', :action => 'activation_question'}, {:method => 'get'}) do %>
      <p><strong><%= __('Activate your enterprise') %></strong></p>
      <%= labelled_form_field(__('Enterprise activation code') + ':', text_field_tag('enterprise_code')) %>
      <%= submit_button(:ok, _('Activate')) %>
    <% end %>
  </div>

<% end %>

<% if environment.enabled?('search_in_home') %>
  <div id='home-search' style='text-align: center'>
    <% form_tag :controller => 'search', :action => 'index' do %>

      <div id='search-field' style='text-align: center;'>
        <%= text_field_tag('query', '', :size => 50) %>
        <%= submit_button(:search, _('Search')) %>
      </div>

      <div>
        <%= lightbox_link_to _('More options'), :controller => 'search', :action => 'popup' %>
      </div>
    <% end %>
  </div>
<% end %>

<br style='clear: both'/>