index.html.erb
2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<% 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 %>'>
<div class='highlighted-news-item post-<%= index + 1 %>-inner'>
<h2><%= link_to(h(highlighted.title), highlighted.url, :class => 'post-title') %></h2>
<span class="post-date"><%= show_date(highlighted.published_at, true) %> </span>
<div class='headline'><%= highlighted.lead %></div>
<p class='highlighted-news-read-more'>
<%= link_to(_('Read more'), highlighted.url) %>
</p>
<br style='clear:both' />
</div>
</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(h(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 %>
<%= content_tag(:div, :class => 'news-area-inner-1') do %>
<%= content_tag(:div, :class => 'news-area-inner-2') do %>
<h3><%= link_to h(folder.title), folder.url %></h3>
<ul>
<% folder.news(environment.news_amount_by_folder).each do |news| %>
<li> <%= link_to(h(news.title), news.url) %></li>
<% end%>
</ul>
<%= link_to _('View more'), folder.url, :class => 'news-see-more' %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% else %>
<%= environment.description %>
<% 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>
<% end %>
</div>
<% end %>
<br style='clear: both'/>