index.rhtml 2.2 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 %>
  <h3><%= _('News') %></h3>
  <% cache @news_cache_key do %>
    <div id='highlighted-news'>
      <% @highlighted_news.each do |highlighted| %>
        <p><%= link_to(highlighted.title, highlighted.url) %><br/>
        <span class="post-date"><%= show_date(highlighted.published_at, true) %> </span></p>
	<div class='headline'><%= highlighted.first_paragraph %></div>
        <br style='clear:both' />
      <% end%>
    </div>

    <div id='portal-news'>
      <% @portal_news.each do |news| %>
        <p><span class="post-date"><%= show_date(news.published_at, true) %> </span><%= link_to(news.title, news.url) %></p>
      <% end%>
    </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(3).each do |news| %>
            <li><span class='news-symbol'>&gt;</span> <%= link_to(news.title, news.url) %></li>
          <% end%>
          </ul>
      <%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 %>

<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>